summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-03-29 22:54:32 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-03-29 22:54:32 +0000
commitccca22e9e2e03bdd782b1d4bf880ebf79e7b7e77 (patch)
treec7f2ade13f13dff287c6de4ce048c04aac92608f
parent803d1340070ecc330376076326c72276ca58b0bf (diff)
downloadllvm-ccca22e9e2e03bdd782b1d4bf880ebf79e7b7e77.tar.gz
llvm-ccca22e9e2e03bdd782b1d4bf880ebf79e7b7e77.tar.bz2
llvm-ccca22e9e2e03bdd782b1d4bf880ebf79e7b7e77.tar.xz
Prefer even-odd D-register pairs.
We are sometimes allocatinog from the DPair register class which contains odd-even pairs in addition to the Q registers. Place the Q registers first in the DPair allocation order as they can be copied with a single instruction. The odd-even pairs should only be allocated as a last resort. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153699 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/ARM/ARMRegisterInfo.td3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMRegisterInfo.td b/lib/Target/ARM/ARMRegisterInfo.td
index 1327fb840e..1466e983f3 100644
--- a/lib/Target/ARM/ARMRegisterInfo.td
+++ b/lib/Target/ARM/ARMRegisterInfo.td
@@ -314,7 +314,8 @@ def TuplesOE2D : RegisterTuples<[dsub_0, dsub_1],
def DPair : RegisterClass<"ARM", [v16i8, v8i16, v4i32, v2i64, v4f32, v2f64],
128, (interleave QPR, TuplesOE2D)> {
// Allocate starting at non-VFP2 registers D16-D31 first.
- let AltOrders = [(rotl DPair, 16)];
+ // Prefer even-odd pairs as they are easier to copy.
+ let AltOrders = [(add (rotl QPR, 8), (rotl DPair, 16))];
let AltOrderSelect = [{ return 1; }];
}