summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/R600/llvm.trunc.ll
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2013-12-20 05:11:55 +0000
committerTom Stellard <thomas.stellard@amd.com>2013-12-20 05:11:55 +0000
commiteddfa69465056693e0a646dd8b92bc46f39248f0 (patch)
tree231ed38d4509ba8f2c3a1e96118e0d6cb0d51b2e /llvm/test/CodeGen/R600/llvm.trunc.ll
parentfa98a0c45142aeca260981df57854be43d5518aa (diff)
downloadbcm5719-llvm-eddfa69465056693e0a646dd8b92bc46f39248f0.tar.gz
bcm5719-llvm-eddfa69465056693e0a646dd8b92bc46f39248f0.zip
R600: Allow ftrunc
v2: Add ftrunc->TRUNC pattern instead of replacing int_AMDGPU_trunc v3: move ftrunc pattern next to TRUNC definition, it's available since R600 Patch By: Jan Vesely Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 197783
Diffstat (limited to 'llvm/test/CodeGen/R600/llvm.trunc.ll')
-rw-r--r--llvm/test/CodeGen/R600/llvm.trunc.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/R600/llvm.trunc.ll b/llvm/test/CodeGen/R600/llvm.trunc.ll
new file mode 100644
index 00000000000..fa6fb9906dd
--- /dev/null
+++ b/llvm/test/CodeGen/R600/llvm.trunc.ll
@@ -0,0 +1,13 @@
+; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s
+
+; CHECK-LABEL: @trunc_f32
+; CHECK: TRUNC
+
+define void @trunc_f32(float addrspace(1)* %out, float %in) {
+entry:
+ %0 = call float @llvm.trunc.f32(float %in)
+ store float %0, float addrspace(1)* %out
+ ret void
+}
+
+declare float @llvm.trunc.f32(float)
OpenPOWER on IntegriCloud