(use->IsStaticFieldSet() && (reference_ == use->InputAt(1))) ||
(use->IsUnresolvedStaticFieldSet() && (reference_ == use->InputAt(0))) ||
(use->IsArraySet() && (reference_ == use->InputAt(2)))) {
- // reference_ is merged to a phi/HSelect, passed to a callee, or stored to heap.
+ // reference_ is merged to HPhi/HSelect, passed to a callee, or stored to heap.
// reference_ isn't the only name that can refer to its value anymore.
is_singleton_ = false;
is_singleton_and_not_returned_ = false;
CreateReferenceInfoForReferenceType(instruction);
}
+ void VisitSelect(HSelect* instruction) OVERRIDE {
+ CreateReferenceInfoForReferenceType(instruction);
+ }
+
void VisitDeoptimize(HDeoptimize* instruction ATTRIBUTE_UNUSED) OVERRIDE {
may_deoptimize_ = true;
}
System.out.println("testFinalizableByForcingGc() failed to force gc.");
}
- /// CHECK-START: int Main.testHSelect(boolean) load_store_elimination (before)
+ /// CHECK-START: int Main.$noinline$testHSelect(boolean) load_store_elimination (before)
/// CHECK: InstanceFieldSet
/// CHECK: Select
- /// CHECK-START: int Main.testHSelect(boolean) load_store_elimination (after)
+ /// CHECK-START: int Main.$noinline$testHSelect(boolean) load_store_elimination (after)
/// CHECK: InstanceFieldSet
/// CHECK: Select
// Test that HSelect creates alias.
- public static int testHSelect(boolean b) {
- // Disable inlining.
- System.out.print("");
- System.out.print("");
- System.out.print("");
- System.out.print("");
- System.out.print("");
- System.out.print("");
- System.out.print("");
- System.out.print("");
- System.out.print("");
- System.out.print("");
-
+ public static int $noinline$testHSelect(boolean b) {
+ if (sFlag) {
+ throw new Error();
+ }
TestClass obj = new TestClass();
TestClass obj2 = null;
obj.i = 0xdead;
assertIntEquals(test23(false), 5);
assertFloatEquals(test24(), 8.0f);
testFinalizableByForcingGc();
- assertIntEquals(testHSelect(true), 0xdead);
+ assertIntEquals($noinline$testHSelect(true), 0xdead);
}
+
+ static boolean sFlag;
}