1 ; RUN: llc < %s -mtriple=wasm32-unknown-unknown | FileCheck %s
3 ; Regression test for PR41149.
7 ; CHECK-NEXT: .functype mod () -> ()
9 ; CHECK-NEXT: local.get 0
10 ; CHECK-NEXT: i32.load8_s 0
11 ; CHECK-NEXT: local.tee 0
12 ; CHECK-NEXT: local.get 0
13 ; CHECK-NEXT: i32.const 31
14 ; CHECK-NEXT: i32.shr_s
15 ; CHECK-NEXT: local.tee 0
17 ; CHECK-NEXT: local.get 0
19 ; CHECK-NEXT: i32.store8 0
20 %tmp = load <4 x i8>, <4 x i8>* undef
21 %tmp2 = icmp slt <4 x i8> %tmp, zeroinitializer
22 %tmp3 = sub <4 x i8> zeroinitializer, %tmp
23 %tmp4 = select <4 x i1> %tmp2, <4 x i8> %tmp3, <4 x i8> %tmp
24 store <4 x i8> %tmp4, <4 x i8>* undef