[llvm] 96a74c4 - [ValueLattice] Fix typo in condition (NFC)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 2 09:52:20 PDT 2022


Author: Nikita Popov
Date: 2022-11-02T17:52:13+01:00
New Revision: 96a74c452728fd330f99394bb25dacecd9325645

URL: https://github.com/llvm/llvm-project/commit/96a74c452728fd330f99394bb25dacecd9325645
DIFF: https://github.com/llvm/llvm-project/commit/96a74c452728fd330f99394bb25dacecd9325645.diff

LOG: [ValueLattice] Fix typo in condition (NFC)

Fix typo pointed out by Roman Divacky.

There should be no functional change, as the rest of the code will
return nullptr for undef anyway. The condition is just there for
clarity.

Added: 
    

Modified: 
    llvm/lib/Analysis/ValueLattice.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Analysis/ValueLattice.cpp b/llvm/lib/Analysis/ValueLattice.cpp
index aec7b9950c604..1d2177a92eb46 100644
--- a/llvm/lib/Analysis/ValueLattice.cpp
+++ b/llvm/lib/Analysis/ValueLattice.cpp
@@ -20,7 +20,7 @@ ValueLatticeElement::getCompare(CmpInst::Predicate Pred, Type *Ty,
 
   // TODO: Can be made more precise, but always returning undef would be
   // incorrect.
-  if (isUndef() || isUndef())
+  if (isUndef() || Other.isUndef())
     return nullptr;
 
   if (isConstant() && Other.isConstant())


        


More information about the llvm-commits mailing list