Commit 7bbc049
authored
[InstCombine] Consolidate another fold into select value equivalence (#117746)
We had a separate fold that handled just the trivial case where we're
replacing exactly the argument of the select. Handle this in select
value equivalence by relaxing the infinite loop protection to allow a
replacement of a non-constant with a constant.
This also fixes #113301, as
the separate fold did not handle undef values correctly.1 parent 979a035 commit 7bbc049
File tree
2 files changed
+2
-14
lines changed- llvm
- lib/Transforms/InstCombine
- test/Transforms/InstCombine
2 files changed
+2
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1332 | 1332 | | |
1333 | 1333 | | |
1334 | 1334 | | |
1335 | | - | |
| 1335 | + | |
1336 | 1336 | | |
1337 | 1337 | | |
1338 | 1338 | | |
| |||
1966 | 1966 | | |
1967 | 1967 | | |
1968 | 1968 | | |
1969 | | - | |
1970 | | - | |
1971 | | - | |
1972 | | - | |
1973 | | - | |
1974 | | - | |
1975 | | - | |
1976 | | - | |
1977 | | - | |
1978 | | - | |
1979 | | - | |
1980 | 1969 | | |
1981 | 1970 | | |
1982 | 1971 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
325 | | - | |
326 | 325 | | |
327 | 326 | | |
328 | 327 | | |
329 | 328 | | |
330 | | - | |
| 329 | + | |
331 | 330 | | |
332 | 331 | | |
333 | 332 | | |
| |||
0 commit comments