1 ; RUN: llc < %s -asm-verbose=false \ 2 ; RUN: -fast-isel -fast-isel-abort=1 -verify-machineinstrs \ 3 ; RUN: | FileCheck %s 4 5 target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128" 6 target triple = "wasm32-unknown-unknown" 7 8 ; This tests very minimal fast-isel functionality. 9 10 ; CHECK-LABEL: immediate_f32: 11 ; CHECK: f32.const $push{{[0-9]+}}=, 0x1.4p1{{$}} 12 define float @immediate_f32() { 13 ret float 2.5 14 } 15 16 ; CHECK-LABEL: immediate_f64: 17 ; CHECK: f64.const $push{{[0-9]+}}=, 0x1.4p1{{$}} 18 define double @immediate_f64() { 19 ret double 2.5 20 } 21 22 ; CHECK-LABEL: bitcast_i32_f32: 23 ; CHECK: i32.reinterpret/f32 $push{{[0-9]+}}=, $0{{$}} 24 define i32 @bitcast_i32_f32(float %x) { 25 %y = bitcast float %x to i32 26 ret i32 %y 27 } 28 29 ; CHECK-LABEL: bitcast_f32_i32: 30 ; CHECK: f32.reinterpret/i32 $push{{[0-9]+}}=, $0{{$}} 31 define float @bitcast_f32_i32(i32 %x) { 32 %y = bitcast i32 %x to float 33 ret float %y 34 } 35 36 ; CHECK-LABEL: bitcast_i64_f64: 37 ; CHECK: i64.reinterpret/f64 $push{{[0-9]+}}=, $0{{$}} 38 define i64 @bitcast_i64_f64(double %x) { 39 %y = bitcast double %x to i64 40 ret i64 %y 41 } 42 43 ; CHECK-LABEL: bitcast_f64_i64: 44 ; CHECK: f64.reinterpret/i64 $push{{[0-9]+}}=, $0{{$}} 45 define double @bitcast_f64_i64(i64 %x) { 46 %y = bitcast i64 %x to double 47 ret double %y 48 } 49