1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=wasm32-unknown-unknown | FileCheck %s
4 ; Regression test for PR41149.
8 ; CHECK: .functype mod () -> ()
9 ; CHECK-NEXT: .local i32
10 ; CHECK-NEXT: # %bb.0:
11 ; CHECK-NEXT: local.get 0
12 ; CHECK-NEXT: local.get 0
13 ; CHECK-NEXT: i32.load8_u 0
14 ; CHECK-NEXT: local.tee 0
15 ; CHECK-NEXT: local.get 0
16 ; CHECK-NEXT: i32.extend8_s
17 ; CHECK-NEXT: i32.const 7
18 ; CHECK-NEXT: i32.shr_s
19 ; CHECK-NEXT: local.tee 0
21 ; CHECK-NEXT: local.get 0
23 ; CHECK-NEXT: i32.store8 0
24 ; CHECK-NEXT: # fallthrough-return
25 %tmp = load <4 x i8>, ptr undef
26 %tmp2 = icmp slt <4 x i8> %tmp, zeroinitializer
27 %tmp3 = sub <4 x i8> zeroinitializer, %tmp
28 %tmp4 = select <4 x i1> %tmp2, <4 x i8> %tmp3, <4 x i8> %tmp
29 store <4 x i8> %tmp4, ptr undef