[PATCH] D59066: [TargetLowering] improve the default expansion of uaddsat/usubsat

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 6 18:11:05 PST 2019


spatel created this revision.
spatel added reviewers: nikic, RKSimon, craig.topper, lebedev.ri, efriedma.
Herald added subscribers: jdoerfert, hiraditya, kristof.beyls, javed.absar, mcrosier.
Herald added a project: LLVM.

This is an alternative to D59006 <https://reviews.llvm.org/D59006> that achieves identical results for x86, and also makes an improvement for AArch64. The logic is pushing the limits of target-independence, but this is what it takes to not induce any regressions for x86, and there's no harm to AArch...so better all-around?

Normally, we'd try to improve the generic combines underlying the sub-optimal output that we see in the test diffs, but that did not look easy/possible for the cases I looked at. For example, the AArch bic/bic appears to be missed because one of those is a generic 'not' op, but the other is already a BIC node.


https://reviews.llvm.org/D59066

Files:
  llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  llvm/test/CodeGen/AArch64/uadd_sat_vec.ll
  llvm/test/CodeGen/X86/uadd_sat.ll
  llvm/test/CodeGen/X86/uadd_sat_vec.ll
  llvm/test/CodeGen/X86/usub_sat.ll
  llvm/test/CodeGen/X86/usub_sat_vec.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59066.189631.patch
Type: text/x-patch
Size: 80381 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190307/4f6f9c1f/attachment.bin>


More information about the llvm-commits mailing list