[PATCH] D28793: [NVPTX] Auto-upgrade some NVPTX intrinsics to LLVM target-generic code.

Justin Lebar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 16 23:17:38 PST 2017


jlebar created this revision.
Herald added a subscriber: jholewinski.

Specifically, we upgrade llvm.nvvm.:

- brev{32,64}
- clz.{i,ll}
- popc.{i,ll}
- abs.{i,ll}
- {min,max}.{i,ll,u,ull}
- h2f

These either map directly to an existing LLVM target-generic
intrinsic or map to a simple LLVM target-generic idiom.

In all cases, we check that the code we generate is lowered to PTX as we
expect.

This patch also adds implementations of the corresponding builtins to
clang.


https://reviews.llvm.org/D28793

Files:
  clang/lib/Headers/__clang_cuda_runtime_wrapper.h
  llvm/include/llvm/IR/IntrinsicsNVVM.td
  llvm/lib/IR/AutoUpgrade.cpp
  llvm/lib/Target/NVPTX/NVPTXIntrinsics.td
  llvm/test/Assembler/auto_upgrade_nvvm_intrinsics.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28793.84633.patch
Type: text/x-patch
Size: 18146 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170117/98bb9427/attachment.bin>


More information about the llvm-commits mailing list