diff options
Diffstat (limited to 'llvm/test/CodeGen')
| -rw-r--r-- | llvm/test/CodeGen/R600/fp_to_uint.f64.ll | 9 | ||||
| -rw-r--r-- | llvm/test/CodeGen/R600/uint_to_fp.f64.ll | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/R600/fp_to_uint.f64.ll b/llvm/test/CodeGen/R600/fp_to_uint.f64.ll new file mode 100644 index 00000000000..bf607cef088 --- /dev/null +++ b/llvm/test/CodeGen/R600/fp_to_uint.f64.ll @@ -0,0 +1,9 @@ +; RUN: llc -march=r600 -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI %s + +; SI-LABEL: @fp_to_uint_i32_f64 +; SI: V_CVT_U32_F64_e32 +define void @fp_to_uint_i32_f64(i32 addrspace(1)* %out, double %in) { + %cast = fptoui double %in to i32 + store i32 %cast, i32 addrspace(1)* %out, align 4 + ret void +} diff --git a/llvm/test/CodeGen/R600/uint_to_fp.f64.ll b/llvm/test/CodeGen/R600/uint_to_fp.f64.ll new file mode 100644 index 00000000000..75150c22913 --- /dev/null +++ b/llvm/test/CodeGen/R600/uint_to_fp.f64.ll @@ -0,0 +1,9 @@ +; RUN: llc -march=r600 -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI %s + +; SI-LABEL: @uint_to_fp_f64_i32 +; SI: V_CVT_F64_U32_e32 +define void @uint_to_fp_f64_i32(double addrspace(1)* %out, i32 %in) { + %cast = uitofp i32 %in to double + store double %cast, double addrspace(1)* %out, align 8 + ret void +} |

