[ValueLattice] Fix typo in condition (NFC)
authorNikita Popov <npopov@redhat.com>
Wed, 2 Nov 2022 16:50:02 +0000 (17:50 +0100)
committerNikita Popov <npopov@redhat.com>
Wed, 2 Nov 2022 16:52:13 +0000 (17:52 +0100)
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.

llvm/lib/Analysis/ValueLattice.cpp

index aec7b99..1d2177a 100644 (file)
@@ -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())