@@ -12757,160 +12757,96 @@ instruct extrAddI(iRegINoSp dst, iRegIorL2I src1, iRegIorL2I src2, immI lshift,
1275712757
1275812758// This pattern is automatically generated from aarch64_ad.m4
1275912759// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
12760-
12761- // rol expander
12762- instruct rolL_rReg(iRegLNoSp dst, iRegL src, iRegI shift, rFlagsReg cr)
12760+ instruct rorI_imm(iRegINoSp dst, iRegI src, immI shift)
1276312761%{
12764- effect(DEF dst, USE src, USE shift);
12765-
12766- format %{ "rol $dst, $src, $shift" %}
12767- ins_cost(INSN_COST * 3);
12768- ins_encode %{
12769- __ subw(rscratch1, zr, as_Register($shift$$reg));
12770- __ rorv(as_Register($dst$$reg), as_Register($src$$reg),
12771- rscratch1);
12772- %}
12773- ins_pipe(ialu_reg_reg_vshift);
12774- %}
12775-
12776- // This pattern is automatically generated from aarch64_ad.m4
12777- // DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
12762+ match(Set dst (RotateRight src shift));
1277812763
12779- // rol expander
12780- instruct rolI_rReg(iRegINoSp dst, iRegI src, iRegI shift, rFlagsReg cr)
12781- %{
12782- effect(DEF dst, USE src, USE shift);
12764+ ins_cost(INSN_COST);
12765+ format %{ "ror $dst, $src, $shift" %}
1278312766
12784- format %{ "rol $dst, $src, $shift" %}
12785- ins_cost(INSN_COST * 3);
1278612767 ins_encode %{
12787- __ subw(rscratch1, zr, as_Register($shift$$reg));
12788- __ rorvw(as_Register($dst$$reg), as_Register($src$$reg),
12789- rscratch1);
12790- %}
12791- ins_pipe(ialu_reg_reg_vshift);
12792- %}
12793-
12794- // This pattern is automatically generated from aarch64_ad.m4
12795- // DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
12796- instruct rolL_rReg_Var_C_64(iRegLNoSp dst, iRegL src, iRegI shift, immI_64 c_64, rFlagsReg cr)
12797- %{
12798- match(Set dst (OrL (LShiftL src shift) (URShiftL src (SubI c_64 shift))));
12799-
12800- expand %{
12801- rolL_rReg(dst, src, shift, cr);
12802- %}
12803- %}
12804-
12805- // This pattern is automatically generated from aarch64_ad.m4
12806- // DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
12807- instruct rolL_rReg_Var_C0(iRegLNoSp dst, iRegL src, iRegI shift, immI0 c0, rFlagsReg cr)
12808- %{
12809- match(Set dst (OrL (LShiftL src shift) (URShiftL src (SubI c0 shift))));
12810-
12811- expand %{
12812- rolL_rReg(dst, src, shift, cr);
12768+ __ extrw(as_Register($dst$$reg), as_Register($src$$reg), as_Register($src$$reg),
12769+ $shift$$constant & 0x1f);
1281312770 %}
12771+ ins_pipe(ialu_reg_reg_vshift);
1281412772%}
1281512773
1281612774// This pattern is automatically generated from aarch64_ad.m4
1281712775// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
12818- instruct rolI_rReg_Var_C_32(iRegINoSp dst, iRegI src, iRegI shift, immI_32 c_32, rFlagsReg cr )
12776+ instruct rorL_imm(iRegLNoSp dst, iRegL src, immI shift)
1281912777%{
12820- match(Set dst (OrI (LShiftI src shift) (URShiftI src (SubI c_32 shift)) ));
12778+ match(Set dst (RotateRight src shift));
1282112779
12822- expand %{
12823- rolI_rReg(dst, src, shift, cr);
12824- %}
12825- %}
12826-
12827- // This pattern is automatically generated from aarch64_ad.m4
12828- // DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
12829- instruct rolI_rReg_Var_C0(iRegINoSp dst, iRegI src, iRegI shift, immI0 c0, rFlagsReg cr)
12830- %{
12831- match(Set dst (OrI (LShiftI src shift) (URShiftI src (SubI c0 shift))));
12780+ ins_cost(INSN_COST);
12781+ format %{ "ror $dst, $src, $shift" %}
1283212782
12833- expand %{
12834- rolI_rReg(dst, src, shift, cr);
12783+ ins_encode %{
12784+ __ extr(as_Register($dst$$reg), as_Register($src$$reg), as_Register($src$$reg),
12785+ $shift$$constant & 0x3f);
1283512786 %}
12787+ ins_pipe(ialu_reg_reg_vshift);
1283612788%}
1283712789
1283812790// This pattern is automatically generated from aarch64_ad.m4
1283912791// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
12840-
12841- // ror expander
12842- instruct rorL_rReg(iRegLNoSp dst, iRegL src, iRegI shift, rFlagsReg cr)
12792+ instruct rorI_reg(iRegINoSp dst, iRegI src, iRegI shift)
1284312793%{
12844- effect(DEF dst, USE src, USE shift);
12794+ match(Set dst (RotateRight src shift) );
1284512795
12846- format %{ "ror $dst, $src, $shift" %}
1284712796 ins_cost(INSN_COST);
12797+ format %{ "ror $dst, $src, $shift" %}
12798+
1284812799 ins_encode %{
12849- __ rorv(as_Register($dst$$reg), as_Register($src$$reg),
12850- as_Register($shift$$reg));
12851- %}
12800+ __ rorvw(as_Register($dst$$reg), as_Register($src$$reg), as_Register($shift$$reg));
12801+ %}
1285212802 ins_pipe(ialu_reg_reg_vshift);
1285312803%}
1285412804
1285512805// This pattern is automatically generated from aarch64_ad.m4
1285612806// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
12857-
12858- // ror expander
12859- instruct rorI_rReg(iRegINoSp dst, iRegI src, iRegI shift, rFlagsReg cr)
12807+ instruct rorL_reg(iRegLNoSp dst, iRegL src, iRegI shift)
1286012808%{
12861- effect(DEF dst, USE src, USE shift);
12809+ match(Set dst (RotateRight src shift) );
1286212810
12863- format %{ "ror $dst, $src, $shift" %}
1286412811 ins_cost(INSN_COST);
12812+ format %{ "ror $dst, $src, $shift" %}
12813+
1286512814 ins_encode %{
12866- __ rorvw(as_Register($dst$$reg), as_Register($src$$reg),
12867- as_Register($shift$$reg));
12868- %}
12815+ __ rorv(as_Register($dst$$reg), as_Register($src$$reg), as_Register($shift$$reg));
12816+ %}
1286912817 ins_pipe(ialu_reg_reg_vshift);
1287012818%}
1287112819
1287212820// This pattern is automatically generated from aarch64_ad.m4
1287312821// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
12874- instruct rorL_rReg_Var_C_64(iRegLNoSp dst, iRegL src, iRegI shift, immI_64 c_64, rFlagsReg cr )
12822+ instruct rolI_reg(iRegINoSp dst, iRegI src, iRegI shift)
1287512823%{
12876- match(Set dst (OrL (URShiftL src shift) (LShiftL src (SubI c_64 shift)) ));
12824+ match(Set dst (RotateLeft src shift));
1287712825
12878- expand %{
12879- rorL_rReg(dst, src, shift, cr);
12880- %}
12881- %}
12882-
12883- // This pattern is automatically generated from aarch64_ad.m4
12884- // DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
12885- instruct rorL_rReg_Var_C0(iRegLNoSp dst, iRegL src, iRegI shift, immI0 c0, rFlagsReg cr)
12886- %{
12887- match(Set dst (OrL (URShiftL src shift) (LShiftL src (SubI c0 shift))));
12826+ ins_cost(INSN_COST);
12827+ format %{ "rol $dst, $src, $shift" %}
1288812828
12889- expand %{
12890- rorL_rReg(dst, src, shift, cr);
12829+ ins_encode %{
12830+ __ subw(rscratch1, zr, as_Register($shift$$reg));
12831+ __ rorvw(as_Register($dst$$reg), as_Register($src$$reg), rscratch1);
1289112832 %}
12833+ ins_pipe(ialu_reg_reg_vshift);
1289212834%}
1289312835
1289412836// This pattern is automatically generated from aarch64_ad.m4
1289512837// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
12896- instruct rorI_rReg_Var_C_32(iRegINoSp dst, iRegI src, iRegI shift, immI_32 c_32, rFlagsReg cr )
12838+ instruct rolL_reg(iRegLNoSp dst, iRegL src, iRegI shift)
1289712839%{
12898- match(Set dst (OrI (URShiftI src shift) (LShiftI src (SubI c_32 shift)) ));
12840+ match(Set dst (RotateLeft src shift));
1289912841
12900- expand %{
12901- rorI_rReg(dst, src, shift, cr);
12902- %}
12903- %}
12904-
12905- // This pattern is automatically generated from aarch64_ad.m4
12906- // DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
12907- instruct rorI_rReg_Var_C0(iRegINoSp dst, iRegI src, iRegI shift, immI0 c0, rFlagsReg cr)
12908- %{
12909- match(Set dst (OrI (URShiftI src shift) (LShiftI src (SubI c0 shift))));
12842+ ins_cost(INSN_COST);
12843+ format %{ "rol $dst, $src, $shift" %}
1291012844
12911- expand %{
12912- rorI_rReg(dst, src, shift, cr);
12845+ ins_encode %{
12846+ __ subw(rscratch1, zr, as_Register($shift$$reg));
12847+ __ rorv(as_Register($dst$$reg), as_Register($src$$reg), rscratch1);
1291312848 %}
12849+ ins_pipe(ialu_reg_reg_vshift);
1291412850%}
1291512851
1291612852
0 commit comments