Commit 8abe6b1
committed
[AArch64] Guard against getRegisterBitWidth returning zero in vector instr cost.
If the getRegisterBitWidth is zero (such as in sme streaming functions), then
we could hit a crash from using % RegWidth.
It took a while to figure out what was going wrong so there are a few other
minor cleanups here too.1 parent f7dc1d0 commit 8abe6b1
File tree
2 files changed
+24
-5
lines changed- llvm
- lib/Target/AArch64
- test/Analysis/CostModel/AArch64
2 files changed
+24
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3248 | 3248 | | |
3249 | 3249 | | |
3250 | 3250 | | |
3251 | | - | |
| 3251 | + | |
3252 | 3252 | | |
3253 | 3253 | | |
3254 | 3254 | | |
3255 | 3255 | | |
3256 | 3256 | | |
3257 | 3257 | | |
3258 | | - | |
3259 | | - | |
| 3258 | + | |
3260 | 3259 | | |
3261 | 3260 | | |
3262 | 3261 | | |
3263 | | - | |
| 3262 | + | |
3264 | 3263 | | |
3265 | 3264 | | |
3266 | 3265 | | |
| |||
3277 | 3276 | | |
3278 | 3277 | | |
3279 | 3278 | | |
| 3279 | + | |
| 3280 | + | |
3280 | 3281 | | |
3281 | 3282 | | |
3282 | 3283 | | |
3283 | 3284 | | |
3284 | 3285 | | |
3285 | 3286 | | |
3286 | | - | |
| 3287 | + | |
3287 | 3288 | | |
3288 | 3289 | | |
3289 | 3290 | | |
| |||
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
0 commit comments