[PATCH] D152088: [InstCombine] add nsw on InstCombineAdd ~X + C --> (C-1) - X

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 4 23:52:03 PDT 2023


nikic added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/add.ll:420
   %B = xor <2 x i8> %A, <i8 -1, i8 -1>
-  %C = add nsw <2 x i8> %B, <i8 -127, i8 -126>
+  %C = add nsw <2 x i8> %B, <i8 -124, i8 -125>
   ret <2 x i8> %C
----------------
You've adjusted the constants here so it now folds, which doesn't match the TODO comment. Not sure what the intention for this test was.


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

https://reviews.llvm.org/D152088



More information about the llvm-commits mailing list