Skip to content

Commit 2c553fb

Browse files
author
duke
committedJun 2, 2020
Automatic merge of jdk:master into master
2 parents 363d7c6 + 5793b06 commit 2c553fb

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed
 

‎src/hotspot/share/opto/macro.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -977,8 +977,8 @@ void PhaseMacroExpand::process_users_of_allocation(CallNode *alloc) {
977977
if (ac->is_clonebasic()) {
978978
Node* membar_after = ac->proj_out(TypeFunc::Control)->unique_ctrl_out();
979979
disconnect_projections(ac, _igvn);
980-
assert(alloc->in(0)->is_Proj() && alloc->in(0)->in(0)->Opcode() == Op_MemBarCPUOrder, "mem barrier expected before allocation");
981-
Node* membar_before = alloc->in(0)->in(0);
980+
assert(alloc->in(TypeFunc::Memory)->is_Proj() && alloc->in(TypeFunc::Memory)->in(0)->Opcode() == Op_MemBarCPUOrder, "mem barrier expected before allocation");
981+
Node* membar_before = alloc->in(TypeFunc::Memory)->in(0);
982982
disconnect_projections(membar_before->as_MemBar(), _igvn);
983983
if (membar_after->is_MemBar()) {
984984
disconnect_projections(membar_after->as_MemBar(), _igvn);

‎test/hotspot/jtreg/compiler/arraycopy/TestEliminateArrayCopy.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -23,14 +23,17 @@
2323

2424
/*
2525
* @test
26-
* @bug 8076188
26+
* @bug 8076188 8246153
2727
* @summary arraycopy to non escaping destination may be eliminated
2828
* @library /
2929
*
3030
* @run main/othervm -ea -XX:-BackgroundCompilation -XX:-UseOnStackReplacement
3131
* -XX:CompileCommand=dontinline,compiler.arraycopy.TestEliminateArrayCopy*::m*
3232
* compiler.arraycopy.TestEliminateArrayCopy
33-
*
33+
* @run main/othervm -ea -XX:-BackgroundCompilation -XX:-UseOnStackReplacement
34+
* -XX:+IgnoreUnrecognizedVMOptions -XX:+StressReflectiveCode
35+
* -XX:CompileCommand=dontinline,compiler.arraycopy.TestEliminateArrayCopy*::m*
36+
* compiler.arraycopy.TestEliminateArrayCopy
3437
*/
3538

3639
package compiler.arraycopy;

0 commit comments

Comments
 (0)
Please sign in to comment.