[PATCH] D68717: [Codegen] More add_sat and sub_sat promotion

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 9 10:57:05 PDT 2019


dmgreen created this revision.
dmgreen added reviewers: nikic, craig.topper, RKSimon, leonardchan.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

As a continuation of D68643 <https://reviews.llvm.org/D68643>, the default promotion for saturation arithmetic can be further refined when MIN/MAX are known to be legal. All the test changes here are in uncommon types like a i4.

This uses isOperationLegal, as opposed to legal or custom because the X86 MINs/MAXs are custom lowered. Some of the MVE tests look larger because they are materialising constants (I imagine they might be pulled out of a loop).


https://reviews.llvm.org/D68717

Files:
  llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
  llvm/test/CodeGen/Thumb2/mve-saturating-arith.ll
  llvm/test/CodeGen/X86/sadd_sat_vec.ll
  llvm/test/CodeGen/X86/ssub_sat_vec.ll
  llvm/test/CodeGen/X86/uadd_sat_vec.ll
  llvm/test/CodeGen/X86/usub_sat_vec.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68717.224093.patch
Type: text/x-patch
Size: 24607 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191009/4999a261/attachment.bin>


More information about the llvm-commits mailing list