|
1753 | 1753 | /* If the constant is too large for a single instruction and isn't frame |
1754 | 1754 | based, split off the immediate so it is available for CSE. */ |
1755 | 1755 | if (!aarch64_plus_immediate (operands[2], <MODE>mode) |
| 1756 | + && !(TARGET_SVE && aarch64_sve_plus_immediate (operands[2], <MODE>mode)) |
1756 | 1757 | && can_create_pseudo_p () |
1757 | 1758 | && (!REG_P (op1) |
1758 | 1759 | || !REGNO_PTR_FRAME_P (REGNO (op1)))) |
|
1770 | 1771 |
|
1771 | 1772 | (define_insn "*add<mode>3_aarch64" |
1772 | 1773 | [(set |
1773 | | - (match_operand:GPI 0 "register_operand" "=rk,rk,w,rk,r,rk") |
| 1774 | + (match_operand:GPI 0 "register_operand" "=rk,rk,w,rk,r,r,rk") |
1774 | 1775 | (plus:GPI |
1775 | | - (match_operand:GPI 1 "register_operand" "%rk,rk,w,rk,rk,rk") |
1776 | | - (match_operand:GPI 2 "aarch64_pluslong_operand" "I,r,w,J,Uaa,Uav")))] |
| 1776 | + (match_operand:GPI 1 "register_operand" "%rk,rk,w,rk,rk,0,rk") |
| 1777 | + (match_operand:GPI 2 "aarch64_pluslong_operand" "I,r,w,J,Uaa,Uai,Uav")))] |
1777 | 1778 | "" |
1778 | 1779 | "@ |
1779 | 1780 | add\\t%<w>0, %<w>1, %2 |
1780 | 1781 | add\\t%<w>0, %<w>1, %<w>2 |
1781 | 1782 | add\\t%<rtn>0<vas>, %<rtn>1<vas>, %<rtn>2<vas> |
1782 | 1783 | sub\\t%<w>0, %<w>1, #%n2 |
1783 | 1784 | # |
1784 | | - * return aarch64_output_sve_addvl_addpl (operands[0], operands[1], operands[2]);" |
1785 | | - ;; The "alu_imm" type for ADDVL/ADDPL is just a placeholder. |
1786 | | - [(set_attr "type" "alu_imm,alu_sreg,neon_add,alu_imm,multiple,alu_imm") |
1787 | | - (set_attr "arch" "*,*,simd,*,*,*")] |
| 1785 | + * return aarch64_output_sve_scalar_inc_dec (operands[2]); |
| 1786 | + * return aarch64_output_sve_addvl_addpl (operands[2]);" |
| 1787 | + ;; The "alu_imm" types for INC/DEC and ADDVL/ADDPL are just placeholders. |
| 1788 | + [(set_attr "type" "alu_imm,alu_sreg,neon_add,alu_imm,multiple,alu_imm,alu_imm") |
| 1789 | + (set_attr "arch" "*,*,simd,*,*,sve,sve")] |
1788 | 1790 | ) |
1789 | 1791 |
|
1790 | 1792 | ;; zero_extend version of above |
|
1863 | 1865 | ;; this pattern. |
1864 | 1866 | (define_insn_and_split "*add<mode>3_poly_1" |
1865 | 1867 | [(set |
1866 | | - (match_operand:GPI 0 "register_operand" "=r,r,r,r,r,&r") |
| 1868 | + (match_operand:GPI 0 "register_operand" "=r,r,r,r,r,r,&r") |
1867 | 1869 | (plus:GPI |
1868 | | - (match_operand:GPI 1 "register_operand" "%rk,rk,rk,rk,rk,rk") |
1869 | | - (match_operand:GPI 2 "aarch64_pluslong_or_poly_operand" "I,r,J,Uaa,Uav,Uat")))] |
| 1870 | + (match_operand:GPI 1 "register_operand" "%rk,rk,rk,rk,rk,0,rk") |
| 1871 | + (match_operand:GPI 2 "aarch64_pluslong_or_poly_operand" "I,r,J,Uaa,Uav,Uai,Uat")))] |
1870 | 1872 | "TARGET_SVE && operands[0] != stack_pointer_rtx" |
1871 | 1873 | "@ |
1872 | 1874 | add\\t%<w>0, %<w>1, %2 |
1873 | 1875 | add\\t%<w>0, %<w>1, %<w>2 |
1874 | 1876 | sub\\t%<w>0, %<w>1, #%n2 |
1875 | 1877 | # |
1876 | | - * return aarch64_output_sve_addvl_addpl (operands[0], operands[1], operands[2]); |
| 1878 | + * return aarch64_output_sve_scalar_inc_dec (operands[2]); |
| 1879 | + * return aarch64_output_sve_addvl_addpl (operands[2]); |
1877 | 1880 | #" |
1878 | 1881 | "&& epilogue_completed |
1879 | 1882 | && !reg_overlap_mentioned_p (operands[0], operands[1]) |
|
1884 | 1887 | operands[2], operands[0], NULL_RTX); |
1885 | 1888 | DONE; |
1886 | 1889 | } |
1887 | | - ;; The "alu_imm" type for ADDVL/ADDPL is just a placeholder. |
1888 | | - [(set_attr "type" "alu_imm,alu_sreg,alu_imm,multiple,alu_imm,multiple")] |
| 1890 | + ;; The "alu_imm" types for INC/DEC and ADDVL/ADDPL are just placeholders. |
| 1891 | + [(set_attr "type" "alu_imm,alu_sreg,alu_imm,multiple,alu_imm,alu_imm,multiple")] |
1889 | 1892 | ) |
1890 | 1893 |
|
1891 | 1894 | (define_split |
|
0 commit comments