[llvm] [clang] [LLVM][IR] Replace ConstantInt's specialisation of getType() with getIntegerType(). (PR #75217)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 12 10:23:30 PST 2023


================
@@ -1577,7 +1577,7 @@ Value *PolynomialMultiplyRecognize::generate(BasicBlock::iterator At,
 
 static bool hasZeroSignBit(const Value *V) {
   if (const auto *CI = dyn_cast<const ConstantInt>(V))
-    return (CI->getType()->getSignBit() & CI->getSExtValue()) == 0;
+    return (CI->getIntegerType()->getSignBit() & CI->getSExtValue()) == 0;
----------------
nikic wrote:

```suggestion
    return CI->getValue().isNonNegative();
```

https://github.com/llvm/llvm-project/pull/75217


More information about the llvm-commits mailing list