summaryrefslogtreecommitdiff
path: root/test/CodeGen/R600/fp64_to_sint.ll
diff options
context:
space:
mode:
authorNiels Ole Salscheider <niels_ole@salscheider-online.de>2013-08-08 16:06:08 +0000
committerNiels Ole Salscheider <niels_ole@salscheider-online.de>2013-08-08 16:06:08 +0000
commit7114e2e7cff35364230795123d9049b96098725e (patch)
tree28260c27461f2df929fcedddd053d2eebaed4c48 /test/CodeGen/R600/fp64_to_sint.ll
parent91955e78e718b4a7d2272ce476e29774f6ac84ea (diff)
R600/SI: Implement sint<->fp64 conversions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187987 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/R600/fp64_to_sint.ll')
-rw-r--r--test/CodeGen/R600/fp64_to_sint.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGen/R600/fp64_to_sint.ll b/test/CodeGen/R600/fp64_to_sint.ll
new file mode 100644
index 00000000000..42f9f3403a3
--- /dev/null
+++ b/test/CodeGen/R600/fp64_to_sint.ll
@@ -0,0 +1,9 @@
+; RUN: llc < %s -march=r600 -mcpu=SI | FileCheck %s --check-prefix=CHECK
+
+; CHECK: @fp64_to_sint
+; CHECK: V_CVT_I32_F64_e32
+define void @fp64_to_sint(i32 addrspace(1)* %out, double %in) {
+ %result = fptosi double %in to i32
+ store i32 %result, i32 addrspace(1)* %out
+ ret void
+}