Commit 28fe6dd
authored
[InstCombine] Remove AllOnes fallbacks in getMaskedTypeForICmpPair() (#104941)
getMaskedTypeForICmpPair() tries to model non-and operands as x & -1.
However, this can end up confusing the matching logic, by picking the -1
operand as the "common" operand, resulting in a successful, but useless,
match. This is what causes commutation failures for some of the
optimizations driven by this function.
Fix this by treating a match against -1 as a non-match.1 parent dad14d4 commit 28fe6dd
File tree
2 files changed
+12
-12
lines changed- llvm
- lib/Transforms/InstCombine
- test/Transforms/InstCombine
2 files changed
+12
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
273 | 277 | | |
274 | 278 | | |
275 | 279 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
809 | 809 | | |
810 | 810 | | |
811 | 811 | | |
812 | | - | |
813 | | - | |
814 | | - | |
815 | | - | |
816 | | - | |
817 | | - | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
818 | 816 | | |
819 | 817 | | |
820 | 818 | | |
| |||
850 | 848 | | |
851 | 849 | | |
852 | 850 | | |
853 | | - | |
854 | | - | |
855 | | - | |
856 | | - | |
857 | | - | |
858 | | - | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
859 | 855 | | |
860 | 856 | | |
861 | 857 | | |
| |||
0 commit comments