[PATCH] D159203: [InstCombine] Fold (A/-B)==(A/B) to (A/B)==0

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 30 12:17:54 PDT 2023


goldstein.w.n added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:5167
 
+  // (A / -B) == (A / B) -> (A / B) == 0
+  {
----------------
goldstein.w.n wrote:
> This comment should include 'if B != INT_MIN'.
Err `B != INT_MAX` or `A != INT_MIN` (if you update to also fallback to `A` check.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D159203



More information about the llvm-commits mailing list