AMDGPU: Add new intrinsic llvm.amdgcn.kill(i1)
authorMarek Olsak <marek.olsak@amd.com>
Tue, 24 Oct 2017 10:27:13 +0000 (10:27 +0000)
committerMarek Olsak <marek.olsak@amd.com>
Tue, 24 Oct 2017 10:27:13 +0000 (10:27 +0000)
commitce76ea03942d5190da13376c8c9f32d6cc671ed8
treed7e8d096604a8aeec814b3f9700b8900e4951fba
parent2114fc3bcba7f84f1a1d9e7704b5eac9657814a4
AMDGPU: Add new intrinsic llvm.amdgcn.kill(i1)

Summary:
Kill the thread if operand 0 == false.
llvm.amdgcn.wqm.vote can be applied to the operand.

Also allow kill in all shader stages.

Reviewers: arsenm, nhaehnle

Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits

Differential Revision: https://reviews.llvm.org/D38544

llvm-svn: 316427
13 files changed:
llvm/include/llvm/IR/IntrinsicsAMDGPU.td
llvm/lib/Target/AMDGPU/AMDGPUInstructions.td
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
llvm/lib/Target/AMDGPU/SIInsertSkips.cpp
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
llvm/lib/Target/AMDGPU/SIInstrInfo.h
llvm/lib/Target/AMDGPU/SIInstrInfo.td
llvm/lib/Target/AMDGPU/SIInstructions.td
llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/test/CodeGen/AMDGPU/insert-skips-kill-uncond.mir
llvm/test/CodeGen/AMDGPU/llvm.amdgcn.kill.ll [new file with mode: 0644]
llvm/test/Transforms/InstCombine/AMDGPU/amdgcn-intrinsics.ll