[llvm] [InstCombine] Simplify matcher in InstCombineAndOrXor (NFC) (PR #96665)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 25 09:39:34 PDT 2024
https://github.com/AtariDreams created https://github.com/llvm/llvm-project/pull/96665
None
>From 39633af688779ca040ad7bba09b26dc15492cd38 Mon Sep 17 00:00:00 2001
From: Rose <gfunni234 at gmail.com>
Date: Tue, 25 Jun 2024 12:38:42 -0400
Subject: [PATCH] [InstCombine] Simplify matcher in InstCombineAndOrXor (NFC)
---
llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
index 19a12343748df..b8664089c36ce 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
@@ -3655,8 +3655,7 @@ Instruction *InstCombinerImpl::visitOr(BinaryOperator &I) {
// (A & B) | (A ^ B) --> A | B
// (B & A) | (A ^ B) --> A | B
- if (match(Op0, m_And(m_Specific(A), m_Specific(B))) ||
- match(Op0, m_And(m_Specific(B), m_Specific(A))))
+ if (match(Op0, m_c_And(m_Specific(A), m_Specific(B))))
return BinaryOperator::CreateOr(A, B);
// ~A | (A ^ B) --> ~(A & B)
More information about the llvm-commits
mailing list