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

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 15 07:26:41 PST 2018


spatel added reviewers: RKSimon, craig.topper, leonardchan, bjope, spatel.
spatel added inline comments.


================
Comment at: test/Transforms/InstSimplify/saturating-add-sub.ll:76
+  call void @dummy_vec(<2 x i8> %x3)
+  %x4 = call <2 x i8> @llvm.uadd.sat.v2i8(<2 x i8> %a, <2 x i8> <i8 undef, i8 undef>)
+  call void @dummy_vec(<2 x i8> %x4)
----------------
Looking at the matcher implementation, just rearranging the code in this patch isn't going to cover up the discrepancy between scalar and vector. If you want to ignore that to make progress here, just adjust this test with the standard spelling of vector undef:
  %x4 = call <2 x i8> @llvm.uadd.sat.v2i8(<2 x i8> %a, <2 x i8> undef)


Repository:
  rL LLVM

https://reviews.llvm.org/D54532





More information about the llvm-commits mailing list