1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -O0 -mtriple=wasm32-unknown-unknown -wasm-disable-explicit-locals -wasm-keep-registers < %s | FileCheck %s
4 define i32 @test(ptr %p, ptr %p2) {
6 ; CHECK: .functype test (i32, i32) -> (i32)
8 ; CHECK-NEXT: i32.load8_u $3=, 0($0)
9 ; CHECK-NEXT: i32.eqz $2=, $3
10 ; CHECK-NEXT: i32.store8 0($1), $3
11 ; CHECK-NEXT: # %bb.1: # %bb2
12 ; CHECK-NEXT: i32.const $4=, 1
13 ; CHECK-NEXT: i32.and $5=, $2, $4
15 ; CHECK-NEXT: br_if 0, $5 # 0: down to label0
16 ; CHECK-NEXT: # %bb.2: # %bb4
17 ; CHECK-NEXT: i32.const $6=, 0
18 ; CHECK-NEXT: return $6
19 ; CHECK-NEXT: .LBB0_3: # %bb3
20 ; CHECK-NEXT: end_block # label0:
21 ; CHECK-NEXT: i32.const $7=, 1
22 ; CHECK-NEXT: return $7
24 %v.ext = zext i8 %v to i32
25 %cond = icmp eq i32 %v.ext, 0
26 ; Cause FastISel abort.
28 store i8 %shl, ptr %p2
32 br i1 %cond, label %bb3, label %bb4