1 ; RUN: llc < %s -asm-verbose=false -wasm-keep-registers | FileCheck %s
2 ; RUN: llc < %s -asm-verbose=false -wasm-keep-registers -fast-isel -fast-isel-abort=1 | FileCheck %s
4 target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
5 target triple = "wasm32-unknown-unknown"
7 ; CHECK-LABEL: return_i32:
8 ; CHECK-NEXT: .functype return_i32 (i32) -> (i32){{$}}
9 ; CHECK-NEXT: local.get $push0=, 0
10 ; CHECK-NEXT: end_function{{$}}
11 define i32 @return_i32(i32 %p) {
15 ; CHECK-LABEL: return_i32_twice:
17 ; CHECK-NEXT: i32.const $push[[L0:[^,]+]]=, 1{{$}}
18 ; CHECK-NEXT: return $pop[[L0]]{{$}}
20 ; CHECK-NEXT: i32.const $push{{[^,]+}}=, 3{{$}}
21 ; CHECK-NEXT: end_function{{$}}
22 define i32 @return_i32_twice(i32 %a) {
23 %b = icmp ne i32 %a, 0
24 br i1 %b, label %true, label %false
27 store i32 0, i32* null
31 store i32 2, i32* null