diff options
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/CodeGen/R600/fadd64.ll | 13 | ||||
| -rw-r--r-- | llvm/test/CodeGen/R600/fdiv64.ll | 14 | ||||
| -rw-r--r-- | llvm/test/CodeGen/R600/fmul64.ll | 13 | ||||
| -rw-r--r-- | llvm/test/CodeGen/R600/load64.ll | 20 |
4 files changed, 60 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/R600/fadd64.ll b/llvm/test/CodeGen/R600/fadd64.ll new file mode 100644 index 00000000000..130302f634f --- /dev/null +++ b/llvm/test/CodeGen/R600/fadd64.ll @@ -0,0 +1,13 @@ +; RUN: llc < %s -march=r600 -mcpu=tahiti | FileCheck %s + +; CHECK: @fadd_f64 +; CHECK: V_ADD_F64 {{VGPR[0-9]+_VGPR[0-9]+, VGPR[0-9]+_VGPR[0-9]+, VGPR[0-9]+_VGPR[0-9]+}} + +define void @fadd_f64(double addrspace(1)* %out, double addrspace(1)* %in1, + double addrspace(1)* %in2) { + %r0 = load double addrspace(1)* %in1 + %r1 = load double addrspace(1)* %in2 + %r2 = fadd double %r0, %r1 + store double %r2, double addrspace(1)* %out + ret void +} diff --git a/llvm/test/CodeGen/R600/fdiv64.ll b/llvm/test/CodeGen/R600/fdiv64.ll new file mode 100644 index 00000000000..76c5ca37697 --- /dev/null +++ b/llvm/test/CodeGen/R600/fdiv64.ll @@ -0,0 +1,14 @@ +; RUN: llc < %s -march=r600 -mcpu=tahiti | FileCheck %s + +; CHECK: @fdiv_f64 +; CHECK: V_RCP_F64_e32 {{VGPR[0-9]+_VGPR[0-9]+}} +; CHECK: V_MUL_F64 {{VGPR[0-9]+_VGPR[0-9]+, VGPR[0-9]+_VGPR[0-9]+, VGPR[0-9]+_VGPR[0-9]+}} + +define void @fdiv_f64(double addrspace(1)* %out, double addrspace(1)* %in1, + double addrspace(1)* %in2) { + %r0 = load double addrspace(1)* %in1 + %r1 = load double addrspace(1)* %in2 + %r2 = fdiv double %r0, %r1 + store double %r2, double addrspace(1)* %out + ret void +} diff --git a/llvm/test/CodeGen/R600/fmul64.ll b/llvm/test/CodeGen/R600/fmul64.ll new file mode 100644 index 00000000000..8a57d4a86b3 --- /dev/null +++ b/llvm/test/CodeGen/R600/fmul64.ll @@ -0,0 +1,13 @@ +; RUN: llc < %s -march=r600 -mcpu=tahiti | FileCheck %s + +; CHECK: @fmul_f64 +; CHECK: V_MUL_F64 {{VGPR[0-9]+_VGPR[0-9]+, VGPR[0-9]+_VGPR[0-9]+, VGPR[0-9]+_VGPR[0-9]+}} + +define void @fmul_f64(double addrspace(1)* %out, double addrspace(1)* %in1, + double addrspace(1)* %in2) { + %r0 = load double addrspace(1)* %in1 + %r1 = load double addrspace(1)* %in2 + %r2 = fmul double %r0, %r1 + store double %r2, double addrspace(1)* %out + ret void +} diff --git a/llvm/test/CodeGen/R600/load64.ll b/llvm/test/CodeGen/R600/load64.ll new file mode 100644 index 00000000000..3b4a8f8f3b0 --- /dev/null +++ b/llvm/test/CodeGen/R600/load64.ll @@ -0,0 +1,20 @@ +; RUN: llc < %s -march=r600 -mcpu=tahiti | FileCheck %s + +; load a f64 value from the global address space. +; CHECK: @load_f64 +; CHECK: BUFFER_LOAD_DWORDX2 VGPR{{[0-9]+}} +define void @load_f64(double addrspace(1)* %out, double addrspace(1)* %in) { +entry: + %0 = load double addrspace(1)* %in + store double %0, double addrspace(1)* %out + ret void +} + +; Load a f64 value from the constant address space. +; CHECK: @load_const_addrspace_f64 +; CHECK: S_LOAD_DWORDX2 SGPR{{[0-9]+}} +define void @load_const_addrspace_f64(double addrspace(1)* %out, double addrspace(2)* %in) { + %1 = load double addrspace(2)* %in + store double %1, double addrspace(1)* %out + ret void +} |

