[llvm] Combine (X ^ Y) and (X == Y) where appropriate (PR #130922)
Pengcheng Wang via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 12 01:28:35 PDT 2025
================
@@ -8578,7 +8578,8 @@ static bool optimizeBranch(BranchInst *Branch, const TargetLowering &TLI,
}
if (Cmp->isEquality() &&
(match(UI, m_Add(m_Specific(X), m_SpecificInt(-CmpC))) ||
- match(UI, m_Sub(m_Specific(X), m_SpecificInt(CmpC))))) {
+ match(UI, m_Sub(m_Specific(X), m_SpecificInt(CmpC))) ||
+ match(UI, m_Xor(m_Specific(X), m_SpecificInt(CmpC))))) {
----------------
wangpc-pp wrote:
Is this change related to this patch?
https://github.com/llvm/llvm-project/pull/130922
More information about the llvm-commits
mailing list