Commit 1383cb6
committed
[ConstFold] Fix incorrect gep inbounds of undef fold
gep inbounds of undef can only be folded to poison if we know
that the offset is non-zero. I don't think precise handling here
is important, so just drop the inbounds special case. This matches
what InstSimplify does.1 parent 4d3284c commit 1383cb6
File tree
2 files changed
+2
-3
lines changed- llvm
- lib/IR
- test/Transforms/InstSimplify/ConstProp
2 files changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1549 | 1549 | | |
1550 | 1550 | | |
1551 | 1551 | | |
1552 | | - | |
1553 | | - | |
| 1552 | + | |
1554 | 1553 | | |
1555 | 1554 | | |
1556 | 1555 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
0 commit comments