[PATCH] D54532: [InstructionSimplify] Add support for saturating add/sub

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 16 09:53:03 PST 2018


nikic added inline comments.


================
Comment at: test/Transforms/InstSimplify/saturating-add-sub.ll:170
+  call void @dummy_vec(<2 x i8> %y1)
+  %y2 = call <2 x i8> @llvm.usub.sat.v2i8(<2 x i8> <i8 0, i8 0>, <2 x i8> %a)
+  call void @dummy_vec(<2 x i8> %y2)
----------------
spatel wrote:
> That should be "ssub" not "usub". Have a look at:
> rL347060
> and make sure I didn't introduce any typos while translating the tests to separate functions.
Thanks a lot for splitting up the tests! I've now rebased and updated the test output. I made two minor adjustments in the tests: In usub_vector_undef I changed the RHS to undef,undef (as 0,undef is effectively 0). In usub_vector_undef_commute I moved the undef operand to the LHS.


https://reviews.llvm.org/D54532





More information about the llvm-commits mailing list