diff options
| author | Wei Ding <wei.ding2@amd.com> | 2016-07-12 18:02:14 +0000 |
|---|---|---|
| committer | Wei Ding <wei.ding2@amd.com> | 2016-07-12 18:02:14 +0000 |
| commit | 5b2636a15277b2499f2bc1f4c1f009f9ed1bd3f1 (patch) | |
| tree | 317cef08d190efcbdb640035fb9436a4f17648eb /llvm/test | |
| parent | 98c0f482d66624d72a4186a58f535536238bee8a (diff) | |
| download | bcm5719-llvm-5b2636a15277b2499f2bc1f4c1f009f9ed1bd3f1.tar.gz bcm5719-llvm-5b2636a15277b2499f2bc1f4c1f009f9ed1bd3f1.zip | |
AMDGPU: Add LLVM IR Intrinsic for v_lerp_u8
Differential Revision: http://reviews.llvm.org/D22239
llvm-svn: 275197
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/CodeGen/AMDGPU/llvm.amdgcn.lerp.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/llvm.amdgcn.lerp.ll b/llvm/test/CodeGen/AMDGPU/llvm.amdgcn.lerp.ll new file mode 100644 index 00000000000..014369b4501 --- /dev/null +++ b/llvm/test/CodeGen/AMDGPU/llvm.amdgcn.lerp.ll @@ -0,0 +1,14 @@ +; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s +; RUN: llc -march=amdgcn -mcpu=fiji -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s + +declare i32 @llvm.amdgcn.lerp(i32, i32, i32) #0 + +; GCN-LABEL: {{^}}v_lerp: +; GCN: v_lerp_u8 v{{[0-9]+}}, s{{[0-9]+}}, v{{[0-9]+}}, v{{[0-9]+}} +define void @v_lerp(i32 addrspace(1)* %out, i32 %src) nounwind { + %result= call i32 @llvm.amdgcn.lerp(i32 %src, i32 100, i32 100) #0 + store i32 %result, i32 addrspace(1)* %out, align 4 + ret void +} + +attributes #0 = { nounwind readnone } |

