summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNiels Ole Salscheider <niels_ole@salscheider-online.de>2013-08-08 16:06:15 +0000
committerNiels Ole Salscheider <niels_ole@salscheider-online.de>2013-08-08 16:06:15 +0000
commit014773626d2678868adf696ac58c44d2b2980fa8 (patch)
tree0de2729ac5326b0dc6e3df8752e647c396484b64 /test
parent7114e2e7cff35364230795123d9049b96098725e (diff)
downloadllvm-014773626d2678868adf696ac58c44d2b2980fa8.tar.gz
llvm-014773626d2678868adf696ac58c44d2b2980fa8.tar.bz2
llvm-014773626d2678868adf696ac58c44d2b2980fa8.tar.xz
R600/SI: Implement fp32<->fp64 conversions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187988 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/R600/fpext.ll9
-rw-r--r--test/CodeGen/R600/fptrunc.ll9
2 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGen/R600/fpext.ll b/test/CodeGen/R600/fpext.ll
new file mode 100644
index 0000000000..e02c19ce10
--- /dev/null
+++ b/test/CodeGen/R600/fpext.ll
@@ -0,0 +1,9 @@
+; RUN: llc < %s -march=r600 -mcpu=SI | FileCheck %s --check-prefix=CHECK
+
+; CHECK: @fpext
+; CHECK: V_CVT_F64_F32_e32
+define void @fpext(double addrspace(1)* %out, float %in) {
+ %result = fpext float %in to double
+ store double %result, double addrspace(1)* %out
+ ret void
+}
diff --git a/test/CodeGen/R600/fptrunc.ll b/test/CodeGen/R600/fptrunc.ll
new file mode 100644
index 0000000000..2a10f63722
--- /dev/null
+++ b/test/CodeGen/R600/fptrunc.ll
@@ -0,0 +1,9 @@
+; RUN: llc < %s -march=r600 -mcpu=SI | FileCheck %s --check-prefix=CHECK
+
+; CHECK: @fptrunc
+; CHECK: V_CVT_F32_F64_e32
+define void @fptrunc(float addrspace(1)* %out, double %in) {
+ %result = fptrunc double %in to float
+ store float %result, float addrspace(1)* %out
+ ret void
+}