diff options
Diffstat (limited to 'test/CodeGen/WebAssembly/fast-isel.ll')
-rw-r--r-- | test/CodeGen/WebAssembly/fast-isel.ll | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/CodeGen/WebAssembly/fast-isel.ll b/test/CodeGen/WebAssembly/fast-isel.ll index 7f9f20fa70834..d3ee77632bcab 100644 --- a/test/CodeGen/WebAssembly/fast-isel.ll +++ b/test/CodeGen/WebAssembly/fast-isel.ll @@ -18,3 +18,31 @@ define float @immediate_f32() { define double @immediate_f64() { ret double 2.5 } + +; CHECK-LABEL: bitcast_i32_f32: +; CHECK: i32.reinterpret/f32 $push{{[0-9]+}}=, $0{{$}} +define i32 @bitcast_i32_f32(float %x) { + %y = bitcast float %x to i32 + ret i32 %y +} + +; CHECK-LABEL: bitcast_f32_i32: +; CHECK: f32.reinterpret/i32 $push{{[0-9]+}}=, $0{{$}} +define float @bitcast_f32_i32(i32 %x) { + %y = bitcast i32 %x to float + ret float %y +} + +; CHECK-LABEL: bitcast_i64_f64: +; CHECK: i64.reinterpret/f64 $push{{[0-9]+}}=, $0{{$}} +define i64 @bitcast_i64_f64(double %x) { + %y = bitcast double %x to i64 + ret i64 %y +} + +; CHECK-LABEL: bitcast_f64_i64: +; CHECK: f64.reinterpret/i64 $push{{[0-9]+}}=, $0{{$}} +define double @bitcast_f64_i64(i64 %x) { + %y = bitcast i64 %x to double + ret double %y +} |