[PATCH] D28719: [NVPTX] Improve lowering of llvm.ctlz.

Justin Lebar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 13 19:17:13 PST 2017


jlebar created this revision.
jlebar added a reviewer: tra.
jlebar added a subscriber: llvm-commits.
Herald added a subscriber: jholewinski.

- Disable "ctlz speculation", which inserts a branch on every ctlz(x) which has defined behavior on x == 0 to check whether x is, in fact zero.

- Add DAG patterns that avoid re-truncating or re-expanding the result of the 16- and 64-bit ctz instructions.


https://reviews.llvm.org/D28719

Files:
  llvm/lib/Target/NVPTX/NVPTXISelLowering.h
  llvm/lib/Target/NVPTX/NVPTXInstrInfo.td
  llvm/test/CodeGen/NVPTX/ctlz.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28719.84421.patch
Type: text/x-patch
Size: 6894 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170114/d6f959ec/attachment.bin>


More information about the llvm-commits mailing list