diff --git a/src/hotspot/cpu/riscv/riscv.ad b/src/hotspot/cpu/riscv/riscv.ad index 6678d591625..568b9401dc3 100644 --- a/src/hotspot/cpu/riscv/riscv.ad +++ b/src/hotspot/cpu/riscv/riscv.ad @@ -2176,7 +2176,7 @@ bool Matcher::pd_clone_address_expressions(AddPNode* m, Matcher::MStack& mstack, encode %{ // BEGIN Non-volatile memory access - enc_class riscv_enc_li_imm(iRegIorL dst, immIorL src) %{ + enc_class riscv_enc_mov_imm(iRegIorL dst, immIorL src) %{ C2_MacroAssembler _masm(&cbuf); int64_t con = (int64_t)$src$$constant; Register dst_reg = as_Register($dst$$reg); @@ -4965,9 +4965,9 @@ instruct loadConI(iRegINoSp dst, immI src) match(Set dst src); ins_cost(ALU_COST); - format %{ "li $dst, $src\t# int, #@loadConI" %} + format %{ "mv $dst, $src\t# int, #@loadConI" %} - ins_encode(riscv_enc_li_imm(dst, src)); + ins_encode(riscv_enc_mov_imm(dst, src)); ins_pipe(ialu_imm); %} @@ -4978,9 +4978,9 @@ instruct loadConL(iRegLNoSp dst, immL src) match(Set dst src); ins_cost(ALU_COST); - format %{ "li $dst, $src\t# long, #@loadConL" %} + format %{ "mv $dst, $src\t# long, #@loadConL" %} - ins_encode(riscv_enc_li_imm(dst, src)); + ins_encode(riscv_enc_mov_imm(dst, src)); ins_pipe(ialu_imm); %} diff --git a/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java b/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java index 955ecd5b475..f6b7b1f9162 100644 --- a/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java +++ b/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java @@ -198,25 +198,25 @@ public class IRNode { public static final String ALLOC = PREFIX + "ALLOC" + POSTFIX; static { - String optoRegex = "(.*precise .*\\R((.*(?i:mov|xorl|nop|spill).*|\\s*)\\R)*.*(?i:call,static).*wrapper for: _new_instance_Java" + END; + String optoRegex = "(.*precise .*\\R((.*(?i:mov|mv|xorl|nop|spill).*|\\s*)\\R)*.*(?i:call,static).*wrapper for: _new_instance_Java" + END; allocNodes(ALLOC, "Allocate", optoRegex); } public static final String ALLOC_OF = COMPOSITE_PREFIX + "ALLOC_OF" + POSTFIX; static { - String regex = "(.*precise .*" + IS_REPLACED + ":.*\\R((.*(?i:mov|xorl|nop|spill).*|\\s*)\\R)*.*(?i:call,static).*wrapper for: _new_instance_Java" + END; + String regex = "(.*precise .*" + IS_REPLACED + ":.*\\R((.*(?i:mov|mv|xorl|nop|spill).*|\\s*)\\R)*.*(?i:call,static).*wrapper for: _new_instance_Java" + END; optoOnly(ALLOC_OF, regex); } public static final String ALLOC_ARRAY = PREFIX + "ALLOC_ARRAY" + POSTFIX; static { - String optoRegex = "(.*precise \\[.*\\R((.*(?i:mov|xor|nop|spill).*|\\s*|.*(LGHI|LI).*)\\R)*.*(?i:call,static).*wrapper for: _new_array_Java" + END; + String optoRegex = "(.*precise \\[.*\\R((.*(?i:mov|mv|xor|nop|spill).*|\\s*|.*(LGHI|LI).*)\\R)*.*(?i:call,static).*wrapper for: _new_array_Java" + END; allocNodes(ALLOC_ARRAY, "AllocateArray", optoRegex); } public static final String ALLOC_ARRAY_OF = COMPOSITE_PREFIX + "ALLOC_ARRAY_OF" + POSTFIX; static { - String regex = "(.*precise \\[.*" + IS_REPLACED + ":.*\\R((.*(?i:mov|xorl|nop|spill).*|\\s*|.*(LGHI|LI).*)\\R)*.*(?i:call,static).*wrapper for: _new_array_Java" + END; + String regex = "(.*precise \\[.*" + IS_REPLACED + ":.*\\R((.*(?i:mov|mv|xorl|nop|spill).*|\\s*|.*(LGHI|LI).*)\\R)*.*(?i:call,static).*wrapper for: _new_array_Java" + END; optoOnly(ALLOC_ARRAY_OF, regex); } @@ -277,13 +277,13 @@ public class IRNode { public static final String CHECKCAST_ARRAY = PREFIX + "CHECKCAST_ARRAY" + POSTFIX; static { - String regex = "(((?i:cmp|CLFI|CLR).*precise \\[.*:|.*(?i:mov|or).*precise \\[.*:.*\\R.*(cmp|CMP|CLR))" + END; + String regex = "(((?i:cmp|CLFI|CLR).*precise \\[.*:|.*(?i:mov|mv|or).*precise \\[.*:.*\\R.*(cmp|CMP|CLR))" + END; optoOnly(CHECKCAST_ARRAY, regex); } public static final String CHECKCAST_ARRAY_OF = COMPOSITE_PREFIX + "CHECKCAST_ARRAY_OF" + POSTFIX; static { - String regex = "(((?i:cmp|CLFI|CLR).*precise \\[.*" + IS_REPLACED + ":|.*(?i:mov|or).*precise \\[.*" + IS_REPLACED + ":.*\\R.*(cmp|CMP|CLR))" + END; + String regex = "(((?i:cmp|CLFI|CLR).*precise \\[.*" + IS_REPLACED + ":|.*(?i:mov|mv|or).*precise \\[.*" + IS_REPLACED + ":.*\\R.*(cmp|CMP|CLR))" + END; optoOnly(CHECKCAST_ARRAY_OF, regex); }