diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2014-06-12 17:53:14 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2014-06-12 18:05:00 +0100 |
commit | e27f31a81636ad74bd3376ee39cf215941b85c0e (patch) | |
tree | 12dd6a1153b78b831c887f65f0bcef715e89719d /test/404-optimizing-allocator | |
parent | dfc2091d2fb8a7694f69acf8bd39ce4953e026c2 (diff) | |
download | art-e27f31a81636ad74bd3376ee39cf215941b85c0e.tar.gz art-e27f31a81636ad74bd3376ee39cf215941b85c0e.tar.bz2 art-e27f31a81636ad74bd3376ee39cf215941b85c0e.zip |
Enable the register allocator on ARM.
- Also fixes a few bugs/wrong assumptions in code not hit by x86.
- We need to differentiate between moves due to connecting siblings within
a block, and moves due to control flow resolution.
Change-Id: Idd05cf138a71c8f36f5531c473de613c0166fe38
Diffstat (limited to 'test/404-optimizing-allocator')
-rw-r--r-- | test/404-optimizing-allocator/src/Main.java | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/test/404-optimizing-allocator/src/Main.java b/test/404-optimizing-allocator/src/Main.java index 60477f9d8e..7b31820470 100644 --- a/test/404-optimizing-allocator/src/Main.java +++ b/test/404-optimizing-allocator/src/Main.java @@ -27,7 +27,8 @@ public class Main { expectEquals(10, $opt$reg$TestMultipleLive()); expectEquals(1, $opt$reg$TestWithBreakAndContinue()); expectEquals(-15, $opt$reg$testSpillInIf(5, 6, 7)); - expectEquals(-567, $opt$reg$TestAgressiveLive(1, 2, 3, 4, 5, 6, 7)); + expectEquals(-567, $opt$reg$TestAgressiveLive1(1, 2, 3, 4, 5, 6, 7)); + expectEquals(-77, $opt$reg$TestAgressiveLive2(1, 2, 3, 4, 5, 6, 7)); } public static int $opt$reg$TestLostCopy() { @@ -125,7 +126,7 @@ public class Main { return a - b - c - d - e; } - public static int $opt$reg$TestAgressiveLive(int a, int b, int c, int d, int e, int f, int g) { + public static int $opt$reg$TestAgressiveLive1(int a, int b, int c, int d, int e, int f, int g) { int h = a - b; int i = c - d; int j = e - f; @@ -146,6 +147,17 @@ public class Main { return a - b - c - d - e - f - g - h - i - j - k; } + public static int $opt$reg$TestAgressiveLive2(int a, int b, int c, int d, int e, int f, int g) { + int h = a - b; + int i = c - d; + int j = e - f; + int k = 42 + g - a; + do { + h++; + } while (h != 5); + return a - b - c - d - e - f - g - h - i - j - k; + } + public static void expectEquals(int expected, int value) { if (expected != value) { throw new Error("Expected: " + expected + ", got: " + value); |