You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MVE shuffle costing for VREV instructions was making incorrect
assumptions as to legalized vector types remaining as vectors. Add a
quick check to ensure they are indeed vectors before attempting to get
the number of elements.
(cherry picked from commit 53be6ab)
Copy file name to clipboardExpand all lines: llvm/test/Analysis/CostModel/ARM/shuffle.ll
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -112,6 +112,8 @@ define void @reverse() {
112
112
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v8f32 = shufflevector <8 x float> undef, <8 x float> undef, <8 x i32> <i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
113
113
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v2f64 = shufflevector <2 x double> undef, <2 x double> undef, <2 x i32> <i32 1, i32 0>
114
114
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v4f64 = shufflevector <4 x double> undef, <4 x double> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
115
+
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %v3i24 = shufflevector <3 x i24> undef, <3 x i24> undef, <3 x i32> <i32 2, i32 1, i32 0>
116
+
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 192 for instruction: %v3i124 = shufflevector <3 x i124> undef, <3 x i124> undef, <3 x i32> <i32 2, i32 1, i32 0>
115
117
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
116
118
;
117
119
; CHECK-NEON-LABEL: 'reverse'
@@ -137,6 +139,8 @@ define void @reverse() {
137
139
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8f32 = shufflevector <8 x float> undef, <8 x float> undef, <8 x i32> <i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
138
140
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f64 = shufflevector <2 x double> undef, <2 x double> undef, <2 x i32> <i32 1, i32 0>
139
141
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f64 = shufflevector <4 x double> undef, <4 x double> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
142
+
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v3i24 = shufflevector <3 x i24> undef, <3 x i24> undef, <3 x i32> <i32 2, i32 1, i32 0>
143
+
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %v3i124 = shufflevector <3 x i124> undef, <3 x i124> undef, <3 x i32> <i32 2, i32 1, i32 0>
140
144
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
141
145
;
142
146
%v2i8 = shufflevector <2 x i8> undef, <2 x i8> undef, <2 x i32> <i321, i320>
@@ -168,6 +172,8 @@ define void @reverse() {
168
172
%v2f64 = shufflevector <2 x double> undef, <2 x double> undef, <2 x i32> <i321, i320>
169
173
%v4f64 = shufflevector <4 x double> undef, <4 x double> undef, <4 x i32> <i323, i322, i321, i320>
170
174
175
+
%v3i24 = shufflevector <3 x i24> undef, <3 x i24> undef, <3 x i32> <i322, i321, i320>
176
+
%v3i124 = shufflevector <3 x i124> undef, <3 x i124> undef, <3 x i32> <i322, i321, i320>
0 commit comments