Commit 68c9124
committed
[NaryReassociate] Fix crash from pointer width / index width confusion
NaryReassociate would crash on expressions like the one in the added
test that involved pointers where the size of the type was greater
than the index width of the pointer, causing calls to SCEV's zext
expression on types that didn't need to be zero-extended.
This commit fixes the issue.1 parent 96d46c6 commit 68c9124
File tree
2 files changed
+20
-5
lines changed- llvm
- lib/Transforms/Scalar
- test/Transforms/NaryReassociate
2 files changed
+20
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
405 | 412 | | |
406 | | - | |
407 | | - | |
408 | | - | |
| 413 | + | |
409 | 414 | | |
410 | 415 | | |
411 | 416 | | |
412 | 417 | | |
413 | | - | |
414 | | - | |
| 418 | + | |
415 | 419 | | |
416 | 420 | | |
417 | 421 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
24 | 35 | | |
25 | 36 | | |
26 | 37 | | |
| |||
0 commit comments