[PATCH] D156845: [ConstantRange] Calculate precise range for shl by -1

Allen zhong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 7 07:54:35 PDT 2023


Allen marked an inline comment as done.
Allen added inline comments.


================
Comment at: llvm/lib/IR/ConstantRange.cpp:1485
+    Min = Min.abs();
+    Max = Max.abs();
+  }
----------------
goldstein.w.n wrote:
> 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.
apply your comments, thanks


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

https://reviews.llvm.org/D156845



More information about the llvm-commits mailing list