[PATCH] D152068: [InstCombine] add overflow checking on AddSub `C-(X+C2) --> (C-C2)-X`

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 3 11:42:21 PDT 2023


nikic added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp:2005
+                              OBO1->hasNoUnsignedWrap() &&
+                              willNotOverflowSignedSub(C, C2, *Res));
+      return Res;
----------------
`*Res` should be `I` here.


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

https://reviews.llvm.org/D152068



More information about the llvm-commits mailing list