1 ; RUN: llc < %s -asm-verbose=false -mcpu=mvp -disable-wasm-fallthrough-return-opt -wasm-keep-registers -verify-machineinstrs | FileCheck %s
2 ; RUN: llc < %s -asm-verbose=false -mcpu=mvp -wasm-keep-registers -fast-isel -verify-machineinstrs | FileCheck %s
4 ; Test that FastISel does not generate instructions with NoReg
6 target triple = "wasm32-unknown-unknown"
8 ; CHECK: i32.const {{.*}}, addr
9 ; CHECK: i32.const {{.*}}, 24
11 ; CHECK: i32.const {{.*}}, 24
13 ; CHECK: i32.const {{.*}}, 64
15 ; CHECK: i32.const {{.*}}, 1
18 ; CHECK: br_if 0, $pop{{[0-9]+}}
19 define hidden i32 @d() #0 {
21 %t = icmp slt i8 ptrtoint (ptr @addr to i8), 64
22 br i1 %t, label %a, label %b
29 ; CHECK: i32.const {{.*}}, addr
30 ; CHECK: i32.const {{.*}}, 255
32 ; CHECK: i32.const {{.*}}, 64
34 ; CHECK: i32.const {{.*}}, 1
37 ; CHECK: br_if 0, $pop{{[0-9]+}}
38 define hidden i32 @e() #0 {
40 %t = icmp ult i8 ptrtoint (ptr @addr to i8), 64
41 br i1 %t, label %a, label %b
48 ; CHECK: i32.const {{.*}}, addr
49 ; CHECK: i32.const {{.*}}, 24
51 ; CHECK: i32.const {{.*}}, 24
53 define hidden i32 @f() #0 {
55 %t = sext i8 ptrtoint (ptr @addr to i8) to i32
59 ; CHECK: i32.const {{.*}}, addr
60 ; CHECK: i32.const {{.*}}, 255
62 define hidden i32 @g() #0 {
64 %t = zext i8 ptrtoint (ptr @addr to i8) to i32
70 attributes #0 = { noinline optnone }