diff options
author | 2014-10-22 10:11:06 +0100 | |
---|---|---|
committer | 2014-10-22 10:11:06 +0100 | |
commit | b762d2ebf9dc604561d9915c96b377235c94960c (patch) | |
tree | aa6060b282db511651908d232a6b16ecbb22b755 /test/411-optimizing-arith/src/Main.java | |
parent | 4ff20eba94a2519e5bac57b5f92e04741ea90141 (diff) |
Various fixes related to integer negate operations.
- Emit an RSB instruction for HNeg nodes in the ARM code
generator instead of RSBS, as we do not need to update the
condition code flags in this case.
- Simply punt when trying to statically evaluate a long
unary operation, instead of aborting.
- Move a test case to the right place.
Change-Id: I35eb8dea58ed35258d4d8df77181159c3ab07b6f
Diffstat (limited to 'test/411-optimizing-arith/src/Main.java')
-rw-r--r-- | test/411-optimizing-arith/src/Main.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/411-optimizing-arith/src/Main.java b/test/411-optimizing-arith/src/Main.java index 2b3ba33a6a..ab8a83f115 100644 --- a/test/411-optimizing-arith/src/Main.java +++ b/test/411-optimizing-arith/src/Main.java @@ -52,8 +52,6 @@ public class Main { expectEquals(36L, $opt$Mul(-12L, -3L)); expectEquals(33L, $opt$Mul(1L, 3L) * 11); expectEquals(240518168583L, $opt$Mul(34359738369L, 7L)); // (2^35 + 1) * 7 - - $opt$InplaceNegOne(1); } public static void neg() { @@ -75,6 +73,8 @@ public class Main { // Overflow occurs in this case, but no exception is thrown. // For all integer values x, -x equals (~x)+1.'' expectEquals(-2147483648, $opt$Neg(-2147483648)); // -(2^31) + + $opt$InplaceNegOne(1); } public static void $opt$InplaceNegOne(int a) { |