Commit 1d821b0
authored
[AArch64] use
This builds on #169858 to fix the divergence in codegen
(https://godbolt.org/z/a9az3h6oq) between two very similar
functions initially observed in #137447 (represented in the diff by test
cases `@transpose_splat_constants` and `@transpose_constants_splat`:
```
int8x16_t f(int8_t x)
{
return (int8x16_t) { x, 0, x, 1, x, 2, x, 3,
x, 4, x, 5, x, 6, x, 7 };
}
int8x16_t g(int8_t x)
{
return (int8x16_t) { 0, x, 1, x, 2, x, 3, x,
4, x, 5, x, 6, x, 7, x };
}
```
The PR uses an additional `isTRNMask` call in
`AArch64TTIImpl::getShuffleCost` to ensure that we treat shuffle masks
as transpose masks even if `isTransposeMask` fails to recognise them
(meaning that `Kind == TTI::SK_Transpose` cannot be relied upon).
Follow-up work could consider modifying `isTransposeMask`, but that
would also impact other backends than AArch64.isTRNMask to calculate shuffle costs (#171524)1 parent 8f51da3 commit 1d821b0
File tree
4 files changed
+310
-7
lines changed- llvm
- lib/Target/AArch64
- test
- Analysis/CostModel/AArch64
- Transforms/SLPVectorizer/AArch64
4 files changed
+310
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6134 | 6134 | | |
6135 | 6135 | | |
6136 | 6136 | | |
6137 | | - | |
| 6137 | + | |
| 6138 | + | |
| 6139 | + | |
| 6140 | + | |
| 6141 | + | |
6138 | 6142 | | |
| 6143 | + | |
6139 | 6144 | | |
6140 | 6145 | | |
6141 | 6146 | | |
| |||
0 commit comments