[PATCH] D145073: [InstCombine] fold signed absolute diff patterns

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 3 10:02:59 PST 2023


goldstein.w.n added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:980
+    // The remaining subtract is not "nuw" any more, and it is "nsw" only if
+    // it was already "nsw" or if this is the only use.
+    TI->setHasNoUnsignedWrap(false);
----------------
Why does one-use allow it to be `nsw`?


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

https://reviews.llvm.org/D145073



More information about the llvm-commits mailing list