summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-05-04 19:02:07 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-05-04 19:02:07 +0000
commitd7fd7bfc3128db6fe73f3150ce20038cc1a5e3ac (patch)
treedd2a1d38e89a5ed95852b042d195cc82375a3c0d /llvm/test/CodeGen
parent093a94cdaefa22c42e1a6013e6ac2209a40e00a5 (diff)
downloadbcm5719-llvm-d7fd7bfc3128db6fe73f3150ce20038cc1a5e3ac.tar.gz
bcm5719-llvm-d7fd7bfc3128db6fe73f3150ce20038cc1a5e3ac.zip
Explicitly request physreg coalesing for a bunch of Thumb2 unit tests.
These tests all follow the same pattern: mov r2, r0 movs r0, #0 $CMP r2, r1 it eq moveq r0, #1 bx lr The first 'mov' can be eliminated by rematerializing 'movs r0, #0' below the test instruction: $CMP r0, r1 mov.w r0, #0 it eq moveq r0, #1 bx lr So far, only physreg coalescing can do that. The register allocators won't yet split live ranges just to eliminate copies. They can learn, but this particular problem is not likely to show up in real code. It only appears because r0 is used for both the function argument and return value. llvm-svn: 130858
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/Thumb2/thumb2-cmn.ll5
-rw-r--r--llvm/test/CodeGen/Thumb2/thumb2-cmp.ll5
-rw-r--r--llvm/test/CodeGen/Thumb2/thumb2-cmp2.ll5
-rw-r--r--llvm/test/CodeGen/Thumb2/thumb2-teq.ll4
-rw-r--r--llvm/test/CodeGen/Thumb2/thumb2-teq2.ll5
-rw-r--r--llvm/test/CodeGen/Thumb2/thumb2-tst.ll4
-rw-r--r--llvm/test/CodeGen/Thumb2/thumb2-tst2.ll5
7 files changed, 26 insertions, 7 deletions
diff --git a/llvm/test/CodeGen/Thumb2/thumb2-cmn.ll b/llvm/test/CodeGen/Thumb2/thumb2-cmn.ll
index eeaaa7fbdf9..df221b945e2 100644
--- a/llvm/test/CodeGen/Thumb2/thumb2-cmn.ll
+++ b/llvm/test/CodeGen/Thumb2/thumb2-cmn.ll
@@ -1,4 +1,7 @@
-; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s
+; RUN: llc < %s -march=thumb -mattr=+thumb2 -join-physregs | FileCheck %s
+
+; These tests implicitly depend on 'movs r0, #0' being rematerialized below the
+; test as 'mov.w r0, #0'. So far, that requires physreg joining.
define i1 @f1(i32 %a, i32 %b) {
%nb = sub i32 0, %b
diff --git a/llvm/test/CodeGen/Thumb2/thumb2-cmp.ll b/llvm/test/CodeGen/Thumb2/thumb2-cmp.ll
index 63249f4cf14..da121140be2 100644
--- a/llvm/test/CodeGen/Thumb2/thumb2-cmp.ll
+++ b/llvm/test/CodeGen/Thumb2/thumb2-cmp.ll
@@ -1,4 +1,7 @@
-; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s
+; RUN: llc < %s -march=thumb -mattr=+thumb2 -join-physregs | FileCheck %s
+
+; These tests implicitly depend on 'movs r0, #0' being rematerialized below the
+; test as 'mov.w r0, #0'. So far, that requires physreg joining.
; 0x000000bb = 187
define i1 @f1(i32 %a) {
diff --git a/llvm/test/CodeGen/Thumb2/thumb2-cmp2.ll b/llvm/test/CodeGen/Thumb2/thumb2-cmp2.ll
index 55c321dc2b3..15052e00671 100644
--- a/llvm/test/CodeGen/Thumb2/thumb2-cmp2.ll
+++ b/llvm/test/CodeGen/Thumb2/thumb2-cmp2.ll
@@ -1,4 +1,7 @@
-; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s
+; RUN: llc < %s -march=thumb -mattr=+thumb2 -join-physregs | FileCheck %s
+
+; These tests implicitly depend on 'movs r0, #0' being rematerialized below the
+; test as 'mov.w r0, #0'. So far, that requires physreg joining.
define i1 @f1(i32 %a, i32 %b) {
; CHECK: f1:
diff --git a/llvm/test/CodeGen/Thumb2/thumb2-teq.ll b/llvm/test/CodeGen/Thumb2/thumb2-teq.ll
index 69f03837f4b..566408a6048 100644
--- a/llvm/test/CodeGen/Thumb2/thumb2-teq.ll
+++ b/llvm/test/CodeGen/Thumb2/thumb2-teq.ll
@@ -1,5 +1,7 @@
-; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s
+; RUN: llc < %s -march=thumb -mattr=+thumb2 -join-physregs | FileCheck %s
+; These tests implicitly depend on 'movs r0, #0' being rematerialized below the
+; test as 'mov.w r0, #0'. So far, that requires physreg joining.
; 0x000000bb = 187
define i1 @f1(i32 %a) {
diff --git a/llvm/test/CodeGen/Thumb2/thumb2-teq2.ll b/llvm/test/CodeGen/Thumb2/thumb2-teq2.ll
index 0f122f25384..cdd3489c50d 100644
--- a/llvm/test/CodeGen/Thumb2/thumb2-teq2.ll
+++ b/llvm/test/CodeGen/Thumb2/thumb2-teq2.ll
@@ -1,4 +1,7 @@
-; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s
+; RUN: llc < %s -march=thumb -mattr=+thumb2 -join-physregs | FileCheck %s
+
+; These tests implicitly depend on 'movs r0, #0' being rematerialized below the
+; tst as 'mov.w r0, #0'. So far, that requires physreg joining.
define i1 @f1(i32 %a, i32 %b) {
; CHECK: f1
diff --git a/llvm/test/CodeGen/Thumb2/thumb2-tst.ll b/llvm/test/CodeGen/Thumb2/thumb2-tst.ll
index d905217189f..47f553f2048 100644
--- a/llvm/test/CodeGen/Thumb2/thumb2-tst.ll
+++ b/llvm/test/CodeGen/Thumb2/thumb2-tst.ll
@@ -1,5 +1,7 @@
-; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s
+; RUN: llc < %s -march=thumb -mattr=+thumb2 -join-physregs | FileCheck %s
+; These tests implicitly depend on 'movs r0, #0' being rematerialized below the
+; tst as 'mov.w r0, #0'. So far, that requires physreg joining.
; 0x000000bb = 187
define i1 @f1(i32 %a) {
diff --git a/llvm/test/CodeGen/Thumb2/thumb2-tst2.ll b/llvm/test/CodeGen/Thumb2/thumb2-tst2.ll
index db202dd2cbc..405b3bb1d38 100644
--- a/llvm/test/CodeGen/Thumb2/thumb2-tst2.ll
+++ b/llvm/test/CodeGen/Thumb2/thumb2-tst2.ll
@@ -1,4 +1,7 @@
-; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s
+; RUN: llc < %s -march=thumb -mattr=+thumb2 -join-physregs | FileCheck %s
+
+; These tests implicitly depend on 'movs r0, #0' being rematerialized below the
+; tst as 'mov.w r0, #0'. So far, that requires physreg joining.
define i1 @f1(i32 %a, i32 %b) {
; CHECK: f1:
OpenPOWER on IntegriCloud