[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 08:01:03 PDT 2023


goldstein.w.n added inline comments.


================
Comment at: llvm/lib/IR/ConstantRange.cpp:1501
+    Max = -Max;
+    return ConstantRange::getNonEmpty(std::move(Max), std::move(Min) + 1);
+  }
----------------
Why are you inverting min/max here?


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

https://reviews.llvm.org/D156845



More information about the llvm-commits mailing list