[llvm] r258059 - use m_OneUse ; NFCI
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 18 10:36:38 PST 2016
Author: spatel
Date: Mon Jan 18 12:36:38 2016
New Revision: 258059
URL: http://llvm.org/viewvc/llvm-project?rev=258059&view=rev
Log:
use m_OneUse ; NFCI
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp?rev=258059&r1=258058&r2=258059&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp Mon Jan 18 12:36:38 2016
@@ -1399,8 +1399,7 @@ Instruction *InstCombiner::visitAnd(Bina
{
Value *tmpOp0 = Op0;
Value *tmpOp1 = Op1;
- if (Op0->hasOneUse() &&
- match(Op0, m_Xor(m_Value(A), m_Value(B)))) {
+ if (match(Op0, m_OneUse(m_Xor(m_Value(A), m_Value(B))))) {
if (A == Op1 || B == Op1 ) {
tmpOp1 = Op0;
tmpOp0 = Op1;
@@ -1408,8 +1407,7 @@ Instruction *InstCombiner::visitAnd(Bina
}
}
- if (tmpOp1->hasOneUse() &&
- match(tmpOp1, m_Xor(m_Value(A), m_Value(B)))) {
+ if (match(tmpOp1, m_OneUse(m_Xor(m_Value(A), m_Value(B))))) {
if (B == tmpOp0) {
std::swap(A, B);
}
More information about the llvm-commits
mailing list