Commit 651091a
committed
[InstCombine] Consolidate another fold into select value equivalence
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 88cff86 commit 651091a
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 | |
|---|---|---|---|
| |||
1348 | 1348 | | |
1349 | 1349 | | |
1350 | 1350 | | |
1351 | | - | |
| 1351 | + | |
1352 | 1352 | | |
1353 | 1353 | | |
1354 | 1354 | | |
| |||
1925 | 1925 | | |
1926 | 1926 | | |
1927 | 1927 | | |
1928 | | - | |
1929 | | - | |
1930 | | - | |
1931 | | - | |
1932 | | - | |
1933 | | - | |
1934 | | - | |
1935 | | - | |
1936 | | - | |
1937 | | - | |
1938 | | - | |
1939 | 1928 | | |
1940 | 1929 | | |
1941 | 1930 | | |
| |||
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