[PATCH] D138416: [ConstraintElim] Support add nsw with negative constants.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 5 06:25:42 PST 2022


nikic added a comment.

Looks like gep-arithmetic-add.ll fails in pre-commit CI.



================
Comment at: llvm/lib/Transforms/Scalar/ConstraintElimination.cpp:371
+            CmpInst::ICMP_SGE, Op0,
+            ConstantInt::get(Op1->getType(), C->getValue() * -1));
+        IsSigned = true;
----------------
Is this correct if C is INT_MIN?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138416/new/

https://reviews.llvm.org/D138416



More information about the llvm-commits mailing list