Commit a2c93b3
[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (llvm#82506)
This fixes the miscompile reported in llvm#82430 by telling
isSimpleVIDSequence to sign extend to XLen instead of the width of the
indices, since the "sequence" of indices generated by a strided load
will be at XLen.
This was the simplest way I could think of getting isSimpleVIDSequence
to treat the indexes as if they were zero extended to XLenVT.
Another way we could do this is by refactoring out the "get constant
integers" part from isSimpleVIDSequence and handle them as APInts so we
can separately zero extend it.
Fixes llvm#82430
(cherry picked from commit 815644b)1 parent a9d4ed7 commit a2c93b3
File tree
2 files changed
+16
-16
lines changed- llvm
- lib/Target/RISCV
- test/CodeGen/RISCV/rvv
2 files changed
+16
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3192 | 3192 | | |
3193 | 3193 | | |
3194 | 3194 | | |
3195 | | - | |
| 3195 | + | |
| 3196 | + | |
3196 | 3197 | | |
3197 | 3198 | | |
3198 | 3199 | | |
3199 | 3200 | | |
3200 | 3201 | | |
3201 | 3202 | | |
3202 | 3203 | | |
3203 | | - | |
| 3204 | + | |
3204 | 3205 | | |
3205 | 3206 | | |
3206 | 3207 | | |
| |||
3213 | 3214 | | |
3214 | 3215 | | |
3215 | 3216 | | |
3216 | | - | |
| 3217 | + | |
3217 | 3218 | | |
3218 | 3219 | | |
3219 | 3220 | | |
3220 | 3221 | | |
3221 | 3222 | | |
3222 | 3223 | | |
3223 | | - | |
| 3224 | + | |
3224 | 3225 | | |
3225 | 3226 | | |
3226 | 3227 | | |
| |||
3276 | 3277 | | |
3277 | 3278 | | |
3278 | 3279 | | |
3279 | | - | |
| 3280 | + | |
3280 | 3281 | | |
3281 | 3282 | | |
3282 | 3283 | | |
3283 | | - | |
| 3284 | + | |
3284 | 3285 | | |
3285 | 3286 | | |
3286 | 3287 | | |
| |||
3550 | 3551 | | |
3551 | 3552 | | |
3552 | 3553 | | |
3553 | | - | |
| 3554 | + | |
3554 | 3555 | | |
3555 | 3556 | | |
3556 | 3557 | | |
| |||
15562 | 15563 | | |
15563 | 15564 | | |
15564 | 15565 | | |
15565 | | - | |
| 15566 | + | |
| 15567 | + | |
| 15568 | + | |
| 15569 | + | |
15566 | 15570 | | |
15567 | 15571 | | |
15568 | 15572 | | |
| |||
Lines changed: 4 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15086 | 15086 | | |
15087 | 15087 | | |
15088 | 15088 | | |
15089 | | - | |
15090 | | - | |
15091 | | - | |
15092 | | - | |
15093 | 15089 | | |
15094 | 15090 | | |
15095 | 15091 | | |
15096 | | - | |
15097 | | - | |
| 15092 | + | |
| 15093 | + | |
15098 | 15094 | | |
15099 | 15095 | | |
15100 | 15096 | | |
15101 | 15097 | | |
15102 | 15098 | | |
15103 | 15099 | | |
15104 | | - | |
15105 | | - | |
| 15100 | + | |
| 15101 | + | |
15106 | 15102 | | |
15107 | 15103 | | |
15108 | 15104 | | |
| |||
0 commit comments