[llvm] r307199 - [InstCombine] Use CmpInst::Predicate with m_Cmp instead of ICmpInst::Predicate. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 5 13:31:00 PDT 2017


Author: ctopper
Date: Wed Jul  5 13:31:00 2017
New Revision: 307199

URL: http://llvm.org/viewvc/llvm-project?rev=307199&view=rev
Log:
[InstCombine] Use CmpInst::Predicate with m_Cmp instead of ICmpInst::Predicate. NFC

There isn't really an ICmpInst version so we're just accessing the CmpInst version through inheritance.

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=307199&r1=307198&r2=307199&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp Wed Jul  5 13:31:00 2017
@@ -2458,7 +2458,7 @@ Instruction *InstCombiner::visitXor(Bina
   }
 
   // not (cmp A, B) = !cmp A, B
-  ICmpInst::Predicate Pred;
+  CmpInst::Predicate Pred;
   if (match(&I, m_Not(m_OneUse(m_Cmp(Pred, m_Value(), m_Value()))))) {
     cast<CmpInst>(Op0)->setPredicate(CmpInst::getInversePredicate(Pred));
     return replaceInstUsesWith(I, Op0);




More information about the llvm-commits mailing list