1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s | FileCheck %s
4 target triple = "wasm32-unknown-unknown"
6 ; Regression test for pr47375, in which an assertion was triggering
7 ; because WebAssemblyTargetLowering::isVectorLoadExtDesirable was
8 ; improperly assuming the use of simple value types.
10 define void @sext_vec() {
11 ; CHECK-LABEL: sext_vec:
12 ; CHECK: .functype sext_vec () -> ()
13 ; CHECK-NEXT: .local i32
14 ; CHECK-NEXT: # %bb.0:
15 ; CHECK-NEXT: local.get 0
16 ; CHECK-NEXT: i32.load8_u 0
17 ; CHECK-NEXT: local.set 0
18 ; CHECK-NEXT: local.get 0
19 ; CHECK-NEXT: i32.const 0
20 ; CHECK-NEXT: i32.store8 0
21 ; CHECK-NEXT: local.get 0
22 ; CHECK-NEXT: local.get 0
23 ; CHECK-NEXT: local.get 0
24 ; CHECK-NEXT: i32.const 7
27 ; CHECK-NEXT: i32.const 7175
29 ; CHECK-NEXT: i32.store16 0
30 ; CHECK-NEXT: # fallthrough-return
31 %L1 = load <2 x i3>, ptr undef, align 2
32 %zext = zext <2 x i3> %L1 to <2 x i10>
33 store <2 x i10> %zext, ptr undef, align 4