[PATCH] D143014: Add constant combines for `(urem/srem (mul X, Y), (mul X, Z))`

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 13 00:10:03 PDT 2023


goldstein.w.n marked 2 inline comments as done.
goldstein.w.n added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp:1739-1742
+    if (IsSRem || BO0HasNSW)
+      BO->setHasNoSignedWrap();
+    if (!IsSRem || BO0HasNUW)
+      BO->setHasNoUnsignedWrap();
----------------
sdesmalen wrote:
> nit:
>   BO->setHasNoSignedWrap(IsSRem || BO0HasNSW);
>   BO->setHasNoUnsignedWrap(!IsSRem || BO0HasNUW);
Fixed, any chance you can also checkout D143417 and D144225?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143014



More information about the llvm-commits mailing list