diff options
Diffstat (limited to 'test/CodeGen')
-rw-r--r-- | test/CodeGen/R600/fp64_to_sint.ll | 9 | ||||
-rw-r--r-- | test/CodeGen/R600/sint_to_fp64.ll | 9 |
2 files changed, 18 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 0000000000..42f9f3403a --- /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 +} diff --git a/test/CodeGen/R600/sint_to_fp64.ll b/test/CodeGen/R600/sint_to_fp64.ll new file mode 100644 index 0000000000..37f67c94d2 --- /dev/null +++ b/test/CodeGen/R600/sint_to_fp64.ll @@ -0,0 +1,9 @@ +; RUN: llc < %s -march=r600 -mcpu=SI | FileCheck %s --check-prefix=CHECK + +; CHECK: @sint_to_fp64 +; CHECK: V_CVT_F64_I32_e32 +define void @sint_to_fp64(double addrspace(1)* %out, i32 %in) { + %result = sitofp i32 %in to double + store double %result, double addrspace(1)* %out + ret void +} |