From be764a711c1bf489f54d5bdc8e5e3b1891ea13cd Mon Sep 17 00:00:00 2001 From: SUN Guoyun <40024232+sunny868@users.noreply.github.com> Date: Wed, 29 Mar 2023 17:18:59 +0000 Subject: [PATCH] 8302814: Delete unused CountLoopEnd instruct with CmpX Reviewed-by: kvn, fjiang --- src/hotspot/cpu/aarch64/aarch64.ad | 18 -- src/hotspot/cpu/riscv/riscv.ad | 408 ----------------------------- src/hotspot/cpu/x86/x86_32.ad | 60 ----- src/hotspot/cpu/x86/x86_64.ad | 60 ----- 4 files changed, 546 deletions(-) diff --git a/src/hotspot/cpu/aarch64/aarch64.ad b/src/hotspot/cpu/aarch64/aarch64.ad index cf62902359f..502bf80d49b 100644 --- a/src/hotspot/cpu/aarch64/aarch64.ad +++ b/src/hotspot/cpu/aarch64/aarch64.ad @@ -16573,25 +16573,7 @@ instruct branchLoopEnd(cmpOp cmp, rFlagsReg cr, label lbl) ins_pipe(pipe_branch); %} -// counted loop end branch near Unsigned -instruct branchLoopEndU(cmpOpU cmp, rFlagsRegU cr, label lbl) -%{ - match(CountedLoopEnd cmp cr); - - effect(USE lbl); - - ins_cost(BRANCH_COST); - // short variant. - // ins_short_branch(1); - format %{ "b$cmp $lbl \t// counted loop end unsigned" %} - - ins_encode(aarch64_enc_br_conU(cmp, lbl)); - - ins_pipe(pipe_branch); -%} - // counted loop end branch far -// counted loop end branch far unsigned // TODO: fixme // ============================================================================ diff --git a/src/hotspot/cpu/riscv/riscv.ad b/src/hotspot/cpu/riscv/riscv.ad index c370662d3e6..fe20a5c6054 100644 --- a/src/hotspot/cpu/riscv/riscv.ad +++ b/src/hotspot/cpu/riscv/riscv.ad @@ -8905,26 +8905,6 @@ instruct cmpU_branch(cmpOpU cmp, iRegI op1, iRegI op2, label lbl) ins_short_branch(1); %} -instruct cmpU_loop(cmpOpU cmp, iRegI op1, iRegI op2, label lbl) -%{ - // Same match rule as `far_cmpU_loop'. - match(CountedLoopEnd cmp (CmpU op1 op2)); - - effect(USE lbl); - - ins_cost(BRANCH_COST); - - format %{ "b$cmp $op1, $op2, $lbl\t#@cmpU_loop" %} - - ins_encode %{ - __ cmp_branch($cmp$$cmpcode | C2_MacroAssembler::unsigned_branch_mask, as_Register($op1$$reg), - as_Register($op2$$reg), *($lbl$$label)); - %} - - ins_pipe(pipe_cmp_branch); - ins_short_branch(1); -%} - // Compare signed long and branch near instructions instruct cmpL_branch(cmpOp cmp, iRegL op1, iRegL op2, label lbl) %{ @@ -8984,25 +8964,6 @@ instruct cmpUL_branch(cmpOpU cmp, iRegL op1, iRegL op2, label lbl) ins_short_branch(1); %} -instruct cmpUL_loop(cmpOpU cmp, iRegL op1, iRegL op2, label lbl) -%{ - // Same match rule as `far_cmpUL_loop'. - match(CountedLoopEnd cmp (CmpUL op1 op2)); - - effect(USE lbl); - - ins_cost(BRANCH_COST); - format %{ "b$cmp $op1, $op2, $lbl\t#@cmpUL_loop" %} - - ins_encode %{ - __ cmp_branch($cmp$$cmpcode | C2_MacroAssembler::unsigned_branch_mask, as_Register($op1$$reg), - as_Register($op2$$reg), *($lbl$$label)); - %} - - ins_pipe(pipe_cmp_branch); - ins_short_branch(1); -%} - // Compare pointer and branch near instructions instruct cmpP_branch(cmpOpU cmp, iRegP op1, iRegP op2, label lbl) %{ @@ -9024,26 +8985,6 @@ instruct cmpP_branch(cmpOpU cmp, iRegP op1, iRegP op2, label lbl) ins_short_branch(1); %} -instruct cmpP_loop(cmpOpU cmp, iRegP op1, iRegP op2, label lbl) -%{ - // Same match rule as `far_cmpP_loop'. - match(CountedLoopEnd cmp (CmpP op1 op2)); - - effect(USE lbl); - - ins_cost(BRANCH_COST); - - format %{ "b$cmp $op1, $op2, $lbl\t#@cmpP_loop" %} - - ins_encode %{ - __ cmp_branch($cmp$$cmpcode | C2_MacroAssembler::unsigned_branch_mask, as_Register($op1$$reg), - as_Register($op2$$reg), *($lbl$$label)); - %} - - ins_pipe(pipe_cmp_branch); - ins_short_branch(1); -%} - // Compare narrow pointer and branch near instructions instruct cmpN_branch(cmpOpU cmp, iRegN op1, iRegN op2, label lbl) %{ @@ -9065,26 +9006,6 @@ instruct cmpN_branch(cmpOpU cmp, iRegN op1, iRegN op2, label lbl) ins_short_branch(1); %} -instruct cmpN_loop(cmpOpU cmp, iRegN op1, iRegN op2, label lbl) -%{ - // Same match rule as `far_cmpN_loop'. - match(CountedLoopEnd cmp (CmpN op1 op2)); - - effect(USE lbl); - - ins_cost(BRANCH_COST); - - format %{ "b$cmp $op1, $op2, $lbl\t#@cmpN_loop" %} - - ins_encode %{ - __ cmp_branch($cmp$$cmpcode | C2_MacroAssembler::unsigned_branch_mask, as_Register($op1$$reg), - as_Register($op2$$reg), *($lbl$$label)); - %} - - ins_pipe(pipe_cmp_branch); - ins_short_branch(1); -%} - // Compare float and branch near instructions instruct cmpF_branch(cmpOp cmp, fRegF op1, fRegF op2, label lbl) %{ @@ -9104,23 +9025,6 @@ instruct cmpF_branch(cmpOp cmp, fRegF op1, fRegF op2, label lbl) ins_short_branch(1); %} -instruct cmpF_loop(cmpOp cmp, fRegF op1, fRegF op2, label lbl) -%{ - // Same match rule as `far_cmpF_loop'. - match(CountedLoopEnd cmp (CmpF op1 op2)); - effect(USE lbl); - - ins_cost(XFER_COST + BRANCH_COST); - format %{ "float_b$cmp $op1, $op2, $lbl\t#@cmpF_loop"%} - - ins_encode %{ - __ float_cmp_branch($cmp$$cmpcode, as_FloatRegister($op1$$reg), as_FloatRegister($op2$$reg), *($lbl$$label)); - %} - - ins_pipe(pipe_class_compare); - ins_short_branch(1); -%} - // Compare double and branch near instructions instruct cmpD_branch(cmpOp cmp, fRegD op1, fRegD op2, label lbl) %{ @@ -9140,24 +9044,6 @@ instruct cmpD_branch(cmpOp cmp, fRegD op1, fRegD op2, label lbl) ins_short_branch(1); %} -instruct cmpD_loop(cmpOp cmp, fRegD op1, fRegD op2, label lbl) -%{ - // Same match rule as `far_cmpD_loop'. - match(CountedLoopEnd cmp (CmpD op1 op2)); - effect(USE lbl); - - ins_cost(XFER_COST + BRANCH_COST); - format %{ "double_b$cmp $op1, $op2, $lbl\t#@cmpD_loop"%} - - ins_encode %{ - __ float_cmp_branch($cmp$$cmpcode | C2_MacroAssembler::double_branch_mask, as_FloatRegister($op1$$reg), - as_FloatRegister($op2$$reg), *($lbl$$label)); - %} - - ins_pipe(pipe_class_compare); - ins_short_branch(1); -%} - // Compare signed int with zero and branch near instructions instruct cmpI_reg_imm0_branch(cmpOp cmp, iRegI op1, immI0 zero, label lbl) %{ @@ -9216,26 +9102,6 @@ instruct cmpUEqNeLeGt_reg_imm0_branch(cmpOpUEqNeLeGt cmp, iRegI op1, immI0 zero, ins_short_branch(1); %} -instruct cmpUEqNeLeGt_reg_imm0_loop(cmpOpUEqNeLeGt cmp, iRegI op1, immI0 zero, label lbl) -%{ - // Same match rule as `far_cmpUEqNeLeGt_reg_imm0_loop'. - match(CountedLoopEnd cmp (CmpU op1 zero)); - - effect(USE op1, USE lbl); - - ins_cost(BRANCH_COST); - - format %{ "b$cmp $op1, zr, $lbl\t#@cmpUEqNeLeGt_reg_imm0_loop" %} - - - ins_encode %{ - __ enc_cmpUEqNeLeGt_imm0_branch($cmp$$cmpcode, as_Register($op1$$reg), *($lbl$$label)); - %} - - ins_pipe(pipe_cmpz_branch); - ins_short_branch(1); -%} - // Compare signed long with zero and branch near instructions instruct cmpL_reg_imm0_branch(cmpOp cmp, iRegL op1, immL0 zero, label lbl) %{ @@ -9295,25 +9161,6 @@ instruct cmpULEqNeLeGt_reg_imm0_branch(cmpOpUEqNeLeGt cmp, iRegL op1, immL0 zero ins_short_branch(1); %} -instruct cmpULEqNeLeGt_reg_imm0_loop(cmpOpUEqNeLeGt cmp, iRegL op1, immL0 zero, label lbl) -%{ - // Same match rule as `far_cmpULEqNeLeGt_reg_imm0_loop'. - match(CountedLoopEnd cmp (CmpUL op1 zero)); - - effect(USE op1, USE lbl); - - ins_cost(BRANCH_COST); - - format %{ "b$cmp $op1, zr, $lbl\t#@cmpULEqNeLeGt_reg_imm0_loop" %} - - ins_encode %{ - __ enc_cmpUEqNeLeGt_imm0_branch($cmp$$cmpcode, as_Register($op1$$reg), *($lbl$$label)); - %} - - ins_pipe(pipe_cmpz_branch); - ins_short_branch(1); -%} - // Compare pointer with zero and branch near instructions instruct cmpP_imm0_branch(cmpOpEqNe cmp, iRegP op1, immP0 zero, label lbl) %{ // Same match rule as `far_cmpP_reg_imm0_branch'. @@ -9331,22 +9178,6 @@ instruct cmpP_imm0_branch(cmpOpEqNe cmp, iRegP op1, immP0 zero, label lbl) %{ ins_short_branch(1); %} -instruct cmpP_imm0_loop(cmpOpEqNe cmp, iRegP op1, immP0 zero, label lbl) %{ - // Same match rule as `far_cmpP_reg_imm0_loop'. - match(CountedLoopEnd cmp (CmpP op1 zero)); - effect(USE lbl); - - ins_cost(BRANCH_COST); - format %{ "b$cmp $op1, zr, $lbl\t#@cmpP_imm0_loop" %} - - ins_encode %{ - __ enc_cmpEqNe_imm0_branch($cmp$$cmpcode, as_Register($op1$$reg), *($lbl$$label)); - %} - - ins_pipe(pipe_cmpz_branch); - ins_short_branch(1); -%} - // Compare narrow pointer with zero and branch near instructions instruct cmpN_imm0_branch(cmpOpEqNe cmp, iRegN op1, immN0 zero, label lbl) %{ // Same match rule as `far_cmpN_reg_imm0_branch'. @@ -9365,23 +9196,6 @@ instruct cmpN_imm0_branch(cmpOpEqNe cmp, iRegN op1, immN0 zero, label lbl) %{ ins_short_branch(1); %} -instruct cmpN_imm0_loop(cmpOpEqNe cmp, iRegN op1, immN0 zero, label lbl) %{ - // Same match rule as `far_cmpN_reg_imm0_loop'. - match(CountedLoopEnd cmp (CmpN op1 zero)); - effect(USE lbl); - - ins_cost(BRANCH_COST); - - format %{ "b$cmp $op1, zr, $lbl\t#@cmpN_imm0_loop" %} - - ins_encode %{ - __ enc_cmpEqNe_imm0_branch($cmp$$cmpcode, as_Register($op1$$reg), *($lbl$$label)); - %} - - ins_pipe(pipe_cmpz_branch); - ins_short_branch(1); -%} - // Compare narrow pointer with pointer zero and branch near instructions instruct cmpP_narrowOop_imm0_branch(cmpOpEqNe cmp, iRegN op1, immP0 zero, label lbl) %{ // Same match rule as `far_cmpP_narrowOop_imm0_branch'. @@ -9399,22 +9213,6 @@ instruct cmpP_narrowOop_imm0_branch(cmpOpEqNe cmp, iRegN op1, immP0 zero, label ins_short_branch(1); %} -instruct cmpP_narrowOop_imm0_loop(cmpOpEqNe cmp, iRegN op1, immP0 zero, label lbl) %{ - // Same match rule as `far_cmpP_narrowOop_imm0_loop'. - match(CountedLoopEnd cmp (CmpP (DecodeN op1) zero)); - effect(USE lbl); - - ins_cost(BRANCH_COST); - format %{ "b$cmp $op1, zr, $lbl\t#@cmpP_narrowOop_imm0_loop" %} - - ins_encode %{ - __ enc_cmpEqNe_imm0_branch($cmp$$cmpcode, as_Register($op1$$reg), *($lbl$$label)); - %} - - ins_pipe(pipe_cmpz_branch); - ins_short_branch(1); -%} - // Patterns for far (20KiB) variants instruct far_cmpFlag_branch(cmpOp cmp, rFlagsReg cr, label lbl) %{ @@ -9478,21 +9276,6 @@ instruct far_cmpU_branch(cmpOpU cmp, iRegI op1, iRegI op2, label lbl) %{ ins_pipe(pipe_cmp_branch); %} -instruct far_cmpU_loop(cmpOpU cmp, iRegI op1, iRegI op2, label lbl) %{ - match(CountedLoopEnd cmp (CmpU op1 op2)); - effect(USE lbl); - - ins_cost(BRANCH_COST * 2); - format %{ "far_b$cmp $op1, $op2, $lbl\t#@far_cmpU_loop" %} - - ins_encode %{ - __ cmp_branch($cmp$$cmpcode | C2_MacroAssembler::unsigned_branch_mask, as_Register($op1$$reg), - as_Register($op2$$reg), *($lbl$$label), /* is_far */ true); - %} - - ins_pipe(pipe_cmp_branch); -%} - instruct far_cmpL_branch(cmpOp cmp, iRegL op1, iRegL op2, label lbl) %{ match(If cmp (CmpL op1 op2)); effect(USE lbl); @@ -9536,21 +9319,6 @@ instruct far_cmpUL_branch(cmpOpU cmp, iRegL op1, iRegL op2, label lbl) %{ ins_pipe(pipe_cmp_branch); %} -instruct far_cmpUL_loop(cmpOpU cmp, iRegL op1, iRegL op2, label lbl) %{ - match(CountedLoopEnd cmp (CmpUL op1 op2)); - effect(USE lbl); - - ins_cost(BRANCH_COST * 2); - format %{ "far_b$cmp $op1, $op2, $lbl\t#@far_cmpUL_loop" %} - - ins_encode %{ - __ cmp_branch($cmp$$cmpcode | C2_MacroAssembler::unsigned_branch_mask, as_Register($op1$$reg), - as_Register($op2$$reg), *($lbl$$label), /* is_far */ true); - %} - - ins_pipe(pipe_cmp_branch); -%} - instruct far_cmpP_branch(cmpOpU cmp, iRegP op1, iRegP op2, label lbl) %{ match(If cmp (CmpP op1 op2)); @@ -9569,24 +9337,6 @@ instruct far_cmpP_branch(cmpOpU cmp, iRegP op1, iRegP op2, label lbl) ins_pipe(pipe_cmp_branch); %} -instruct far_cmpP_loop(cmpOpU cmp, iRegP op1, iRegP op2, label lbl) -%{ - match(CountedLoopEnd cmp (CmpP op1 op2)); - - effect(USE lbl); - - ins_cost(BRANCH_COST * 2); - - format %{ "far_b$cmp $op1, $op2, $lbl\t#@far_cmpP_loop" %} - - ins_encode %{ - __ cmp_branch($cmp$$cmpcode | C2_MacroAssembler::unsigned_branch_mask, as_Register($op1$$reg), - as_Register($op2$$reg), *($lbl$$label), /* is_far */ true); - %} - - ins_pipe(pipe_cmp_branch); -%} - instruct far_cmpN_branch(cmpOpU cmp, iRegN op1, iRegN op2, label lbl) %{ match(If cmp (CmpN op1 op2)); @@ -9605,24 +9355,6 @@ instruct far_cmpN_branch(cmpOpU cmp, iRegN op1, iRegN op2, label lbl) ins_pipe(pipe_cmp_branch); %} -instruct far_cmpN_loop(cmpOpU cmp, iRegN op1, iRegN op2, label lbl) -%{ - match(CountedLoopEnd cmp (CmpN op1 op2)); - - effect(USE lbl); - - ins_cost(BRANCH_COST * 2); - - format %{ "far_b$cmp $op1, $op2, $lbl\t#@far_cmpN_loop" %} - - ins_encode %{ - __ cmp_branch($cmp$$cmpcode | C2_MacroAssembler::unsigned_branch_mask, as_Register($op1$$reg), - as_Register($op2$$reg), *($lbl$$label), /* is_far */ true); - %} - - ins_pipe(pipe_cmp_branch); -%} - // Float compare and branch instructions instruct far_cmpF_branch(cmpOp cmp, fRegF op1, fRegF op2, label lbl) %{ @@ -9641,22 +9373,6 @@ instruct far_cmpF_branch(cmpOp cmp, fRegF op1, fRegF op2, label lbl) ins_pipe(pipe_class_compare); %} -instruct far_cmpF_loop(cmpOp cmp, fRegF op1, fRegF op2, label lbl) -%{ - match(CountedLoopEnd cmp (CmpF op1 op2)); - effect(USE lbl); - - ins_cost(XFER_COST + BRANCH_COST * 2); - format %{ "far_float_b$cmp $op1, $op2, $lbl\t#@far_cmpF_loop"%} - - ins_encode %{ - __ float_cmp_branch($cmp$$cmpcode, as_FloatRegister($op1$$reg), as_FloatRegister($op2$$reg), - *($lbl$$label), /* is_far */ true); - %} - - ins_pipe(pipe_class_compare); -%} - // Double compare and branch instructions instruct far_cmpD_branch(cmpOp cmp, fRegD op1, fRegD op2, label lbl) %{ @@ -9674,22 +9390,6 @@ instruct far_cmpD_branch(cmpOp cmp, fRegD op1, fRegD op2, label lbl) ins_pipe(pipe_class_compare); %} -instruct far_cmpD_loop(cmpOp cmp, fRegD op1, fRegD op2, label lbl) -%{ - match(CountedLoopEnd cmp (CmpD op1 op2)); - effect(USE lbl); - - ins_cost(XFER_COST + BRANCH_COST * 2); - format %{ "far_double_b$cmp $op1, $op2, $lbl\t#@far_cmpD_loop"%} - - ins_encode %{ - __ float_cmp_branch($cmp$$cmpcode | C2_MacroAssembler::double_branch_mask, as_FloatRegister($op1$$reg), - as_FloatRegister($op2$$reg), *($lbl$$label), /* is_far */ true); - %} - - ins_pipe(pipe_class_compare); -%} - instruct far_cmpI_reg_imm0_branch(cmpOp cmp, iRegI op1, immI0 zero, label lbl) %{ match(If cmp (CmpI op1 zero)); @@ -9741,24 +9441,6 @@ instruct far_cmpUEqNeLeGt_imm0_branch(cmpOpUEqNeLeGt cmp, iRegI op1, immI0 zero, ins_pipe(pipe_cmpz_branch); %} -instruct far_cmpUEqNeLeGt_reg_imm0_loop(cmpOpUEqNeLeGt cmp, iRegI op1, immI0 zero, label lbl) -%{ - match(CountedLoopEnd cmp (CmpU op1 zero)); - - effect(USE op1, USE lbl); - - ins_cost(BRANCH_COST * 2); - - format %{ "far_b$cmp $op1, zr, $lbl\t#@far_cmpUEqNeLeGt_reg_imm0_loop" %} - - - ins_encode %{ - __ enc_cmpUEqNeLeGt_imm0_branch($cmp$$cmpcode, as_Register($op1$$reg), *($lbl$$label), /* is_far */ true); - %} - - ins_pipe(pipe_cmpz_branch); -%} - // compare lt/ge unsigned instructs has no short instruct with same match instruct far_cmpULtGe_reg_imm0_branch(cmpOpULtGe cmp, iRegI op1, immI0 zero, label lbl) %{ @@ -9775,21 +9457,6 @@ instruct far_cmpULtGe_reg_imm0_branch(cmpOpULtGe cmp, iRegI op1, immI0 zero, lab ins_pipe(pipe_cmpz_branch); %} -instruct far_cmpULtGe_reg_imm0_loop(cmpOpULtGe cmp, iRegI op1, immI0 zero, label lbl) -%{ - match(CountedLoopEnd cmp (CmpU op1 zero)); - - effect(USE op1, USE lbl); - - ins_cost(BRANCH_COST); - - format %{ "j $lbl if $cmp == ge\t#@far_cmpULtGe_reg_imm0_loop" %} - - ins_encode(riscv_enc_far_cmpULtGe_imm0_branch(cmp, op1, lbl)); - - ins_pipe(pipe_cmpz_branch); -%} - instruct far_cmpL_reg_imm0_branch(cmpOp cmp, iRegL op1, immL0 zero, label lbl) %{ match(If cmp (CmpL op1 zero)); @@ -9841,23 +9508,6 @@ instruct far_cmpULEqNeLeGt_reg_imm0_branch(cmpOpUEqNeLeGt cmp, iRegL op1, immL0 ins_pipe(pipe_cmpz_branch); %} -instruct far_cmpULEqNeLeGt_reg_imm0_loop(cmpOpUEqNeLeGt cmp, iRegL op1, immL0 zero, label lbl) -%{ - match(CountedLoopEnd cmp (CmpUL op1 zero)); - - effect(USE op1, USE lbl); - - ins_cost(BRANCH_COST * 2); - - format %{ "far_b$cmp $op1, zr, $lbl\t#@far_cmpULEqNeLeGt_reg_imm0_loop" %} - - ins_encode %{ - __ enc_cmpUEqNeLeGt_imm0_branch($cmp$$cmpcode, as_Register($op1$$reg), *($lbl$$label), /* is_far */ true); - %} - - ins_pipe(pipe_cmpz_branch); -%} - // compare lt/ge unsigned instructs has no short instruct with same match instruct far_cmpULLtGe_reg_imm0_branch(cmpOpULtGe cmp, iRegL op1, immL0 zero, label lbl) %{ @@ -9874,21 +9524,6 @@ instruct far_cmpULLtGe_reg_imm0_branch(cmpOpULtGe cmp, iRegL op1, immL0 zero, la ins_pipe(pipe_cmpz_branch); %} -instruct far_cmpULLtGe_reg_imm0_loop(cmpOpULtGe cmp, iRegL op1, immL0 zero, label lbl) -%{ - match(CountedLoopEnd cmp (CmpUL op1 zero)); - - effect(USE op1, USE lbl); - - ins_cost(BRANCH_COST); - - format %{ "j $lbl if $cmp == ge\t#@far_cmpULLtGe_reg_imm0_loop" %} - - ins_encode(riscv_enc_far_cmpULtGe_imm0_branch(cmp, op1, lbl)); - - ins_pipe(pipe_cmpz_branch); -%} - instruct far_cmpP_imm0_branch(cmpOpEqNe cmp, iRegP op1, immP0 zero, label lbl) %{ match(If cmp (CmpP op1 zero)); effect(USE lbl); @@ -9903,20 +9538,6 @@ instruct far_cmpP_imm0_branch(cmpOpEqNe cmp, iRegP op1, immP0 zero, label lbl) % ins_pipe(pipe_cmpz_branch); %} -instruct far_cmpP_imm0_loop(cmpOpEqNe cmp, iRegP op1, immP0 zero, label lbl) %{ - match(CountedLoopEnd cmp (CmpP op1 zero)); - effect(USE lbl); - - ins_cost(BRANCH_COST * 2); - format %{ "far_b$cmp $op1, zr, $lbl\t#@far_cmpP_imm0_loop" %} - - ins_encode %{ - __ enc_cmpEqNe_imm0_branch($cmp$$cmpcode, as_Register($op1$$reg), *($lbl$$label), /* is_far */ true); - %} - - ins_pipe(pipe_cmpz_branch); -%} - instruct far_cmpN_imm0_branch(cmpOpEqNe cmp, iRegN op1, immN0 zero, label lbl) %{ match(If cmp (CmpN op1 zero)); effect(USE lbl); @@ -9932,21 +9553,6 @@ instruct far_cmpN_imm0_branch(cmpOpEqNe cmp, iRegN op1, immN0 zero, label lbl) % ins_pipe(pipe_cmpz_branch); %} -instruct far_cmpN_imm0_loop(cmpOpEqNe cmp, iRegN op1, immN0 zero, label lbl) %{ - match(CountedLoopEnd cmp (CmpN op1 zero)); - effect(USE lbl); - - ins_cost(BRANCH_COST * 2); - - format %{ "far_b$cmp $op1, zr, $lbl\t#@far_cmpN_imm0_loop" %} - - ins_encode %{ - __ enc_cmpEqNe_imm0_branch($cmp$$cmpcode, as_Register($op1$$reg), *($lbl$$label), /* is_far */ true); - %} - - ins_pipe(pipe_cmpz_branch); -%} - instruct far_cmpP_narrowOop_imm0_branch(cmpOpEqNe cmp, iRegN op1, immP0 zero, label lbl) %{ match(If cmp (CmpP (DecodeN op1) zero)); effect(USE lbl); @@ -9961,20 +9567,6 @@ instruct far_cmpP_narrowOop_imm0_branch(cmpOpEqNe cmp, iRegN op1, immP0 zero, la ins_pipe(pipe_cmpz_branch); %} -instruct far_cmpP_narrowOop_imm0_loop(cmpOpEqNe cmp, iRegN op1, immP0 zero, label lbl) %{ - match(CountedLoopEnd cmp (CmpP (DecodeN op1) zero)); - effect(USE lbl); - - ins_cost(BRANCH_COST * 2); - format %{ "far_b$cmp $op1, zr, $lbl\t#@far_cmpP_narrowOop_imm0_loop" %} - - ins_encode %{ - __ enc_cmpEqNe_imm0_branch($cmp$$cmpcode, as_Register($op1$$reg), *($lbl$$label), /* is_far */ true); - %} - - ins_pipe(pipe_cmpz_branch); -%} - // ============================================================================ // Conditional Move Instructions instruct cmovI_cmpI(iRegINoSp dst, iRegI src, iRegI op1, iRegI op2, cmpOp cop) %{ diff --git a/src/hotspot/cpu/x86/x86_32.ad b/src/hotspot/cpu/x86/x86_32.ad index 979494e4cb1..46e489f45e5 100644 --- a/src/hotspot/cpu/x86/x86_32.ad +++ b/src/hotspot/cpu/x86/x86_32.ad @@ -12681,35 +12681,6 @@ instruct jmpLoopEnd(cmpOp cop, eFlagsReg cr, label labl) %{ ins_pipe( pipe_jcc ); %} -// Jump Direct Conditional - Label defines a relative address from Jcc+1 -instruct jmpLoopEndU(cmpOpU cop, eFlagsRegU cmp, label labl) %{ - match(CountedLoopEnd cop cmp); - effect(USE labl); - - ins_cost(300); - format %{ "J$cop,u $labl\t# Loop end" %} - size(6); - ins_encode %{ - Label* L = $labl$$label; - __ jcc((Assembler::Condition)($cop$$cmpcode), *L, false); // Always long jump - %} - ins_pipe( pipe_jcc ); -%} - -instruct jmpLoopEndUCF(cmpOpUCF cop, eFlagsRegUCF cmp, label labl) %{ - match(CountedLoopEnd cop cmp); - effect(USE labl); - - ins_cost(200); - format %{ "J$cop,u $labl\t# Loop end" %} - size(6); - ins_encode %{ - Label* L = $labl$$label; - __ jcc((Assembler::Condition)($cop$$cmpcode), *L, false); // Always long jump - %} - ins_pipe( pipe_jcc ); -%} - // Jump Direct Conditional - using unsigned comparison instruct jmpConU(cmpOpU cop, eFlagsRegU cmp, label labl) %{ match(If cop cmp); @@ -12873,37 +12844,6 @@ instruct jmpLoopEnd_short(cmpOp cop, eFlagsReg cr, label labl) %{ ins_short_branch(1); %} -// Jump Direct Conditional - Label defines a relative address from Jcc+1 -instruct jmpLoopEndU_short(cmpOpU cop, eFlagsRegU cmp, label labl) %{ - match(CountedLoopEnd cop cmp); - effect(USE labl); - - ins_cost(300); - format %{ "J$cop,us $labl\t# Loop end" %} - size(2); - ins_encode %{ - Label* L = $labl$$label; - __ jccb((Assembler::Condition)($cop$$cmpcode), *L); - %} - ins_pipe( pipe_jcc ); - ins_short_branch(1); -%} - -instruct jmpLoopEndUCF_short(cmpOpUCF cop, eFlagsRegUCF cmp, label labl) %{ - match(CountedLoopEnd cop cmp); - effect(USE labl); - - ins_cost(300); - format %{ "J$cop,us $labl\t# Loop end" %} - size(2); - ins_encode %{ - Label* L = $labl$$label; - __ jccb((Assembler::Condition)($cop$$cmpcode), *L); - %} - ins_pipe( pipe_jcc ); - ins_short_branch(1); -%} - // Jump Direct Conditional - using unsigned comparison instruct jmpConU_short(cmpOpU cop, eFlagsRegU cmp, label labl) %{ match(If cop cmp); diff --git a/src/hotspot/cpu/x86/x86_64.ad b/src/hotspot/cpu/x86/x86_64.ad index 5d48c95ddbb..aed84b0e5b7 100644 --- a/src/hotspot/cpu/x86/x86_64.ad +++ b/src/hotspot/cpu/x86/x86_64.ad @@ -13053,35 +13053,6 @@ instruct jmpLoopEnd(cmpOp cop, rFlagsReg cr, label labl) ins_pipe(pipe_jcc); %} -// Jump Direct Conditional - Label defines a relative address from Jcc+1 -instruct jmpLoopEndU(cmpOpU cop, rFlagsRegU cmp, label labl) %{ - match(CountedLoopEnd cop cmp); - effect(USE labl); - - ins_cost(300); - format %{ "j$cop,u $labl\t# loop end" %} - size(6); - ins_encode %{ - Label* L = $labl$$label; - __ jcc((Assembler::Condition)($cop$$cmpcode), *L, false); // Always long jump - %} - ins_pipe(pipe_jcc); -%} - -instruct jmpLoopEndUCF(cmpOpUCF cop, rFlagsRegUCF cmp, label labl) %{ - match(CountedLoopEnd cop cmp); - effect(USE labl); - - ins_cost(200); - format %{ "j$cop,u $labl\t# loop end" %} - size(6); - ins_encode %{ - Label* L = $labl$$label; - __ jcc((Assembler::Condition)($cop$$cmpcode), *L, false); // Always long jump - %} - ins_pipe(pipe_jcc); -%} - // Jump Direct Conditional - using unsigned comparison instruct jmpConU(cmpOpU cop, rFlagsRegU cmp, label labl) %{ match(If cop cmp); @@ -13254,37 +13225,6 @@ instruct jmpLoopEnd_short(cmpOp cop, rFlagsReg cr, label labl) %{ ins_short_branch(1); %} -// Jump Direct Conditional - Label defines a relative address from Jcc+1 -instruct jmpLoopEndU_short(cmpOpU cop, rFlagsRegU cmp, label labl) %{ - match(CountedLoopEnd cop cmp); - effect(USE labl); - - ins_cost(300); - format %{ "j$cop,us $labl\t# loop end" %} - size(2); - ins_encode %{ - Label* L = $labl$$label; - __ jccb((Assembler::Condition)($cop$$cmpcode), *L); - %} - ins_pipe(pipe_jcc); - ins_short_branch(1); -%} - -instruct jmpLoopEndUCF_short(cmpOpUCF cop, rFlagsRegUCF cmp, label labl) %{ - match(CountedLoopEnd cop cmp); - effect(USE labl); - - ins_cost(300); - format %{ "j$cop,us $labl\t# loop end" %} - size(2); - ins_encode %{ - Label* L = $labl$$label; - __ jccb((Assembler::Condition)($cop$$cmpcode), *L); - %} - ins_pipe(pipe_jcc); - ins_short_branch(1); -%} - // Jump Direct Conditional - using unsigned comparison instruct jmpConU_short(cmpOpU cop, rFlagsRegU cmp, label labl) %{ match(If cop cmp);