1 Star 0 Fork 26

Alex Gao/openjdk-17

forked from src-openEuler/openjdk-17 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Backport-JDK-8327963-incorrect-result-of-C2-compiled-code.patch 845 Bytes
一键复制 编辑 原始数据 按行查看 历史
diff --git a/src/hotspot/share/opto/macro.cpp b/src/hotspot/share/opto/macro.cpp
index 69596ac80..cc92be234 100644
--- a/src/hotspot/share/opto/macro.cpp
+++ b/src/hotspot/share/opto/macro.cpp
@@ -1251,7 +1251,11 @@ void PhaseMacroExpand::expand_allocate_common(
if (!allocation_has_use) {
InitializeNode* init = alloc->initialization();
if (init != nullptr) {
- init->remove(&_igvn);
+ MemBarCPUOrderNode* membar = new MemBarCPUOrderNode(C, C->get_alias_index(init->adr_type()), nullptr);
+ membar->init_req(TypeFunc::Control, init->in(TypeFunc::Control));
+ membar->init_req(TypeFunc::Memory, init->in(TypeFunc::Memory));
+ transform_later(membar);
+ _igvn.replace_node(init, membar);
}
if (expand_fast_path && (initial_slow_test == nullptr)) {
// Remove allocation node and return.
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/gaoxiang90/openjdk-17.git
git@gitee.com:gaoxiang90/openjdk-17.git
gaoxiang90
openjdk-17
openjdk-17
master

搜索帮助