Commit 434575c
[SVE] Fix incorrect lowering of predicate permute builtins.
When lowering predicate permute builtins we incorrectly assume only
the typically "active" bits for the specified element type play a
role with all other bits zero'd. This is not the case because all
bits are significant, with the element type specifying how they
are grouped:
b8 - permute using a block size of 1 bit
b16 - permute using a block size of 2 bits
b32 - permute using a block size of 4 bits
b64 - permute using a block size of 8 bits
The affected builtins are svrev, svtrn1, svtrn2, svuzp1, svuzp2,
svzip1 and svzip2.
This patch adds new intrinsics to support these operations and
changes the builtin lowering code to emit them. The b8 case remains
unchanged because for that operation the existing intrinsics work
as required and their support for other predicate types has been
maintained as useful if only as a way to test the correctness of
their matching ISD nodes that code generation relies on.
Differential Revision: https://reviews.llvm.org/D142065
(cherry picked from commit 26b79ca)1 parent aa84ee5 commit 434575c
File tree
12 files changed
+474
-301
lines changed- clang
- include/clang/Basic
- test/CodeGen/aarch64-sve-intrinsics
- llvm
- include/llvm/IR
- lib/Target/AArch64
- test/CodeGen/AArch64
12 files changed
+474
-301
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1249 | 1249 | | |
1250 | 1250 | | |
1251 | 1251 | | |
1252 | | - | |
1253 | | - | |
1254 | | - | |
1255 | | - | |
1256 | | - | |
1257 | | - | |
1258 | | - | |
1259 | | - | |
1260 | | - | |
1261 | | - | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
1262 | 1283 | | |
1263 | 1284 | | |
1264 | 1285 | | |
| |||
Lines changed: 12 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
| 199 | + | |
| 200 | + | |
203 | 201 | | |
204 | 202 | | |
205 | 203 | | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
| 204 | + | |
| 205 | + | |
210 | 206 | | |
211 | 207 | | |
212 | 208 | | |
| |||
215 | 211 | | |
216 | 212 | | |
217 | 213 | | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
| 214 | + | |
| 215 | + | |
222 | 216 | | |
223 | 217 | | |
224 | 218 | | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
| 219 | + | |
| 220 | + | |
229 | 221 | | |
230 | 222 | | |
231 | 223 | | |
| |||
234 | 226 | | |
235 | 227 | | |
236 | 228 | | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
| 229 | + | |
| 230 | + | |
241 | 231 | | |
242 | 232 | | |
243 | 233 | | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
| 234 | + | |
| 235 | + | |
248 | 236 | | |
249 | 237 | | |
250 | 238 | | |
| |||
Lines changed: 12 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
| 199 | + | |
| 200 | + | |
204 | 201 | | |
205 | 202 | | |
206 | 203 | | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
| 204 | + | |
| 205 | + | |
212 | 206 | | |
213 | 207 | | |
214 | 208 | | |
| |||
217 | 211 | | |
218 | 212 | | |
219 | 213 | | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
| 214 | + | |
| 215 | + | |
225 | 216 | | |
226 | 217 | | |
227 | 218 | | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
| 219 | + | |
| 220 | + | |
233 | 221 | | |
234 | 222 | | |
235 | 223 | | |
| |||
238 | 226 | | |
239 | 227 | | |
240 | 228 | | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
| 229 | + | |
| 230 | + | |
246 | 231 | | |
247 | 232 | | |
248 | 233 | | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
| 234 | + | |
| 235 | + | |
254 | 236 | | |
255 | 237 | | |
256 | 238 | | |
| |||
0 commit comments