1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
2 ; RUN: opt -S --passes=slp-vectorizer -slp-threshold=-50 -mtriple=riscv64-unknown-linux-gnu -mattr=+v < %s| FileCheck %s
4 %class.A = type { i32, i32 }
7 ; CHECK-LABEL: define void @test
8 ; CHECK-SAME: () #[[ATTR0:[0-9]+]] {
10 ; CHECK-NEXT: [[SUB4_I_I65_US:%.*]] = or i64 0, 1
11 ; CHECK-NEXT: br label [[BODY:%.*]]
13 ; CHECK-NEXT: [[ADD_I_I62_US:%.*]] = shl i64 0, 0
14 ; CHECK-NEXT: [[TMP0:%.*]] = insertelement <2 x i64> <i64 poison, i64 1>, i64 [[ADD_I_I62_US]], i32 0
15 ; CHECK-NEXT: [[TMP1:%.*]] = or <2 x i64> zeroinitializer, [[TMP0]]
16 ; CHECK-NEXT: [[TMP2:%.*]] = getelementptr [[CLASS_A:%.*]], <2 x ptr> zeroinitializer, <2 x i64> [[TMP1]]
17 ; CHECK-NEXT: [[TMP3:%.*]] = call <2 x i32> @llvm.masked.gather.v2i32.v2p0(<2 x ptr> [[TMP2]], i32 4, <2 x i1> splat (i1 true), <2 x i32> poison)
18 ; CHECK-NEXT: [[TMP4:%.*]] = extractelement <2 x i32> [[TMP3]], i32 0
19 ; CHECK-NEXT: [[TMP5:%.*]] = extractelement <2 x i32> [[TMP3]], i32 1
20 ; CHECK-NEXT: [[CMP_I_I_I_I67_US:%.*]] = icmp slt i32 [[TMP4]], [[TMP5]]
21 ; CHECK-NEXT: [[SPEC_SELECT_I_I68_US:%.*]] = select i1 false, i64 [[SUB4_I_I65_US]], i64 0
22 ; CHECK-NEXT: br label [[BODY]]
28 %add.i.i62.us = shl i64 0, 0
29 %mul.i.i63.us = or i64 %add.i.i62.us, 0
30 %add.ptr.i.i.i64.us = getelementptr %class.A, ptr null, i64 %mul.i.i63.us
31 %sub4.i.i65.us = or i64 0, 1
32 %add.ptr.i63.i.i66.us = getelementptr %class.A, ptr null, i64 %sub4.i.i65.us
33 %0 = load i32, ptr %add.ptr.i.i.i64.us, align 4
34 %1 = load i32, ptr %add.ptr.i63.i.i66.us, align 4
35 %cmp.i.i.i.i67.us = icmp slt i32 %0, %1
36 %spec.select.i.i68.us = select i1 false, i64 %sub4.i.i65.us, i64 0