[llvm] r306986 - [InstCombine] Use m_BitReverse pattern match helper. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 2 09:31:16 PDT 2017


Author: rksimon
Date: Sun Jul  2 09:31:16 2017
New Revision: 306986

URL: http://llvm.org/viewvc/llvm-project?rev=306986&view=rev
Log:
[InstCombine] Use m_BitReverse pattern match helper. NFCI.

Modified:
    llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp

Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp?rev=306986&r1=306985&r2=306986&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp Sun Jul  2 09:31:16 2017
@@ -3447,8 +3447,8 @@ Instruction *InstCombiner::foldICmpEqual
   // TODO: Move this to a function similar to foldICmpIntrinsicWithConstant()
   // and handle more intrinsics.
   if ((match(Op0, m_BSwap(m_Value(A))) && match(Op1, m_BSwap(m_Value(B)))) ||
-      (match(Op0, m_Intrinsic<Intrinsic::bitreverse>(m_Value(A))) &&
-       match(Op1, m_Intrinsic<Intrinsic::bitreverse>(m_Value(B)))))
+      (match(Op0, m_BitReverse(m_Value(A))) &&
+       match(Op1, m_BitReverse(m_Value(B)))))
     return new ICmpInst(Pred, A, B);
 
   return nullptr;




More information about the llvm-commits mailing list