[PATCH] D143766: [InstCombine][WIP] Fix InstCombinerImpl::foldICmpMulConstant for nsw and nuw mul with unsigned compare.
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 10 11:53:10 PST 2023
goldstein.w.n added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:2079
MulTy, APIntOps::RoundingSDiv(C, *MulC, APInt::Rounding::UP));
if (Pred == ICmpInst::ICMP_SLE || Pred == ICmpInst::ICMP_SGT)
NewC = ConstantInt::get(
----------------
I'm not sure this is correct w.o `nuw`:
`nsw` only: https://alive2.llvm.org/ce/z/xrrGmG
`nsw nuw`: https://alive2.llvm.org/ce/z/CCHqJ8
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143766/new/
https://reviews.llvm.org/D143766
More information about the llvm-commits
mailing list