[llvm] [InstSimplify] Avoid use of ConstantExpr::getICmp. NFC (PR #67873)
    Craig Topper via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Sat Sep 30 08:41:24 PDT 2023
    
    
  
================
@@ -3916,12 +3916,12 @@ static Value *simplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS,
           // is non-negative then LHS <s RHS.
           case ICmpInst::ICMP_SGT:
           case ICmpInst::ICMP_SGE:
-            return ConstantExpr::getICmp(ICmpInst::ICMP_SLT, C,
-                                         Constant::getNullValue(C->getType()));
+            return ConstantFoldCompareInstruction(
----------------
topperc wrote:
Does that matter here? `C` came from m_ImmConstant and we're comparing it to null.
https://github.com/llvm/llvm-project/pull/67873
    
    
More information about the llvm-commits
mailing list