summaryrefslogtreecommitdiff
path: root/test/CodeGen/R600/llvm.AMDGPU.trunc.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/R600/llvm.AMDGPU.trunc.ll')
-rw-r--r--test/CodeGen/R600/llvm.AMDGPU.trunc.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGen/R600/llvm.AMDGPU.trunc.ll b/test/CodeGen/R600/llvm.AMDGPU.trunc.ll
new file mode 100644
index 00000000000..dfe42eea6bb
--- /dev/null
+++ b/test/CodeGen/R600/llvm.AMDGPU.trunc.ll
@@ -0,0 +1,18 @@
+;RUN: llc < %s -march=r600 -mcpu=redwood | diff %s.check -
+
+
+define void @test() {
+ %r0 = call float @llvm.R600.load.input(i32 0)
+ %r1 = call float @llvm.AMDGPU.trunc( float %r0)
+ %r2 = call float @llvm.AMDGPU.store.output(float %r1, i32 0)
+ call void @llvm.AMDGPU.export.reg(float %r2)
+ ret void
+}
+
+declare void @llvm.AMDGPU.export.reg(float)
+
+declare float @llvm.R600.load.input(i32)
+
+declare float @llvm.AMDGPU.store.output(float, i32)
+
+declare float @llvm.AMDGPU.trunc(float ) \ No newline at end of file