llvm-project
28fe6ddd - [InstCombine] Remove AllOnes fallbacks in getMaskedTypeForICmpPair() (#104941)

Commit
1 year ago
[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.
Author
Parents
Loading