[PATCH] D48066: Add one more No-alias case to alias analysis.

Nuno Lopes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 12 05:39:45 PDT 2018


nlopes added inline comments.


================
Comment at: lib/Analysis/BasicAliasAnalysis.cpp:1813
+    if (ConstantInt *LHSC = dyn_cast<ConstantInt>(BOp->getOperand(0))) {
+      APInt LHS = LHSC->getValue().zextOrSelf(BitWidth);
+      // Check odd number.
----------------
you don't need the zext here. The value should have at least 1 bit, so that's sufficient to test for even/odd.


Repository:
  rL LLVM

https://reviews.llvm.org/D48066





More information about the llvm-commits mailing list