[PATCH] D156845: [ConstantRange] Calculate precise range for shl by -1
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 7 06:59:26 PDT 2023
goldstein.w.n added inline comments.
================
Comment at: llvm/lib/IR/ConstantRange.cpp:1485
+ Min = Min.abs();
+ Max = Max.abs();
+ }
----------------
Imo should be `Min = -Min; Max = -Max` here instead of abs, think thats clearer given your negating.
Can you also add a comment explaining why you're doing this.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156845/new/
https://reviews.llvm.org/D156845
More information about the llvm-commits
mailing list