llvm.org GIT mirror llvm / abd28de
[SLP] add test that requires shuffle of scalars; NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369255 91177308-0d34-0410-b5e6-96231b3b80d8 Sanjay Patel 30 days ago
1 changed file(s) with 26 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
7777 ret <4 x float> %i3
7878 }
7979
80 define <4 x float> @PR16739_byref_alt(<4 x float>* nocapture readonly dereferenceable(16) %x) {
81 ; CHECK-LABEL: @PR16739_byref_alt(
82 ; CHECK-NEXT: [[GEP0:%.*]] = getelementptr inbounds <4 x float>, <4 x float>* [[X:%.*]], i64 0, i64 0
83 ; CHECK-NEXT: [[GEP1:%.*]] = getelementptr inbounds <4 x float>, <4 x float>* [[X]], i64 0, i64 1
84 ; CHECK-NEXT: [[TMP1:%.*]] = bitcast float* [[GEP0]] to <2 x float>*
85 ; CHECK-NEXT: [[TMP2:%.*]] = load <2 x float>, <2 x float>* [[TMP1]], align 4
86 ; CHECK-NEXT: [[SHUFFLE:%.*]] = shufflevector <2 x float> [[TMP2]], <2 x float> undef, <4 x i32>
87 ; CHECK-NEXT: [[TMP3:%.*]] = extractelement <4 x float> [[SHUFFLE]], i32 0
88 ; CHECK-NEXT: [[I0:%.*]] = insertelement <4 x float> undef, float [[TMP3]], i32 0
89 ; CHECK-NEXT: [[I1:%.*]] = insertelement <4 x float> [[I0]], float [[TMP3]], i32 1
90 ; CHECK-NEXT: [[TMP4:%.*]] = extractelement <4 x float> [[SHUFFLE]], i32 2
91 ; CHECK-NEXT: [[I2:%.*]] = insertelement <4 x float> [[I1]], float [[TMP4]], i32 2
92 ; CHECK-NEXT: [[I3:%.*]] = insertelement <4 x float> [[I2]], float [[TMP4]], i32 3
93 ; CHECK-NEXT: ret <4 x float> [[I3]]
94 ;
95 %gep0 = getelementptr inbounds <4 x float>, <4 x float>* %x, i64 0, i64 0
96 %gep1 = getelementptr inbounds <4 x float>, <4 x float>* %x, i64 0, i64 1
97 %x0 = load float, float* %gep0
98 %x1 = load float, float* %gep1
99 %i0 = insertelement <4 x float> undef, float %x0, i32 0
100 %i1 = insertelement <4 x float> %i0, float %x0, i32 1
101 %i2 = insertelement <4 x float> %i1, float %x1, i32 2
102 %i3 = insertelement <4 x float> %i2, float %x1, i32 3
103 ret <4 x float> %i3
104 }
105
80106 define <4 x float> @PR16739_byval(<4 x float>* nocapture readonly dereferenceable(16) %x) {
81107 ; CHECK-LABEL: @PR16739_byval(
82108 ; CHECK-NEXT: [[T0:%.*]] = bitcast <4 x float>* [[X:%.*]] to i64*