Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Merge
  • Loading branch information
JesperIRL committed Jan 19, 2021
2 parents 492bebc + bb0821e commit a1a851b6db47ed137ac722d2feca99f05db3472a
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 4 deletions.
@@ -229,7 +229,7 @@ void BFSClosure::do_oop(narrowOop* ref) {
}

void BFSClosure::do_root(UnifiedOopRef ref) {
assert(!ref.is_null(), "invariant");
assert(ref.dereference() != NULL, "pointee must not be null");
if (!_edge_queue->is_full()) {
_edge_queue->add(NULL, ref);
}
@@ -57,7 +57,7 @@ template <typename Delegate>
void RootSetClosure<Delegate>::do_oop(narrowOop* ref) {
assert(ref != NULL, "invariant");
assert(is_aligned(ref, sizeof(narrowOop)), "invariant");
if (CompressedOops::is_null(*ref)) {
if (!CompressedOops::is_null(*ref)) {
_delegate->do_root(UnifiedOopRef::encode_in_native(ref));
}
}
@@ -524,7 +524,6 @@ class JavaThreadInVMAndNative : public StackObj {
};

static void post_events(bool exception_handler, Thread* thread) {
DEBUG_ONLY(JfrJavaSupport::check_java_thread_in_vm(thread));
if (exception_handler) {
EventShutdown e;
e.set_reason("VM Error");
@@ -5020,7 +5020,7 @@ Node *PhaseIdealLoop::get_late_ctrl( Node *n, Node *early ) {
for (uint j = 1; j < s->req(); j++) {
Node* in = s->in(j);
Node* r_in = r->in(j);
if (worklist.member(in) && is_dominator(early, r_in)) {
if ((worklist.member(in) || in == mem) && is_dominator(early, r_in)) {
LCA = dom_lca_for_get_late_ctrl(LCA, r_in, n);
}
}
@@ -0,0 +1,95 @@
/*
* Copyright (c) 2021, Red Hat, Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/

/**
* @test
* @bug 8259641
* @summary C2: assert(early->dominates(LCA)) failed: early is high enough
*
* @run main/othervm -Xcomp -XX:CompileOnly=TestBrokenAntiDependenceWithPhi TestBrokenAntiDependenceWithPhi
*
*/

public class TestBrokenAntiDependenceWithPhi {

int a;
int b;
byte c;

long e(int f, int g, long h) {
int i[] = new int[a];
double j = 2.74886;
long k[][] = new long[a][a];
long l = checkSum(k);
return l;
}

void m() {
int s, o, p[] = new int[a];
double d;
for (d = 5; d < 388; d++) {
e(b, b, 40418347472393L);
for (s = 3; s < 66; ++s)
int1array(a, 9);
}
for (o = 6; o > 2; o--)
p[o] = c;
}

public static void main(String[] q) {
TestBrokenAntiDependenceWithPhi r = new TestBrokenAntiDependenceWithPhi();
try {
r.m();
} catch (ArrayIndexOutOfBoundsException aioobe) {
}
}

public static long checkSum(long[] a) {
long sum = 0;
for (int j = 0; j < a.length; j++) {
sum += (a[j] / (j + 1) + a[j] % (j + 1));
}
return sum;
}

public static long checkSum(long[][] a) {
long sum = 0;
for (int j = 0; j < a.length; j++) {
sum += checkSum(a[j]);
}
return sum;
}

public static int[] int1array(int sz, int seed) {
int[] ret = new int[sz];
init(ret, seed);
return ret;
}

public static void init(int[] a, int seed) {
for (int j = 0; j < a.length; j++) {
a[j] = (j % 2 == 0) ? seed + j : seed - j;
}
}

}

0 comments on commit a1a851b

Please sign in to comment.