[all-commits] [llvm/llvm-project] 28fe6d: [InstCombine] Remove AllOnes fallbacks in getMaske...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Mon Aug 26 00:56:13 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 28fe6ddd9b9af0167d355ceb5b9eace53c7f162b
https://github.com/llvm/llvm-project/commit/28fe6ddd9b9af0167d355ceb5b9eace53c7f162b
Author: Nikita Popov <npopov at redhat.com>
Date: 2024-08-26 (Mon, 26 Aug 2024)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
M llvm/test/Transforms/InstCombine/bit-checks.ll
Log Message:
-----------
[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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list