diff options
| author | 2015-11-20 15:08:11 +0000 | |
|---|---|---|
| committer | 2015-11-20 16:18:39 +0000 | |
| commit | f9d741e32c6f1629ce70eefc68d3363fa1cfd696 (patch) | |
| tree | 409005e5b1d01d2830c20421f8466125e110d6af /test/458-checker-instruction-simplification/src/Main.java | |
| parent | beb709a2607a00b5df33f0235f22ccdd876cee22 (diff) | |
Optimizing/ARM: Improve long shifts by 1.
Implement long
Shl(x,1) as LSLS+ADC,
Shr(x,1) as ASR+RRX and
UShr(x,1) as LSR+RRX.
Remove the simplification substituting Shl(x,1) with
ADD(x,x) as it interferes with some other optimizations
instead of helping them. And since it didn't help 64-bit
architectures anyway, codegen is the correct place for it.
This is now implemented for ARM and x86, so only mips32 can
be improved.
Change-Id: Idd14f23292198b2260189e1497ca5411b21743b3
Diffstat (limited to 'test/458-checker-instruction-simplification/src/Main.java')
| -rw-r--r-- | test/458-checker-instruction-simplification/src/Main.java | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/test/458-checker-instruction-simplification/src/Main.java b/test/458-checker-instruction-simplification/src/Main.java index c32d34aa6f..bad857c438 100644 --- a/test/458-checker-instruction-simplification/src/Main.java +++ b/test/458-checker-instruction-simplification/src/Main.java @@ -389,24 +389,6 @@ public class Main { return arg << 0; } - /// CHECK-START: int Main.Shl1(int) instruction_simplifier (before) - /// CHECK-DAG: <<Arg:i\d+>> ParameterValue - /// CHECK-DAG: <<Const1:i\d+>> IntConstant 1 - /// CHECK-DAG: <<Shl:i\d+>> Shl [<<Arg>>,<<Const1>>] - /// CHECK-DAG: Return [<<Shl>>] - - /// CHECK-START: int Main.Shl1(int) instruction_simplifier (after) - /// CHECK-DAG: <<Arg:i\d+>> ParameterValue - /// CHECK-DAG: <<Add:i\d+>> Add [<<Arg>>,<<Arg>>] - /// CHECK-DAG: Return [<<Add>>] - - /// CHECK-START: int Main.Shl1(int) instruction_simplifier (after) - /// CHECK-NOT: Shl - - public static int Shl1(int arg) { - return arg << 1; - } - /// CHECK-START: long Main.Shr0(long) instruction_simplifier (before) /// CHECK-DAG: <<Arg:j\d+>> ParameterValue /// CHECK-DAG: <<Const0:i\d+>> IntConstant 0 @@ -1274,7 +1256,6 @@ public class Main { assertDoubleEquals(Div2(150.0), 75.0); assertFloatEquals(DivMP25(100.0f), -400.0f); assertDoubleEquals(DivMP25(150.0), -600.0); - assertLongEquals(Shl1(100), 200); assertIntEquals(UShr28And15(0xc1234567), 0xc); assertLongEquals(UShr60And15(0xc123456787654321L), 0xcL); assertIntEquals(UShr28And7(0xc1234567), 0x4); |