diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2014-03-24 20:08:05 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2014-03-24 20:08:05 +0000 |
commit | db1807144a0f76b88fa073558f26972bbea25e05 (patch) | |
tree | a3f9a2a10b82ac20262dd619f6cf6680a092be1b /test | |
parent | d816eda3c794b940f9d9f539456e21c2031868b6 (diff) | |
download | llvm-db1807144a0f76b88fa073558f26972bbea25e05.tar.gz llvm-db1807144a0f76b88fa073558f26972bbea25e05.tar.bz2 llvm-db1807144a0f76b88fa073558f26972bbea25e05.tar.xz |
R600/SI: Fix 64-bit bit ops that require the VALU.
Try to match scalar and first like the other instructions.
Expand 64-bit ands to a pair of 32-bit ands since that is not
available on the VALU.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204660 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/R600/or.ll | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/test/CodeGen/R600/or.ll b/test/CodeGen/R600/or.ll index 35fc8b33e0..05d1e0f041 100644 --- a/test/CodeGen/R600/or.ll +++ b/test/CodeGen/R600/or.ll @@ -56,15 +56,34 @@ define void @vector_or_i32(i32 addrspace(1)* %out, i32 addrspace(1)* %a, i32 %b) ret void } -; EG-CHECK-LABEL: @or_i64 +; EG-CHECK-LABEL: @scalar_or_i64 ; EG-CHECK-DAG: OR_INT * T{{[0-9]\.[XYZW]}}, KC0[2].W, KC0[3].Y ; EG-CHECK-DAG: OR_INT * T{{[0-9]\.[XYZW]}}, KC0[3].X, KC0[3].Z -; SI-CHECK-LABEL: @or_i64 +; SI-CHECK-LABEL: @scalar_or_i64 +; SI-CHECK: S_OR_B64 +define void @scalar_or_i64(i64 addrspace(1)* %out, i64 %a, i64 %b) { + %or = or i64 %a, %b + store i64 %or, i64 addrspace(1)* %out + ret void +} + +; SI-CHECK-LABEL: @vector_or_i64 ; SI-CHECK: V_OR_B32_e32 v{{[0-9]}} ; SI-CHECK: V_OR_B32_e32 v{{[0-9]}} -define void @or_i64(i64 addrspace(1)* %out, i64 %a, i64 %b) { -entry: - %0 = or i64 %a, %b - store i64 %0, i64 addrspace(1)* %out - ret void +define void @vector_or_i64(i64 addrspace(1)* %out, i64 addrspace(1)* %a, i64 addrspace(1)* %b) { + %loada = load i64 addrspace(1)* %a, align 8 + %loadb = load i64 addrspace(1)* %a, align 8 + %or = or i64 %loada, %loadb + store i64 %or, i64 addrspace(1)* %out + ret void +} + +; SI-CHECK-LABEL: @scalar_vector_or_i64 +; SI-CHECK: V_OR_B32_e32 v{{[0-9]}} +; SI-CHECK: V_OR_B32_e32 v{{[0-9]}} +define void @scalar_vector_or_i64(i64 addrspace(1)* %out, i64 addrspace(1)* %a, i64 %b) { + %loada = load i64 addrspace(1)* %a + %or = or i64 %loada, %b + store i64 %or, i64 addrspace(1)* %out + ret void } |