Fixed
Status Update
Comments
bu...@google.com <bu...@google.com>
aj...@google.com <aj...@google.com> #2
This is the same as # 198697 even though errors are a bit different.
aj...@google.com <aj...@google.com> #3
Older bug that for some reason suddenly shows up in my buganizer list.
Test.instanceCount = 261745
Test.instanceCount = 261745
Description
public class Test extends FuzzerUtils {
public static final int N = 100;
public static long instanceCount=1L;
public static void main(String[] strArr) {
double d, dArr[]=new double[N];
int i, i1, i2;
init(dArr, -71.71433);
d = 1;
while (++d < 89) {
i1 = 1;
while (++i1 < 14) {
i2 = 1;
do {
Test.instanceCount -= (long)dArr[(int)(d + 1)];
} while ((i2 += 2) < i1);
}
}
System.out.println("Test.instanceCount = " + Test.instanceCount);
}
}
It prints:
Test.instanceCount = 249281
instead of:
Test.instanceCount = 261745
If I disable BCE as shown below:
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index 3eb7274..c5a076e 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -556,7 +556,6 @@ static void RunOptimizations(HGraph* graph,
gvn,
licm,
induction,
- bce,
fold3, // evaluates code generated by dynamic bce
simplify2,
lse,
then the problem is gone
To reproduce:
1. download latest AOSP
2. build aosp_arm
3. launch emulator
4. upload attached file classes.dex
5. run command adb shell "cd /data; dalvikvm -cp classes.dex Test"