[PATCH] D68974: [ARM] Lower sadd_sat to qadd8 and qadd16

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 15 02:37:18 PDT 2019


dmgreen created this revision.
dmgreen added reviewers: efriedma, samparker, SjoerdMeijer.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: LLVM.

Lower the target independent signed saturating instructions to qadd8 and qadd16. I've lowered this from a sadd_sat, catching the node early before it is promoted. This also adds a QADD8b and QADD16b node to mean the bottom "lane" of a qadd8/qadd16, so that we can call demand bits on it to show that it does not use the upper bits.

Also handles QSUB8 and QSUB16.


https://reviews.llvm.org/D68974

Files:
  llvm/lib/Target/ARM/ARMISelLowering.cpp
  llvm/lib/Target/ARM/ARMISelLowering.h
  llvm/lib/Target/ARM/ARMInstrInfo.td
  llvm/lib/Target/ARM/ARMInstrThumb2.td
  llvm/test/CodeGen/ARM/sadd_sat.ll
  llvm/test/CodeGen/ARM/sadd_sat_plus.ll
  llvm/test/CodeGen/ARM/ssub_sat.ll
  llvm/test/CodeGen/ARM/ssub_sat_plus.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68974.224975.patch
Type: text/x-patch
Size: 19600 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191015/6bb25a97/attachment.bin>


More information about the llvm-commits mailing list