mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8158228: C1 incorrectly folds mismatched loads from stable arrays
Disable constant folding for mismatched loads from stable arrays. Reviewed-by: vlivanov
This commit is contained in:
parent
e8ef37ca55
commit
e45caa8cba
4 changed files with 63 additions and 11 deletions
|
@ -4227,11 +4227,11 @@ void GraphBuilder::append_char_access(ciMethod* callee, bool is_store) {
|
|||
Value index = args->at(1);
|
||||
if (is_store) {
|
||||
Value value = args->at(2);
|
||||
Instruction* store = append(new StoreIndexed(array, index, NULL, T_CHAR, value, state_before, false));
|
||||
Instruction* store = append(new StoreIndexed(array, index, NULL, T_CHAR, value, state_before, false, true));
|
||||
store->set_flag(Instruction::NeedsRangeCheckFlag, false);
|
||||
_memory->store_value(value);
|
||||
} else {
|
||||
Instruction* load = append(new LoadIndexed(array, index, NULL, T_CHAR, state_before));
|
||||
Instruction* load = append(new LoadIndexed(array, index, NULL, T_CHAR, state_before, true));
|
||||
load->set_flag(Instruction::NeedsRangeCheckFlag, false);
|
||||
push(load->type(), load);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue