mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 03:58:21 +00:00
8371964: C2 compilation asserts with "Unexpected load/store size"
Reviewed-by: chagedorn, epeter
This commit is contained in:
parent
a62296d8a0
commit
ca4ae8063e
@ -22,6 +22,8 @@
|
||||
*/
|
||||
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "opto/c2_globals.hpp"
|
||||
#include "opto/compile.hpp"
|
||||
#include "opto/connode.hpp"
|
||||
#include "opto/convertnode.hpp"
|
||||
#include "opto/mulnode.hpp"
|
||||
@ -1145,7 +1147,14 @@ Node* LoadVectorMaskedNode::Ideal(PhaseGVN* phase, bool can_reshape) {
|
||||
if (ty && ty->is_con()) {
|
||||
BasicType mask_bt = Matcher::vector_element_basic_type(in(3));
|
||||
int load_sz = type2aelembytes(mask_bt) * ty->get_con();
|
||||
assert(load_sz <= MaxVectorSize, "Unexpected load size");
|
||||
if (load_sz > MaxVectorSize) {
|
||||
// After loop opts, cast nodes are aggressively removed, if the input is then transformed
|
||||
// into a constant that is outside the range of the removed cast, we may encounter it here.
|
||||
// This should be a dead node then.
|
||||
assert(Compile::current()->post_loop_opts_phase(), "Unexpected load size");
|
||||
return phase->C->top();
|
||||
}
|
||||
|
||||
if (load_sz == MaxVectorSize) {
|
||||
Node* ctr = in(MemNode::Control);
|
||||
Node* mem = in(MemNode::Memory);
|
||||
@ -1164,7 +1173,14 @@ Node* StoreVectorMaskedNode::Ideal(PhaseGVN* phase, bool can_reshape) {
|
||||
if (ty && ty->is_con()) {
|
||||
BasicType mask_bt = Matcher::vector_element_basic_type(in(4));
|
||||
int load_sz = type2aelembytes(mask_bt) * ty->get_con();
|
||||
assert(load_sz <= MaxVectorSize, "Unexpected store size");
|
||||
if (load_sz > MaxVectorSize) {
|
||||
// After loop opts, cast nodes are aggressively removed, if the input is then transformed
|
||||
// into a constant that is outside the range of the removed cast, we may encounter it here.
|
||||
// This should be a dead node then.
|
||||
assert(Compile::current()->post_loop_opts_phase(), "Unexpected store size");
|
||||
return phase->C->top();
|
||||
}
|
||||
|
||||
if (load_sz == MaxVectorSize) {
|
||||
Node* ctr = in(MemNode::Control);
|
||||
Node* mem = in(MemNode::Memory);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2025, Oracle and/or its affiliates. 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
|
||||
@ -26,7 +26,7 @@ import java.util.Random;
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @bug 8251871 8285301
|
||||
* @bug 8251871 8285301 8371964
|
||||
* @summary Optimize arrayCopy using AVX-512 masked instructions.
|
||||
*
|
||||
* @run main/othervm/timeout=600 -XX:-TieredCompilation -Xbatch -XX:+IgnoreUnrecognizedVMOptions
|
||||
@ -52,6 +52,9 @@ import java.util.Random;
|
||||
* compiler.arraycopy.TestArrayCopyDisjoint
|
||||
* @run main/othervm/timeout=600 -XX:-TieredCompilation -Xbatch -XX:+UnlockExperimentalVMOptions -XX:+AlwaysAtomicAccesses
|
||||
* compiler.arraycopy.TestArrayCopyDisjoint
|
||||
* @run main/othervm/timeout=600 -XX:-TieredCompilation -Xbatch -XX:+IgnoreUnrecognizedVMOptions
|
||||
* -XX:+UnlockDiagnosticVMOptions -XX:UseAVX=3 -XX:MaxVectorSize=32 -XX:ArrayOperationPartialInlineSize=32 -XX:+StressIGVN
|
||||
* compiler.arraycopy.TestArrayCopyDisjoint
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user