[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
Sun Jun 4 23:49:02 PDT 2023


nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/test/Transforms/InstCombine/addsub-constant-folding.ll:207
 
 ; TODO: We can add nsw on sub, curret Value Tracking use [max element,min element] constant range, to check overflow for vector?
 define <2 x i8> @non_splat_vec_add_nsw_const_const_sub_nsw_not_ov2(<2 x i8> %arg) {
----------------
curret -> current


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

https://reviews.llvm.org/D152068



More information about the llvm-commits mailing list