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

Kohei Asano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 5 03:33:03 PDT 2023


khei4 added inline comments.


================
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) {
----------------
nikic wrote:
> curret -> current
Thanks! This will be fixed in the pre-commit test commit!


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

https://reviews.llvm.org/D152068



More information about the llvm-commits mailing list