blob: 6c210e6a4e58f73df844612cc7d247e285db112d [file]
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
; RUN: llc < %s -O0 --global-isel -disable-wasm-fallthrough-return-opt -wasm-keep-registers | FileCheck %s
target triple = "wasm32-unknown-unknown"
define float @bitcast_i32_to_f32(i32 %x) {
; CHECK-LABEL: bitcast_i32_to_f32:
; CHECK: .functype bitcast_i32_to_f32 (i32) -> (f32)
; CHECK-NEXT: # %bb.0:
; CHECK-NEXT: local.get $push1=, 0
; CHECK-NEXT: f32.reinterpret_i32 $push0=, $pop1
; CHECK-NEXT: return $pop0
%a = bitcast i32 %x to float
ret float %a
}
define i32 @bitcast_f32_to_i32(float %x) {
; CHECK-LABEL: bitcast_f32_to_i32:
; CHECK: .functype bitcast_f32_to_i32 (f32) -> (i32)
; CHECK-NEXT: # %bb.0:
; CHECK-NEXT: local.get $push1=, 0
; CHECK-NEXT: i32.reinterpret_f32 $push0=, $pop1
; CHECK-NEXT: return $pop0
%a = bitcast float %x to i32
ret i32 %a
}
define double @bitcast_i64_to_f64(i64 %x) {
; CHECK-LABEL: bitcast_i64_to_f64:
; CHECK: .functype bitcast_i64_to_f64 (i64) -> (f64)
; CHECK-NEXT: # %bb.0:
; CHECK-NEXT: local.get $push1=, 0
; CHECK-NEXT: f64.reinterpret_i64 $push0=, $pop1
; CHECK-NEXT: return $pop0
%a = bitcast i64 %x to double
ret double %a
}
define i64 @bitcast_f64_to_i64(double %x) {
; CHECK-LABEL: bitcast_f64_to_i64:
; CHECK: .functype bitcast_f64_to_i64 (f64) -> (i64)
; CHECK-NEXT: # %bb.0:
; CHECK-NEXT: local.get $push1=, 0
; CHECK-NEXT: i64.reinterpret_f64 $push0=, $pop1
; CHECK-NEXT: return $pop0
%a = bitcast double %x to i64
ret i64 %a
}