@@ -1577,7 +1577,8 @@ def : InstRW<[N2Write_2cyc_1M], (instregex "^(ZIP|UZP)[12]_PPP_[BHSDQ]$")>;
1577
1577
// -----------------------------------------------------------------------------
1578
1578
1579
1579
// Arithmetic, absolute diff
1580
- def : InstRW<[N2Write_2cyc_1V], (instregex "^[SU]ABD_ZPmZ_[BHSD]$")>;
1580
+ def : InstRW<[N2Write_2cyc_1V], (instregex "^[SU]ABD_ZPmZ_[BHSD]",
1581
+ "^[SU]ABD_ZPZZ_[BHSD]")>;
1581
1582
1582
1583
// Arithmetic, absolute diff accum
1583
1584
def : InstRW<[N2Write_4cyc_1V1], (instregex "^[SU]ABA_ZZZ_[BHSD]$")>;
@@ -1590,24 +1591,25 @@ def : InstRW<[N2Write_2cyc_1V], (instregex "^[SU]ABDL[TB]_ZZZ_[HSD]$")>;
1590
1591
1591
1592
// Arithmetic, basic
1592
1593
def : InstRW<[N2Write_2cyc_1V],
1593
- (instregex "^(ABS|ADD|CNOT|NEG|SUB|SUBR)_ZPmZ_[BHSD]$",
1594
- "^(ADD|SUB)_ZZZ_[BHSD]$",
1595
- "^(ADD|SUB|SUBR)_ZI_[BHSD]$",
1596
- "^ADR_[SU]XTW_ZZZ_D_[0123]$",
1597
- "^ADR_LSL_ZZZ_[SD]_[0123]$",
1598
- "^[SU](ADD|SUB)[LW][BT]_ZZZ_[HSD]$",
1599
- "^SADDLBT_ZZZ_[HSD]$",
1600
- "^[SU]H(ADD|SUB|SUBR)_ZPmZ_[BHSD]$",
1601
- "^SSUBL(BT|TB)_ZZZ_[HSD]$")>;
1594
+ (instregex "^(ABS|ADD|CNOT|NEG|SUB|SUBR)_ZPmZ_[BHSD]",
1595
+ "^(ADD|SUB)_ZZZ_[BHSD]",
1596
+ "^(ADD|SUB|SUBR)_ZPZZ_[BHSD]",
1597
+ "^(ADD|SUB|SUBR)_ZI_[BHSD]",
1598
+ "^ADR_[SU]XTW_ZZZ_D_[0123]",
1599
+ "^ADR_LSL_ZZZ_[SD]_[0123]",
1600
+ "^[SU](ADD|SUB)[LW][BT]_ZZZ_[HSD]",
1601
+ "^SADDLBT_ZZZ_[HSD]",
1602
+ "^[SU]H(ADD|SUB|SUBR)_ZPmZ_[BHSD]",
1603
+ "^SSUBL(BT|TB)_ZZZ_[HSD]")>;
1602
1604
1603
1605
// Arithmetic, complex
1604
1606
def : InstRW<[N2Write_2cyc_1V],
1605
- (instregex "^R?(ADD|SUB)HN[BT]_ZZZ_[BHS]$ ",
1606
- "^SQ(ABS|ADD|NEG|SUB|SUBR)_ZPmZ_[BHSD]$ ",
1607
- "^[SU]Q(ADD|SUB)_ZZZ_[BHSD]$ ",
1608
- "^[SU]Q(ADD|SUB)_ZI_[BHSD]$ ",
1609
- "^(SRH|SUQ|UQ|USQ|URH)ADD_ZPmZ_[BHSD]$ ",
1610
- "^(UQSUB|UQSUBR)_ZPmZ_[BHSD]$ ")>;
1607
+ (instregex "^R?(ADD|SUB)HN[BT]_ZZZ_[BHS]",
1608
+ "^SQ(ABS|ADD|NEG|SUB|SUBR)_ZPmZ_[BHSD]",
1609
+ "^[SU]Q(ADD|SUB)_ZZZ_[BHSD]",
1610
+ "^[SU]Q(ADD|SUB)_ZI_[BHSD]",
1611
+ "^(SRH|SUQ|UQ|USQ|URH)ADD_ZPmZ_[BHSD]",
1612
+ "^(UQSUB|UQSUBR)_ZPmZ_[BHSD]")>;
1611
1613
1612
1614
// Arithmetic, large integer
1613
1615
def : InstRW<[N2Write_2cyc_1V], (instregex "^(AD|SB)CL[BT]_ZZZ_[SD]$")>;
@@ -1620,12 +1622,13 @@ def : InstRW<[N2Write_4cyc_1V1], (instregex "^[SU]ADALP_ZPmZ_[HSD]$")>;
1620
1622
1621
1623
// Arithmetic, shift
1622
1624
def : InstRW<[N2Write_2cyc_1V1],
1623
- (instregex "^(ASR|LSL|LSR)_WIDE_ZPmZ_[BHS]$",
1624
- "^(ASR|LSL|LSR)_WIDE_ZZZ_[BHS]$",
1625
- "^(ASR|LSL|LSR)_ZPmI_[BHSD]$",
1626
- "^(ASR|LSL|LSR)_ZPmZ_[BHSD]$",
1627
- "^(ASR|LSL|LSR)_ZZI_[BHSD]$",
1628
- "^(ASRR|LSLR|LSRR)_ZPmZ_[BHSD]$")>;
1625
+ (instregex "^(ASR|LSL|LSR)_WIDE_ZPmZ_[BHS]",
1626
+ "^(ASR|LSL|LSR)_WIDE_ZZZ_[BHS]",
1627
+ "^(ASR|LSL|LSR)_ZPmI_[BHSD]",
1628
+ "^(ASR|LSL|LSR)_ZPmZ_[BHSD]",
1629
+ "^(ASR|LSL|LSR)_ZZI_[BHSD]",
1630
+ "^(ASR|LSL|LSR)_ZPZ[IZ]_[BHSD]",
1631
+ "^(ASRR|LSLR|LSRR)_ZPmZ_[BHSD]")>;
1629
1632
1630
1633
// Arithmetic, shift and accumulate
1631
1634
def : InstRW<[N2Write_4cyc_1V1],
@@ -1638,29 +1641,29 @@ def : InstRW<[N2Write_2cyc_1V1],
1638
1641
1639
1642
// Arithmetic, shift complex
1640
1643
def : InstRW<[N2Write_4cyc_1V1],
1641
- (instregex "^(SQ)?RSHRU?N[BT]_ZZI_[BHS]$",
1642
- "^(SQRSHL|SQRSHLR|SQSHL|SQSHLR|UQRSHL|UQRSHLR|UQSHL|UQSHLR)_ZPmZ_[BHSD]$",
1643
- "^(SQSHL|SQSHLU|UQSHL)_ZPmI_[BHSD]$",
1644
- "^SQSHRU?N[BT]_ZZI_[BHS]$",
1645
- "^UQR?SHRN[BT]_ZZI_[BHS]$")>;
1644
+ (instregex "^(SQ)?RSHRU?N[BT]_ZZI_[BHS]",
1645
+ "^(SQRSHL|SQRSHLR|SQSHL|SQSHLR|UQRSHL|UQRSHLR|UQSHL|UQSHLR)_ZPmZ_[BHSD]",
1646
+ "^[SU]QR?SHL_ZPZZ_[BHSD]",
1647
+ "^(SQSHL|SQSHLU|UQSHL)_(ZPmI|ZPZI)_[BHSD]",
1648
+ "^SQSHRU?N[BT]_ZZI_[BHS]",
1649
+ "^UQR?SHRN[BT]_ZZI_[BHS]")>;
1646
1650
1647
1651
// Arithmetic, shift right for divide
1648
- def : InstRW<[N2Write_4cyc_1V1], (instregex "^ASRD_ZPmI_ [BHSD]$ ")>;
1652
+ def : InstRW<[N2Write_4cyc_1V1], (instregex "^ASRD_(ZPmI|ZPZI)_ [BHSD]")>;
1649
1653
1650
1654
// Arithmetic, shift rounding
1651
- def : InstRW<[N2Write_4cyc_1V1],
1652
- (instregex "^(SRSHL|SRSHLR|URSHL|URSHLR)_ZPmZ_[ BHSD]$ ",
1653
- "^[SU]RSHR_ZPmI_ [BHSD]$ ")>;
1655
+ def : InstRW<[N2Write_4cyc_1V1], (instregex "^[SU]RSHLR?_ZPmZ_[BHSD]",
1656
+ "^[SU]RSHL_ZPZZ_[ BHSD]",
1657
+ "^[SU]RSHR_(ZPmI|ZPZI)_ [BHSD]")>;
1654
1658
1655
1659
// Bit manipulation
1656
- def : InstRW<[N2Write_6cyc_2V1],
1657
- (instregex "^(BDEP|BEXT|BGRP)_ZZZ_[BHSD]$")>;
1660
+ def : InstRW<[N2Write_6cyc_2V1], (instregex "^(BDEP|BEXT|BGRP)_ZZZ_[BHSD]")>;
1658
1661
1659
1662
// Bitwise select
1660
1663
def : InstRW<[N2Write_2cyc_1V], (instregex "^(BSL|BSL1N|BSL2N|NBSL)_ZZZZ$")>;
1661
1664
1662
1665
// Count/reverse bits
1663
- def : InstRW<[N2Write_2cyc_1V], (instregex "^(CLS|CLZ|CNT|RBIT)_ZPmZ_[BHSD]$ ")>;
1666
+ def : InstRW<[N2Write_2cyc_1V], (instregex "^(CLS|CLZ|CNT|RBIT)_ZPmZ_[BHSD]")>;
1664
1667
1665
1668
// Broadcast logical bitmask immediate to vector
1666
1669
def : InstRW<[N2Write_2cyc_1V], (instrs DUPM_ZI)>;
@@ -1695,19 +1698,14 @@ def : InstRW<[N2Write_3cyc_1V1], (instregex "^CLAST[AB]_[VZ]PZ_[BHSD]$",
1695
1698
"^SPLICE_ZPZZ?_[BHSD]$")>;
1696
1699
1697
1700
// Convert to floating point, 64b to float or convert to double
1698
- def : InstRW<[N2Write_3cyc_1V0], (instregex "^[SU]CVTF_ZPmZ_Dto[SD]$")>;
1699
-
1700
- // Convert to floating point, 64b to half
1701
- def : InstRW<[N2Write_3cyc_1V0], (instregex "^[SU]CVTF_ZPmZ_DtoH$")>;
1701
+ def : InstRW<[N2Write_3cyc_1V0], (instregex "^[SU]CVTF_ZPmZ_Dto[HSD]",
1702
+ "^[SU]CVTF_ZPmZ_StoD")>;
1702
1703
1703
1704
// Convert to floating point, 32b to single or half
1704
- def : InstRW<[N2Write_4cyc_2V0], (instregex "^[SU]CVTF_ZPmZ_Sto[HS]$")>;
1705
-
1706
- // Convert to floating point, 32b to double
1707
- def : InstRW<[N2Write_3cyc_1V0], (instregex "^[SU]CVTF_ZPmZ_StoD$")>;
1705
+ def : InstRW<[N2Write_4cyc_2V0], (instregex "^[SU]CVTF_ZPmZ_Sto[HS]")>;
1708
1706
1709
1707
// Convert to floating point, 16b to half
1710
- def : InstRW<[N2Write_6cyc_4V0], (instregex "^[SU]CVTF_ZPmZ_HtoH$ ")>;
1708
+ def : InstRW<[N2Write_6cyc_4V0], (instregex "^[SU]CVTF_ZPmZ_HtoH")>;
1711
1709
1712
1710
// Copy, scalar
1713
1711
def : InstRW<[N2Write_5cyc_1M0_1V], (instregex "^CPY_ZPmR_[BHSD]$")>;
@@ -1717,10 +1715,12 @@ def : InstRW<[N2Write_2cyc_1V], (instregex "^CPY_ZPm[IV]_[BHSD]$",
1717
1715
"^CPY_ZPzI_[BHSD]$")>;
1718
1716
1719
1717
// Divides, 32 bit
1720
- def : InstRW<[N2Write_12cyc_1V0], (instregex "^[SU]DIVR?_ZPmZ_S$")>;
1718
+ def : InstRW<[N2Write_12cyc_1V0], (instregex "^[SU]DIVR?_ZPmZ_S",
1719
+ "^[SU]DIV_ZPZZ_S")>;
1721
1720
1722
1721
// Divides, 64 bit
1723
- def : InstRW<[N2Write_20cyc_1V0], (instregex "^[SU]DIVR?_ZPmZ_D$")>;
1722
+ def : InstRW<[N2Write_20cyc_1V0], (instregex "^[SU]DIVR?_ZPmZ_D",
1723
+ "^[SU]DIV_ZPZZ_D")>;
1724
1724
1725
1725
// Dot product, 8 bit
1726
1726
def : InstRW<[N2Write_3cyc_1V], (instregex "^[SU]DOT_ZZZI?_S$")>;
@@ -1739,9 +1739,9 @@ def : InstRW<[N2Write_2cyc_1V], (instregex "^DUP_ZI_[BHSD]$",
1739
1739
def : InstRW<[N2Write_3cyc_1M0], (instregex "^DUP_ZR_[BHSD]$")>;
1740
1740
1741
1741
// Extend, sign or zero
1742
- def : InstRW<[N2Write_2cyc_1V1], (instregex "^[SU]XTB_ZPmZ_[HSD]$ ",
1743
- "^[SU]XTH_ZPmZ_[SD]$ ",
1744
- "^[SU]XTW_ZPmZ_[D]$ ")>;
1742
+ def : InstRW<[N2Write_2cyc_1V1], (instregex "^[SU]XTB_ZPmZ_[HSD]",
1743
+ "^[SU]XTH_ZPmZ_[SD]",
1744
+ "^[SU]XTW_ZPmZ_[D]")>;
1745
1745
1746
1746
// Extract
1747
1747
def : InstRW<[N2Write_2cyc_1V], (instrs EXT_ZZI, EXT_ZZI_B)>;
@@ -1778,14 +1778,16 @@ def : InstRW<[N2Write_8cyc_2M0_2V0], (instregex "^INDEX_(IR|RI|RR)_D$")>;
1778
1778
1779
1779
// Logical
1780
1780
def : InstRW<[N2Write_2cyc_1V],
1781
- (instregex "^(AND|EOR|ORR)_ZI$",
1782
- "^(AND|BIC|EOR|EOR(BT|TB)?|ORR)_ZZZ$",
1783
- "^EOR(BT|TB)_ZZZ_[BHSD]$",
1784
- "^(AND|BIC|EOR|NOT|ORR)_ZPmZ_[BHSD]$")>;
1781
+ (instregex "^(AND|EOR|ORR)_ZI",
1782
+ "^(AND|BIC|EOR|ORR)_ZZZ",
1783
+ "^EOR(BT|TB)_ZZZ_[BHSD]",
1784
+ "^(AND|BIC|EOR|NOT|ORR)_(ZPmZ|ZPZZ)_[BHSD]",
1785
+ "^NOT_ZPmZ_[BHSD]")>;
1785
1786
1786
1787
// Max/min, basic and pairwise
1787
- def : InstRW<[N2Write_2cyc_1V], (instregex "^[SU](MAX|MIN)_ZI_[BHSD]$",
1788
- "^[SU](MAX|MIN)P?_ZPmZ_[BHSD]$")>;
1788
+ def : InstRW<[N2Write_2cyc_1V], (instregex "^[SU](MAX|MIN)_ZI_[BHSD]",
1789
+ "^[SU](MAX|MIN)P?_ZPmZ_[BHSD]",
1790
+ "^[SU](MAX|MIN)_ZPZZ_[BHSD]")>;
1789
1791
1790
1792
// Matching operations
1791
1793
def : InstRW<[N2Write_2cyc_1V0_1M], (instregex "^N?MATCH_PPzZZ_[BH]$")>;
@@ -1798,24 +1800,28 @@ def : InstRW<[N2Write_2cyc_1V], (instregex "^MOVPRFX_ZP[mz]Z_[BHSD]$",
1798
1800
"^MOVPRFX_ZZ$")>;
1799
1801
1800
1802
// Multiply, B, H, S element size
1801
- def : InstRW<[N2Write_4cyc_1V0], (instregex "^MUL_(ZI|ZPmZ|ZZZI|ZZZ)_[BHS]$",
1802
- "^[SU]MULH_(ZPmZ|ZZZ)_[BHS]$")>;
1803
+ def : InstRW<[N2Write_4cyc_1V0], (instregex "^MUL_(ZI|ZPmZ|ZZZI|ZZZ)_[BHS]",
1804
+ "^MUL_ZPZZ_[BHS]",
1805
+ "^[SU]MULH_(ZPmZ|ZZZ)_[BHS]",
1806
+ "^[SU]MULH_ZPZZ_[BHS]")>;
1803
1807
1804
1808
// Multiply, D element size
1805
- def : InstRW<[N2Write_5cyc_2V0], (instregex "^MUL_(ZI|ZPmZ|ZZZI|ZZZ)_D$",
1806
- "^[SU]MULH_(ZPmZ|ZZZ)_D$")>;
1809
+ def : InstRW<[N2Write_5cyc_2V0], (instregex "^MUL_(ZI|ZPmZ|ZZZI|ZZZ)_D",
1810
+ "^MUL_ZPZZ_D",
1811
+ "^[SU]MULH_(ZPmZ|ZZZ)_D",
1812
+ "^[SU]MULH_ZPZZ_D")>;
1807
1813
1808
1814
// Multiply long
1809
1815
def : InstRW<[N2Write_4cyc_1V0], (instregex "^[SU]MULL[BT]_ZZZI_[SD]$",
1810
1816
"^[SU]MULL[BT]_ZZZ_[HSD]$")>;
1811
1817
1812
1818
// Multiply accumulate, B, H, S element size
1813
1819
def : InstRW<[N2Write_4cyc_1V0], (instregex "^ML[AS]_ZZZI_[BHS]$",
1814
- "^(ML[AS]|MAD|MSB)_ZPmZZ_ [BHS]$ ")>;
1820
+ "^(ML[AS]|MAD|MSB)_(ZPmZZ|ZPZZZ)_ [BHS]")>;
1815
1821
1816
1822
// Multiply accumulate, D element size
1817
1823
def : InstRW<[N2Write_5cyc_2V0], (instregex "^ML[AS]_ZZZI_D$",
1818
- "^(ML[AS]|MAD|MSB)_ZPmZZ_D$ ")>;
1824
+ "^(ML[AS]|MAD|MSB)_(ZPmZZ|ZPZZZ)_D ")>;
1819
1825
1820
1826
// Multiply accumulate long
1821
1827
def : InstRW<[N2Write_4cyc_1V0], (instregex "^[SU]ML[AS]L[BT]_ZZZ_[HSD]$",
@@ -1864,7 +1870,7 @@ def : InstRW<[N2Write_2cyc_1V0],
1864
1870
(instregex "^(DEC|INC|SQDEC|SQINC|UQDEC|UQINC)[HWD]_ZPiI$")>;
1865
1871
1866
1872
// Reciprocal estimate
1867
- def : InstRW<[N2Write_4cyc_2V0], (instrs URECPE_ZPmZ_S, URSQRTE_ZPmZ_S)>;
1873
+ def : InstRW<[N2Write_4cyc_2V0], (instregex "^ URECPE_ZPmZ_S", "^ URSQRTE_ZPmZ_S" )>;
1868
1874
1869
1875
// Reduction, arithmetic, B form
1870
1876
def : InstRW<[N2Write_11cyc_2V_2V1], (instregex "^[SU](ADD|MAX|MIN)V_VPZ_B")>;
@@ -1909,13 +1915,17 @@ def : InstRW<[N2Write_2cyc_1V], (instregex "^(UZP|ZIP)[12]_ZZZ_[BHSDQ]$")>;
1909
1915
// -----------------------------------------------------------------------------
1910
1916
1911
1917
// Floating point absolute value/difference
1912
- def : InstRW<[N2Write_2cyc_1V], (instregex "^FAB[SD]_ZPmZ_[HSD]$")>;
1918
+ def : InstRW<[N2Write_2cyc_1V], (instregex "^FAB[SD]_ZPmZ_[HSD]",
1919
+ "^FABD_ZPZZ_[HSD]",
1920
+ "^FABS_ZPmZ_[HSD]")>;
1913
1921
1914
1922
// Floating point arithmetic
1915
- def : InstRW<[N2Write_2cyc_1V], (instregex "^F(ADD|SUB)_(ZPm[IZ]|ZZZ)_[HSD]$",
1916
- "^FADDP_ZPmZZ_[HSD]$",
1917
- "^FNEG_ZPmZ_[HSD]$",
1918
- "^FSUBR_ZPm[IZ]_[HSD]$")>;
1923
+ def : InstRW<[N2Write_2cyc_1V], (instregex "^F(ADD|SUB)_(ZPm[IZ]|ZZZ)_[HSD]",
1924
+ "^F(ADD|SUB)_ZPZ[IZ]_[HSD]",
1925
+ "^FADDP_ZPmZZ_[HSD]",
1926
+ "^FNEG_ZPmZ_[HSD]",
1927
+ "^FSUBR_ZPm[IZ]_[HSD]",
1928
+ "^FSUBR_(ZPZI|ZPZZ)_[HSD]")>;
1919
1929
1920
1930
// Floating point associative add, F16
1921
1931
def : InstRW<[N2Write_10cyc_1V1], (instrs FADDA_VPZ_H)>;
@@ -1940,80 +1950,80 @@ def : InstRW<[N2Write_5cyc_1V], (instregex "^FCMLA_ZPmZZ_[HSD]$",
1940
1950
"^FCMLA_ZZZI_[HS]$")>;
1941
1951
1942
1952
// Floating point convert, long or narrow (F16 to F32 or F32 to F16)
1943
- def : InstRW<[N2Write_4cyc_2V0], (instregex "^FCVT_ZPmZ_(HtoS|StoH)$ ",
1944
- "^FCVTLT_ZPmZ_HtoS$ ",
1945
- "^FCVTNT_ZPmZ_StoH$ ")>;
1953
+ def : InstRW<[N2Write_4cyc_2V0], (instregex "^FCVT_ZPmZ_(HtoS|StoH)",
1954
+ "^FCVTLT_ZPmZ_HtoS",
1955
+ "^FCVTNT_ZPmZ_StoH")>;
1946
1956
1947
1957
// Floating point convert, long or narrow (F16 to F64, F32 to F64, F64 to F32
1948
1958
// or F64 to F16)
1949
- def : InstRW<[N2Write_3cyc_1V0], (instregex "^FCVT_ZPmZ_(HtoD|StoD|DtoS|DtoH)$ ",
1950
- "^FCVTLT_ZPmZ_StoD$ ",
1951
- "^FCVTNT_ZPmZ_DtoS$ ")>;
1959
+ def : InstRW<[N2Write_3cyc_1V0], (instregex "^FCVT_ZPmZ_(HtoD|StoD|DtoS|DtoH)",
1960
+ "^FCVTLT_ZPmZ_StoD",
1961
+ "^FCVTNT_ZPmZ_DtoS")>;
1952
1962
1953
1963
// Floating point convert, round to odd
1954
1964
def : InstRW<[N2Write_3cyc_1V0], (instrs FCVTX_ZPmZ_DtoS, FCVTXNT_ZPmZ_DtoS)>;
1955
1965
1956
1966
// Floating point base2 log, F16
1957
- def : InstRW<[N2Write_6cyc_4V0], (instrs FLOGB_ZPmZ_H )>;
1967
+ def : InstRW<[N2Write_6cyc_4V0], (instregex "^FLOGB_(ZPmZ|ZPZZ)_H" )>;
1958
1968
1959
1969
// Floating point base2 log, F32
1960
- def : InstRW<[N2Write_4cyc_2V0], (instrs FLOGB_ZPmZ_S )>;
1970
+ def : InstRW<[N2Write_4cyc_2V0], (instregex "^FLOGB_(ZPmZ|ZPZZ)_S" )>;
1961
1971
1962
1972
// Floating point base2 log, F64
1963
- def : InstRW<[N2Write_3cyc_1V0], (instrs FLOGB_ZPmZ_D )>;
1973
+ def : InstRW<[N2Write_3cyc_1V0], (instregex "^FLOGB_(ZPmZ|ZPZZ)_D" )>;
1964
1974
1965
1975
// Floating point convert to integer, F16
1966
- def : InstRW<[N2Write_6cyc_4V0], (instregex "^FCVTZ[SU]_ZPmZ_HtoH$ ")>;
1976
+ def : InstRW<[N2Write_6cyc_4V0], (instregex "^FCVTZ[SU]_ZPmZ_HtoH")>;
1967
1977
1968
1978
// Floating point convert to integer, F32
1969
- def : InstRW<[N2Write_4cyc_2V0], (instregex "^FCVTZ[SU]_ZPmZ_(HtoS|StoS)$ ")>;
1979
+ def : InstRW<[N2Write_4cyc_2V0], (instregex "^FCVTZ[SU]_ZPmZ_(HtoS|StoS)")>;
1970
1980
1971
1981
// Floating point convert to integer, F64
1972
1982
def : InstRW<[N2Write_3cyc_1V0],
1973
- (instregex "^FCVTZ[SU]_ZPmZ_(HtoD|StoD|DtoS|DtoD)$ ")>;
1983
+ (instregex "^FCVTZ[SU]_ZPmZ_(HtoD|StoD|DtoS|DtoD)")>;
1974
1984
1975
1985
// Floating point copy
1976
1986
def : InstRW<[N2Write_2cyc_1V], (instregex "^FCPY_ZPmI_[HSD]$",
1977
1987
"^FDUP_ZI_[HSD]$")>;
1978
1988
1979
1989
// Floating point divide, F16
1980
- def : InstRW<[N2Write_13cyc_1V0], (instregex "^FDIVR?_ZPmZ_H$ ")>;
1990
+ def : InstRW<[N2Write_13cyc_1V0], (instregex "^FDIVR?_(ZPmZ|ZPZZ)_H ")>;
1981
1991
1982
1992
// Floating point divide, F32
1983
- def : InstRW<[N2Write_10cyc_1V0], (instregex "^FDIVR?_ZPmZ_S$ ")>;
1993
+ def : InstRW<[N2Write_10cyc_1V0], (instregex "^FDIVR?_(ZPmZ|ZPZZ)_S ")>;
1984
1994
1985
1995
// Floating point divide, F64
1986
- def : InstRW<[N2Write_15cyc_1V0], (instregex "^FDIVR?_ZPmZ_D$ ")>;
1996
+ def : InstRW<[N2Write_15cyc_1V0], (instregex "^FDIVR?_(ZPmZ|ZPZZ)_D ")>;
1987
1997
1988
1998
// Floating point min/max pairwise
1989
- def : InstRW<[N2Write_2cyc_1V], (instregex "^F(MAX|MIN)(NM)?P_ZPmZZ_[HSD]$ ")>;
1999
+ def : InstRW<[N2Write_2cyc_1V], (instregex "^F(MAX|MIN)(NM)?P_ZPmZZ_[HSD]")>;
1990
2000
1991
2001
// Floating point min/max
1992
- def : InstRW<[N2Write_2cyc_1V], (instregex "^F(MAX|MIN)(NM)?_ZPm[IZ]_[HSD]$")>;
2002
+ def : InstRW<[N2Write_2cyc_1V], (instregex "^F(MAX|MIN)(NM)?_ZPm[IZ]_[HSD]",
2003
+ "^F(MAX|MIN)(NM)?_ZPZ[IZ]_[HSD]")>;
1993
2004
1994
2005
// Floating point multiply
1995
- def : InstRW<[N2Write_3cyc_1V], (instregex "^(FSCALE|FMULX)_ZPmZ_[HSD]$",
1996
- "^FMUL_(ZPm[IZ]|ZZZI?)_[HSD]$")>;
2006
+ def : InstRW<[N2Write_3cyc_1V], (instregex "^(FSCALE|FMULX)_ZPmZ_[HSD]",
2007
+ "^FMULX_ZPZZ_[HSD]",
2008
+ "^FMUL_(ZPm[IZ]|ZZZI?)_[HSD]",
2009
+ "^FMUL_ZPZ[IZ]_[HSD]")>;
1997
2010
1998
2011
// Floating point multiply accumulate
1999
- def : InstRW<[N2Write_4cyc_1V],
2000
- (instregex "^FML [AS]_(ZPmZZ|ZZZI)_ [HSD]$ ",
2001
- "^(FMAD|FNMAD|FNML [AS]|FN?MSB)_ZPmZZ_ [HSD]$")>;
2012
+ def : InstRW<[N2Write_4cyc_1V], (instregex "^F(N?M(AD|SB)|N?ML[AS])_ZPmZZ_[HSD]$",
2013
+ "^FN?ML [AS]_ZPZZZ_ [HSD]",
2014
+ "^FML [AS]_ZZZI_ [HSD]$")>;
2002
2015
2003
2016
// Floating point multiply add/sub accumulate long
2004
2017
def : InstRW<[N2Write_4cyc_1V], (instregex "^FML[AS]L[BT]_ZZZI?_SHH$")>;
2005
2018
2006
2019
// Floating point reciprocal estimate, F16
2007
- def : InstRW<[N2Write_6cyc_4V0], (instrs FRECPE_ZZ_H, FRECPX_ZPmZ_H,
2008
- FRSQRTE_ZZ_H)>;
2020
+ def : InstRW<[N2Write_6cyc_4V0], (instregex "^FR(ECP|SQRT)E_ZZ_H", "^FRECPX_ZPmZ_H")>;
2009
2021
2010
2022
// Floating point reciprocal estimate, F32
2011
- def : InstRW<[N2Write_4cyc_2V0], (instrs FRECPE_ZZ_S, FRECPX_ZPmZ_S,
2012
- FRSQRTE_ZZ_S)>;
2023
+ def : InstRW<[N2Write_4cyc_2V0], (instregex "^FR(ECP|SQRT)E_ZZ_S", "^FRECPX_ZPmZ_S")>;
2013
2024
2014
2025
// Floating point reciprocal estimate, F64
2015
- def : InstRW<[N2Write_3cyc_1V0], (instrs FRECPE_ZZ_D, FRECPX_ZPmZ_D,
2016
- FRSQRTE_ZZ_D)>;
2026
+ def : InstRW<[N2Write_3cyc_1V0], (instregex "^FR(ECP|SQRT)E_ZZ_D", "^FRECPX_ZPmZ_D")>;
2017
2027
2018
2028
// Floating point reciprocal step
2019
2029
def : InstRW<[N2Write_4cyc_1V0], (instregex "^F(RECPS|RSQRTS)_ZZZ_[HSD]$")>;
@@ -2031,22 +2041,22 @@ def : InstRW<[N2Write_2cyc_1V],
2031
2041
(instregex "^(FADDV|FMAXNMV|FMAXV|FMINNMV|FMINV)_VPZ_D$")>;
2032
2042
2033
2043
// Floating point round to integral, F16
2034
- def : InstRW<[N2Write_6cyc_4V0], (instregex "^FRINT[AIMNPXZ]_ZPmZ_H$ ")>;
2044
+ def : InstRW<[N2Write_6cyc_4V0], (instregex "^FRINT[AIMNPXZ]_ZPmZ_H")>;
2035
2045
2036
2046
// Floating point round to integral, F32
2037
- def : InstRW<[N2Write_4cyc_2V0], (instregex "^FRINT[AIMNPXZ]_ZPmZ_S$ ")>;
2047
+ def : InstRW<[N2Write_4cyc_2V0], (instregex "^FRINT[AIMNPXZ]_ZPmZ_S")>;
2038
2048
2039
2049
// Floating point round to integral, F64
2040
- def : InstRW<[N2Write_3cyc_1V0], (instregex "^FRINT[AIMNPXZ]_ZPmZ_D$ ")>;
2050
+ def : InstRW<[N2Write_3cyc_1V0], (instregex "^FRINT[AIMNPXZ]_ZPmZ_D")>;
2041
2051
2042
2052
// Floating point square root, F16
2043
- def : InstRW<[N2Write_13cyc_1V0], (instrs FSQRT_ZPmZ_H)>;
2053
+ def : InstRW<[N2Write_13cyc_1V0], (instregex "^ FSQRT_ZPmZ_H" )>;
2044
2054
2045
2055
// Floating point square root, F32
2046
- def : InstRW<[N2Write_10cyc_1V0], (instrs FSQRT_ZPmZ_S)>;
2056
+ def : InstRW<[N2Write_10cyc_1V0], (instregex "^ FSQRT_ZPmZ_S" )>;
2047
2057
2048
2058
// Floating point square root, F64
2049
- def : InstRW<[N2Write_16cyc_1V0], (instrs FSQRT_ZPmZ_D)>;
2059
+ def : InstRW<[N2Write_16cyc_1V0], (instregex "^ FSQRT_ZPmZ_D" )>;
2050
2060
2051
2061
// Floating point trigonometric exponentiation
2052
2062
def : InstRW<[N2Write_3cyc_1V1], (instregex "^FEXPA_ZZ_[HSD]$")>;
0 commit comments