1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
|
/* function_base implementation for RISC-V 'V' Extension for GNU compiler.
Copyright (C) 2022-2024 Free Software Foundation, Inc.
Contributed by Ju-Zhe Zhong (juzhe.zhong@rivai.ai), RiVAI Technologies Ltd.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
#include "rtl.h"
#include "tm_p.h"
#include "memmodel.h"
#include "insn-codes.h"
#include "optabs.h"
#include "recog.h"
#include "expr.h"
#include "basic-block.h"
#include "function.h"
#include "fold-const.h"
#include "gimple.h"
#include "gimple-iterator.h"
#include "gimplify.h"
#include "explow.h"
#include "emit-rtl.h"
#include "tree-vector-builder.h"
#include "rtx-vector-builder.h"
#include "riscv-vector-builtins.h"
#include "riscv-vector-builtins-shapes.h"
#include "riscv-vector-builtins-bases.h"
using namespace riscv_vector;
namespace riscv_vector {
/* Enumerates types of loads/stores operations.
It's only used in here so we don't define it
in riscv-vector-builtins-bases.h. */
enum lst_type
{
LST_UNIT_STRIDE,
LST_STRIDED,
LST_INDEXED,
};
/* Helper function to fold vleff and vlsegff. */
static gimple *
fold_fault_load (gimple_folder &f)
{
/* fold fault_load (const *base, size_t *new_vl, size_t vl)
====> fault_load (const *base, size_t vl)
new_vl = MEM_REF[read_vl ()]. */
auto_vec<tree> vargs (gimple_call_num_args (f.call) - 1);
for (unsigned i = 0; i < gimple_call_num_args (f.call); i++)
{
/* Exclude size_t *new_vl argument. */
if (i == gimple_call_num_args (f.call) - 2)
continue;
vargs.quick_push (gimple_call_arg (f.call, i));
}
gimple *repl = gimple_build_call_vec (gimple_call_fn (f.call), vargs);
gimple_call_set_lhs (repl, f.lhs);
/* Handle size_t *new_vl by read_vl. */
tree new_vl = gimple_call_arg (f.call, gimple_call_num_args (f.call) - 2);
if (integer_zerop (new_vl))
{
/* This case happens when user passes the nullptr to new_vl argument.
In this case, we just need to ignore the new_vl argument and return
fault_load instruction directly. */
return repl;
}
tree tmp_var = create_tmp_var (size_type_node, "new_vl");
tree decl = get_read_vl_decl ();
gimple *g = gimple_build_call (decl, 0);
gimple_call_set_lhs (g, tmp_var);
tree indirect
= fold_build2 (MEM_REF, size_type_node,
gimple_call_arg (f.call, gimple_call_num_args (f.call) - 2),
build_int_cst (build_pointer_type (size_type_node), 0));
gassign *assign = gimple_build_assign (indirect, tmp_var);
gsi_insert_after (f.gsi, assign, GSI_SAME_STMT);
gsi_insert_after (f.gsi, g, GSI_SAME_STMT);
return repl;
}
/* Implements vsetvl<mode> && vsetvlmax<mode>. */
template<bool VLMAX_P>
class vsetvl : public function_base
{
public:
bool apply_vl_p () const override
{
return false;
}
rtx expand (function_expander &e) const override
{
if (VLMAX_P)
e.add_input_operand (Pmode, gen_rtx_REG (Pmode, 0));
else
e.add_input_operand (0);
tree type = builtin_types[e.type.index].vector;
machine_mode mode = TYPE_MODE (type);
if (TARGET_XTHEADVECTOR)
{
machine_mode inner_mode = GET_MODE_INNER (mode);
/* SEW. */
e.add_input_operand (Pmode,
gen_int_mode (GET_MODE_BITSIZE (inner_mode), Pmode));
/* LMUL. */
e.add_input_operand (Pmode,
gen_int_mode (get_vlmul (mode), Pmode));
}
else
{
/* Normalize same RATO (SEW/LMUL) into same vsetvl instruction.
- e8,mf8/e16,mf4/e32,mf2/e64,m1 --> e8mf8
- e8,mf4/e16,mf2/e32,m1/e64,m2 --> e8mf4
- e8,mf2/e16,m1/e32,m2/e64,m4 --> e8mf2
- e8,m1/e16,m2/e32,m4/e64,m8 --> e8m1
- e8,m2/e16,m4/e32,m8 --> e8m2
- e8,m4/e16,m8 --> e8m4
- e8,m8 --> e8m8
*/
/* SEW. */
e.add_input_operand (Pmode, gen_int_mode (8, Pmode));
/* LMUL. */
machine_mode e8_mode
= get_vector_mode (QImode, GET_MODE_NUNITS (mode)).require ();
e.add_input_operand (Pmode, gen_int_mode (get_vlmul (e8_mode), Pmode));
}
/* TAIL_ANY. */
e.add_input_operand (Pmode,
gen_int_mode (get_prefer_tail_policy (), Pmode));
/* MASK_ANY. */
e.add_input_operand (Pmode,
gen_int_mode (get_prefer_mask_policy (), Pmode));
return e.generate_insn (code_for_vsetvl_no_side_effects (Pmode));
}
};
/* Implements
* vle.v/vse.v/vlm.v/vsm.v/vlse.v/vsse.v/vluxei.v/vloxei.v/vsuxei.v/vsoxei.v
* codegen. */
template<bool STORE_P, lst_type LST_TYPE, bool ORDERED_P>
class loadstore : public function_base
{
public:
bool apply_tail_policy_p () const override { return !STORE_P; }
bool apply_mask_policy_p () const override { return !STORE_P; }
unsigned int call_properties (const function_instance &) const override
{
if (STORE_P)
return CP_WRITE_MEMORY;
else
return CP_READ_MEMORY;
}
bool can_be_overloaded_p (enum predication_type_index pred) const override
{
if (STORE_P || LST_TYPE == LST_INDEXED)
return true;
return pred != PRED_TYPE_none;
}
rtx expand (function_expander &e) const override
{
if (LST_TYPE == LST_INDEXED)
{
int unspec = ORDERED_P ? UNSPEC_ORDERED : UNSPEC_UNORDERED;
if (STORE_P)
return e.use_exact_insn (
code_for_pred_indexed_store (unspec, e.vector_mode (),
e.index_mode ()));
else
{
unsigned src_eew_bitsize
= GET_MODE_BITSIZE (GET_MODE_INNER (e.index_mode ()));
unsigned dst_eew_bitsize
= GET_MODE_BITSIZE (GET_MODE_INNER (e.vector_mode ()));
if (dst_eew_bitsize == src_eew_bitsize)
return e.use_exact_insn (
code_for_pred_indexed_load_same_eew (unspec, e.vector_mode ()));
else if (dst_eew_bitsize > src_eew_bitsize)
{
unsigned factor = dst_eew_bitsize / src_eew_bitsize;
switch (factor)
{
case 2:
return e.use_exact_insn (
code_for_pred_indexed_load_x2_greater_eew (
unspec, e.vector_mode ()));
case 4:
return e.use_exact_insn (
code_for_pred_indexed_load_x4_greater_eew (
unspec, e.vector_mode ()));
case 8:
return e.use_exact_insn (
code_for_pred_indexed_load_x8_greater_eew (
unspec, e.vector_mode ()));
default:
gcc_unreachable ();
}
}
else
{
unsigned factor = src_eew_bitsize / dst_eew_bitsize;
switch (factor)
{
case 2:
return e.use_exact_insn (
code_for_pred_indexed_load_x2_smaller_eew (
unspec, e.vector_mode ()));
case 4:
return e.use_exact_insn (
code_for_pred_indexed_load_x4_smaller_eew (
unspec, e.vector_mode ()));
case 8:
return e.use_exact_insn (
code_for_pred_indexed_load_x8_smaller_eew (
unspec, e.vector_mode ()));
default:
gcc_unreachable ();
}
}
}
}
else if (LST_TYPE == LST_STRIDED)
{
if (STORE_P)
return e.use_contiguous_store_insn (
code_for_pred_strided_store (e.vector_mode ()));
else
return e.use_contiguous_load_insn (
code_for_pred_strided_load (e.vector_mode ()));
}
else
{
if (STORE_P)
return e.use_contiguous_store_insn (
code_for_pred_store (e.vector_mode ()));
else
return e.use_contiguous_load_insn (
code_for_pred_mov (e.vector_mode ()));
}
}
};
/* Implements
vadd/vsub/vand/vor/vxor/vsll/vsra/vsrl/
vmin/vmax/vminu/vmaxu/vdiv/vrem/vdivu/
vremu/vsadd/vsaddu/vssub/vssubu
vfadd/vfsub/
*/
template <rtx_code CODE, bool MAY_REQUIRE_FRM = false,
enum frm_op_type FRM_OP = NO_FRM>
class binop : public function_base
{
public:
bool has_rounding_mode_operand_p () const override
{
return FRM_OP == HAS_FRM;
}
bool may_require_frm_p () const override { return MAY_REQUIRE_FRM; }
rtx expand (function_expander &e) const override
{
switch (e.op_info->op)
{
case OP_TYPE_vx:
gcc_assert (FRM_OP == NO_FRM);
case OP_TYPE_vf:
return e.use_exact_insn (code_for_pred_scalar (CODE, e.vector_mode ()));
case OP_TYPE_vv:
return e.use_exact_insn (code_for_pred (CODE, e.vector_mode ()));
default:
gcc_unreachable ();
}
}
};
/* Implements vrsub. */
class vrsub : public function_base
{
public:
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (
code_for_pred_sub_reverse_scalar (e.vector_mode ()));
}
};
/* Implements vneg/vnot. */
template<rtx_code CODE, enum frm_op_type FRM_OP = NO_FRM>
class unop : public function_base
{
public:
bool has_rounding_mode_operand_p () const override
{
return FRM_OP == HAS_FRM;
}
bool may_require_frm_p () const override { return true; }
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred (CODE, e.vector_mode ()));
}
};
/* Implements vsext.vf2/vsext.vf4/vsext.vf8/vzext.vf2/vzext.vf4/vzext.vf8. */
template<rtx_code CODE>
class ext : public function_base
{
public:
rtx expand (function_expander &e) const override
{
switch (e.op_info->op)
{
case OP_TYPE_vf2:
return e.use_exact_insn (code_for_pred_vf2 (CODE, e.vector_mode ()));
case OP_TYPE_vf4:
return e.use_exact_insn (code_for_pred_vf4 (CODE, e.vector_mode ()));
case OP_TYPE_vf8:
return e.use_exact_insn (code_for_pred_vf8 (CODE, e.vector_mode ()));
default:
gcc_unreachable ();
}
}
};
/* Implements vmulh/vmulhu/vmulhsu. */
template<int UNSPEC>
class vmulh : public function_base
{
public:
rtx expand (function_expander &e) const override
{
switch (e.op_info->op)
{
case OP_TYPE_vx:
return e.use_exact_insn (
code_for_pred_mulh_scalar (UNSPEC, e.vector_mode ()));
case OP_TYPE_vv:
return e.use_exact_insn (
code_for_pred_mulh (UNSPEC, e.vector_mode ()));
default:
gcc_unreachable ();
}
}
};
/* Implements vwadd/vwsub/vwmul. */
template<rtx_code CODE1, rtx_code CODE2 = FLOAT_EXTEND>
class widen_binop : public function_base
{
public:
rtx expand (function_expander &e) const override
{
switch (e.op_info->op)
{
case OP_TYPE_vv:
return e.use_exact_insn (
code_for_pred_dual_widen (CODE1, CODE2, e.vector_mode ()));
case OP_TYPE_vx:
return e.use_exact_insn (
code_for_pred_dual_widen_scalar (CODE1, CODE2, e.vector_mode ()));
case OP_TYPE_wv:
if (CODE1 == PLUS)
return e.use_exact_insn (
code_for_pred_single_widen_add (CODE2, e.vector_mode ()));
else
return e.use_exact_insn (
code_for_pred_single_widen_sub (CODE2, e.vector_mode ()));
case OP_TYPE_wx:
return e.use_exact_insn (
code_for_pred_single_widen_scalar (CODE1, CODE2, e.vector_mode ()));
default:
gcc_unreachable ();
}
}
};
/* Implement vfwadd/vfwsub/vfwmul. */
template<rtx_code CODE, enum frm_op_type FRM_OP = NO_FRM>
class widen_binop_fp : public function_base
{
public:
bool has_rounding_mode_operand_p () const override
{
return FRM_OP == HAS_FRM;
}
bool may_require_frm_p () const override { return true; }
rtx expand (function_expander &e) const override
{
switch (e.op_info->op)
{
case OP_TYPE_vv:
return e.use_exact_insn (
code_for_pred_dual_widen (CODE, e.vector_mode ()));
case OP_TYPE_vf:
return e.use_exact_insn (
code_for_pred_dual_widen_scalar (CODE, e.vector_mode ()));
case OP_TYPE_wv:
if (CODE == PLUS)
return e.use_exact_insn (
code_for_pred_single_widen_add (e.vector_mode ()));
else
return e.use_exact_insn (
code_for_pred_single_widen_sub (e.vector_mode ()));
case OP_TYPE_wf:
return e.use_exact_insn (
code_for_pred_single_widen_scalar (CODE, e.vector_mode ()));
default:
gcc_unreachable ();
}
}
};
/* Implements vwmulsu. */
class vwmulsu : public function_base
{
public:
rtx expand (function_expander &e) const override
{
switch (e.op_info->op)
{
case OP_TYPE_vv:
return e.use_exact_insn (code_for_pred_widen_mulsu (e.vector_mode ()));
case OP_TYPE_vx:
return e.use_exact_insn (
code_for_pred_widen_mulsu_scalar (e.vector_mode ()));
default:
gcc_unreachable ();
}
}
};
/* Implements vwcvt. */
template<rtx_code CODE>
class vwcvt : public function_base
{
public:
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred (CODE, e.vector_mode ()));
}
};
/* Implements vadc. */
class vadc : public function_base
{
public:
bool apply_mask_policy_p () const override { return false; }
bool use_mask_predication_p () const override { return false; }
rtx expand (function_expander &e) const override
{
switch (e.op_info->op)
{
case OP_TYPE_vvm:
return e.use_exact_insn (code_for_pred_adc (e.vector_mode ()));
case OP_TYPE_vxm:
return e.use_exact_insn (code_for_pred_adc_scalar (e.vector_mode ()));
default:
gcc_unreachable ();
}
}
};
/* Implements vsbc. */
class vsbc : public function_base
{
public:
bool apply_mask_policy_p () const override { return false; }
bool use_mask_predication_p () const override { return false; }
rtx expand (function_expander &e) const override
{
switch (e.op_info->op)
{
case OP_TYPE_vvm:
return e.use_exact_insn (code_for_pred_sbc (e.vector_mode ()));
case OP_TYPE_vxm:
return e.use_exact_insn (code_for_pred_sbc_scalar (e.vector_mode ()));
default:
gcc_unreachable ();
}
}
};
/* Implements vmadc. */
class vmadc : public function_base
{
public:
bool apply_tail_policy_p () const override { return false; }
bool apply_mask_policy_p () const override { return false; }
bool use_mask_predication_p () const override { return false; }
bool has_merge_operand_p () const override { return false; }
rtx expand (function_expander &e) const override
{
switch (e.op_info->op)
{
case OP_TYPE_vvm:
return e.use_exact_insn (code_for_pred_madc (e.vector_mode ()));
case OP_TYPE_vxm:
return e.use_exact_insn (code_for_pred_madc_scalar (e.vector_mode ()));
case OP_TYPE_vv:
return e.use_exact_insn (
code_for_pred_madc_overflow (e.vector_mode ()));
case OP_TYPE_vx:
return e.use_exact_insn (
code_for_pred_madc_overflow_scalar (e.vector_mode ()));
default:
gcc_unreachable ();
}
}
};
/* Implements vmsbc. */
class vmsbc : public function_base
{
public:
bool apply_tail_policy_p () const override { return false; }
bool apply_mask_policy_p () const override { return false; }
bool use_mask_predication_p () const override { return false; }
bool has_merge_operand_p () const override { return false; }
rtx expand (function_expander &e) const override
{
switch (e.op_info->op)
{
case OP_TYPE_vvm:
return e.use_exact_insn (code_for_pred_msbc (e.vector_mode ()));
case OP_TYPE_vxm:
return e.use_exact_insn (code_for_pred_msbc_scalar (e.vector_mode ()));
case OP_TYPE_vv:
return e.use_exact_insn (
code_for_pred_msbc_overflow (e.vector_mode ()));
case OP_TYPE_vx:
return e.use_exact_insn (
code_for_pred_msbc_overflow_scalar (e.vector_mode ()));
default:
gcc_unreachable ();
}
}
};
/* Implements vnsrl/vnsra. */
template<rtx_code CODE>
class vnshift : public function_base
{
public:
rtx expand (function_expander &e) const override
{
switch (e.op_info->op)
{
case OP_TYPE_wx:
return e.use_exact_insn (
code_for_pred_narrow_scalar (CODE, e.vector_mode ()));
case OP_TYPE_wv:
return e.use_exact_insn (code_for_pred_narrow (CODE, e.vector_mode ()));
default:
gcc_unreachable ();
}
}
};
/* Implements vncvt. */
class vncvt_x : public function_base
{
public:
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred_trunc (e.vector_mode ()));
}
};
/* Implements vmerge/vfmerge. */
class vmerge : public function_base
{
public:
bool apply_mask_policy_p () const override { return false; }
bool use_mask_predication_p () const override { return false; }
rtx expand (function_expander &e) const override
{
switch (e.op_info->op)
{
case OP_TYPE_vvm:
return e.use_exact_insn (code_for_pred_merge (e.vector_mode ()));
case OP_TYPE_vxm:
case OP_TYPE_vfm:
return e.use_exact_insn (code_for_pred_merge_scalar (e.vector_mode ()));
default:
gcc_unreachable ();
}
}
};
/* Implements vmv.v.x/vmv.v.v/vfmv.v.f. */
class vmv_v : public function_base
{
public:
rtx expand (function_expander &e) const override
{
switch (e.op_info->op)
{
case OP_TYPE_v:
return e.use_exact_insn (code_for_pred_mov (e.vector_mode ()));
case OP_TYPE_x:
case OP_TYPE_f:
return e.use_exact_insn (code_for_pred_broadcast (e.vector_mode ()));
default:
gcc_unreachable ();
}
}
};
/* Implements vaadd/vasub/vsmul/vssra/vssrl. */
template<int UNSPEC>
class sat_op : public function_base
{
public:
bool has_rounding_mode_operand_p () const override { return true; }
bool may_require_vxrm_p () const override { return true; }
rtx expand (function_expander &e) const override
{
switch (e.op_info->op)
{
case OP_TYPE_vx:
return e.use_exact_insn (
code_for_pred_scalar (UNSPEC, e.vector_mode ()));
case OP_TYPE_vv:
return e.use_exact_insn (code_for_pred (UNSPEC, e.vector_mode ()));
default:
gcc_unreachable ();
}
}
};
/* Implements vnclip/vnclipu. */
template<int UNSPEC>
class vnclip : public function_base
{
public:
bool has_rounding_mode_operand_p () const override { return true; }
bool may_require_vxrm_p () const override { return true; }
rtx expand (function_expander &e) const override
{
switch (e.op_info->op)
{
case OP_TYPE_wx:
return e.use_exact_insn (
code_for_pred_narrow_clip_scalar (UNSPEC, e.vector_mode ()));
case OP_TYPE_wv:
return e.use_exact_insn (
code_for_pred_narrow_clip (UNSPEC, e.vector_mode ()));
default:
gcc_unreachable ();
}
}
};
/* Implements vmseq/vmsne/vmslt/vmsgt/vmsle/vmsge. */
template<rtx_code CODE>
class icmp : public function_base
{
public:
rtx expand (function_expander &e) const override
{
switch (e.op_info->op)
{
case OP_TYPE_vx: {
if (CODE == GE || CODE == GEU)
return e.use_compare_insn (CODE, code_for_pred_ge_scalar (
e.vector_mode ()));
else
return e.use_compare_insn (CODE, code_for_pred_cmp_scalar (
e.vector_mode ()));
}
case OP_TYPE_vv: {
if (CODE == LT || CODE == LTU || CODE == GE || CODE == GEU)
return e.use_compare_insn (CODE,
code_for_pred_ltge (e.vector_mode ()));
else
return e.use_compare_insn (CODE,
code_for_pred_cmp (e.vector_mode ()));
}
default:
gcc_unreachable ();
}
}
};
/* Implements vmacc/vnmsac/vmadd/vnmsub. */
class vmacc : public function_base
{
public:
bool has_merge_operand_p () const override { return false; }
rtx expand (function_expander &e) const override
{
if (e.op_info->op == OP_TYPE_vx)
return e.use_ternop_insn (true, code_for_pred_mul_plus_scalar (
e.vector_mode ()));
if (e.op_info->op == OP_TYPE_vv)
return e.use_ternop_insn (true,
code_for_pred_mul_plus (e.vector_mode ()));
gcc_unreachable ();
}
};
class vnmsac : public function_base
{
public:
bool has_merge_operand_p () const override { return false; }
rtx expand (function_expander &e) const override
{
if (e.op_info->op == OP_TYPE_vx)
return e.use_ternop_insn (true, code_for_pred_minus_mul_scalar (
e.vector_mode ()));
if (e.op_info->op == OP_TYPE_vv)
return e.use_ternop_insn (true,
code_for_pred_minus_mul (e.vector_mode ()));
gcc_unreachable ();
}
};
class vmadd : public function_base
{
public:
bool has_merge_operand_p () const override { return false; }
rtx expand (function_expander &e) const override
{
if (e.op_info->op == OP_TYPE_vx)
return e.use_ternop_insn (false, code_for_pred_mul_plus_scalar (
e.vector_mode ()));
if (e.op_info->op == OP_TYPE_vv)
return e.use_ternop_insn (false,
code_for_pred_mul_plus (e.vector_mode ()));
gcc_unreachable ();
}
};
class vnmsub : public function_base
{
public:
bool has_merge_operand_p () const override { return false; }
rtx expand (function_expander &e) const override
{
if (e.op_info->op == OP_TYPE_vx)
return e.use_ternop_insn (false, code_for_pred_minus_mul_scalar (
e.vector_mode ()));
if (e.op_info->op == OP_TYPE_vv)
return e.use_ternop_insn (false,
code_for_pred_minus_mul (e.vector_mode ()));
gcc_unreachable ();
}
};
/* Implements vwmacc<su><su>. */
class vwmacc : public function_base
{
public:
bool has_merge_operand_p () const override { return false; }
rtx expand (function_expander &e) const override
{
if (e.op_info->op == OP_TYPE_vx)
return e.use_widen_ternop_insn (
code_for_pred_widen_mul_plus_scalar (SIGN_EXTEND, e.vector_mode ()));
if (e.op_info->op == OP_TYPE_vv)
return e.use_widen_ternop_insn (
code_for_pred_widen_mul_plus (SIGN_EXTEND, e.vector_mode ()));
gcc_unreachable ();
}
};
class vwmaccu : public function_base
{
public:
bool has_merge_operand_p () const override { return false; }
rtx expand (function_expander &e) const override
{
if (e.op_info->op == OP_TYPE_vx)
return e.use_widen_ternop_insn (
code_for_pred_widen_mul_plus_scalar (ZERO_EXTEND, e.vector_mode ()));
if (e.op_info->op == OP_TYPE_vv)
return e.use_widen_ternop_insn (
code_for_pred_widen_mul_plus (ZERO_EXTEND, e.vector_mode ()));
gcc_unreachable ();
}
};
class vwmaccsu : public function_base
{
public:
bool has_merge_operand_p () const override { return false; }
rtx expand (function_expander &e) const override
{
if (e.op_info->op == OP_TYPE_vx)
return e.use_widen_ternop_insn (
code_for_pred_widen_mul_plussu_scalar (e.vector_mode ()));
if (e.op_info->op == OP_TYPE_vv)
return e.use_widen_ternop_insn (
code_for_pred_widen_mul_plussu (e.vector_mode ()));
gcc_unreachable ();
}
};
class vwmaccus : public function_base
{
public:
bool has_merge_operand_p () const override { return false; }
rtx expand (function_expander &e) const override
{
return e.use_widen_ternop_insn (
code_for_pred_widen_mul_plusus_scalar (e.vector_mode ()));
}
};
/* Implements vmand/vmnand/vmandn/vmxor/vmor/vmnor/vmorn/vmxnor */
template<rtx_code CODE>
class mask_logic : public function_base
{
public:
bool apply_tail_policy_p () const override { return false; }
bool apply_mask_policy_p () const override { return false; }
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred (CODE, e.vector_mode ()));
}
};
template<rtx_code CODE>
class mask_nlogic : public function_base
{
public:
bool apply_tail_policy_p () const override { return false; }
bool apply_mask_policy_p () const override { return false; }
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred_n (CODE, e.vector_mode ()));
}
};
template<rtx_code CODE>
class mask_notlogic : public function_base
{
public:
bool apply_tail_policy_p () const override { return false; }
bool apply_mask_policy_p () const override { return false; }
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred_not (CODE, e.vector_mode ()));
}
};
/* Implements vmmv. */
class vmmv : public function_base
{
public:
bool apply_tail_policy_p () const override { return false; }
bool apply_mask_policy_p () const override { return false; }
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred_mov (e.vector_mode ()));
}
};
/* Implements vmclr. */
class vmclr : public function_base
{
public:
bool can_be_overloaded_p (enum predication_type_index) const override
{
return false;
}
rtx expand (function_expander &e) const override
{
machine_mode mode = TYPE_MODE (TREE_TYPE (e.exp));
e.add_all_one_mask_operand (mode);
e.add_vundef_operand (mode);
e.add_input_operand (mode, CONST0_RTX (mode));
e.add_input_operand (call_expr_nargs (e.exp) - 1);
e.add_input_operand (Pmode, get_avl_type_rtx (avl_type::NONVLMAX));
return e.generate_insn (code_for_pred_mov (e.vector_mode ()));
}
};
/* Implements vmset. */
class vmset : public function_base
{
public:
bool can_be_overloaded_p (enum predication_type_index) const override
{
return false;
}
rtx expand (function_expander &e) const override
{
machine_mode mode = TYPE_MODE (TREE_TYPE (e.exp));
e.add_all_one_mask_operand (mode);
e.add_vundef_operand (mode);
e.add_input_operand (mode, CONSTM1_RTX (mode));
e.add_input_operand (call_expr_nargs (e.exp) - 1);
e.add_input_operand (Pmode, get_avl_type_rtx (avl_type::NONVLMAX));
return e.generate_insn (code_for_pred_mov (e.vector_mode ()));
}
};
/* Implements vmnot. */
class vmnot : public function_base
{
public:
bool apply_tail_policy_p () const override { return false; }
bool apply_mask_policy_p () const override { return false; }
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred_not (e.vector_mode ()));
}
};
/* Implements vcpop. */
class vcpop : public function_base
{
public:
bool apply_tail_policy_p () const override { return false; }
bool apply_mask_policy_p () const override { return false; }
bool has_merge_operand_p () const override { return false; }
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred_popcount (e.vector_mode (), Pmode));
}
};
/* Implements vfirst. */
class vfirst : public function_base
{
public:
bool apply_tail_policy_p () const override { return false; }
bool apply_mask_policy_p () const override { return false; }
bool has_merge_operand_p () const override { return false; }
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred_ffs (e.vector_mode (), Pmode));
}
};
/* Implements vmsbf/vmsif/vmsof. */
template<int UNSPEC>
class mask_misc : public function_base
{
public:
bool apply_tail_policy_p () const override { return false; }
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred (UNSPEC, e.vector_mode ()));
}
};
/* Implements viota. */
class viota : public function_base
{
public:
bool can_be_overloaded_p (enum predication_type_index pred) const override
{
return pred == PRED_TYPE_tu || pred == PRED_TYPE_tum
|| pred == PRED_TYPE_tumu || pred == PRED_TYPE_mu;
}
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred_iota (e.vector_mode ()));
}
};
/* Implements vid. */
class vid : public function_base
{
public:
bool can_be_overloaded_p (enum predication_type_index pred) const override
{
return pred == PRED_TYPE_tu || pred == PRED_TYPE_tum
|| pred == PRED_TYPE_tumu || pred == PRED_TYPE_mu;
}
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred_series (e.vector_mode ()));
}
};
/* Implements vfrsub/vfrdiv. */
template<rtx_code CODE, enum frm_op_type FRM_OP = NO_FRM>
class reverse_binop : public function_base
{
public:
bool has_rounding_mode_operand_p () const override
{
return FRM_OP == HAS_FRM;
}
bool may_require_frm_p () const override { return true; }
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (
code_for_pred_reverse_scalar (CODE, e.vector_mode ()));
}
};
template<enum frm_op_type FRM_OP = NO_FRM>
class vfmacc : public function_base
{
public:
bool has_rounding_mode_operand_p () const override
{
return FRM_OP == HAS_FRM;
}
bool may_require_frm_p () const override { return true; }
bool has_merge_operand_p () const override { return false; }
rtx expand (function_expander &e) const override
{
if (e.op_info->op == OP_TYPE_vf)
return e.use_ternop_insn (true,
code_for_pred_mul_scalar (PLUS,
e.vector_mode ()));
if (e.op_info->op == OP_TYPE_vv)
return e.use_ternop_insn (true,
code_for_pred_mul (PLUS, e.vector_mode ()));
gcc_unreachable ();
}
};
template<enum frm_op_type FRM_OP = NO_FRM>
class vfnmsac : public function_base
{
public:
bool has_rounding_mode_operand_p () const override
{
return FRM_OP == HAS_FRM;
}
bool may_require_frm_p () const override { return true; }
bool has_merge_operand_p () const override { return false; }
rtx expand (function_expander &e) const override
{
if (e.op_info->op == OP_TYPE_vf)
return e.use_ternop_insn (
true, code_for_pred_mul_neg_scalar (PLUS, e.vector_mode ()));
if (e.op_info->op == OP_TYPE_vv)
return e.use_ternop_insn (true,
code_for_pred_mul_neg (PLUS, e.vector_mode ()));
gcc_unreachable ();
}
};
template<enum frm_op_type FRM_OP = NO_FRM>
class vfmadd : public function_base
{
public:
bool has_rounding_mode_operand_p () const override
{
return FRM_OP == HAS_FRM;
}
bool may_require_frm_p () const override { return true; }
bool has_merge_operand_p () const override { return false; }
rtx expand (function_expander &e) const override
{
if (e.op_info->op == OP_TYPE_vf)
return e.use_ternop_insn (false,
code_for_pred_mul_scalar (PLUS,
e.vector_mode ()));
if (e.op_info->op == OP_TYPE_vv)
return e.use_ternop_insn (false,
code_for_pred_mul (PLUS, e.vector_mode ()));
gcc_unreachable ();
}
};
template<enum frm_op_type FRM_OP = NO_FRM>
class vfnmsub : public function_base
{
public:
bool has_rounding_mode_operand_p () const override
{
return FRM_OP == HAS_FRM;
}
bool may_require_frm_p () const override { return true; }
bool has_merge_operand_p () const override { return false; }
rtx expand (function_expander &e) const override
{
if (e.op_info->op == OP_TYPE_vf)
return e.use_ternop_insn (
false, code_for_pred_mul_neg_scalar (PLUS, e.vector_mode ()));
if (e.op_info->op == OP_TYPE_vv)
return e.use_ternop_insn (false,
code_for_pred_mul_neg (PLUS, e.vector_mode ()));
gcc_unreachable ();
}
};
template<enum frm_op_type FRM_OP = NO_FRM>
class vfnmacc : public function_base
{
public:
bool has_rounding_mode_operand_p () const override
{
return FRM_OP == HAS_FRM;
}
bool may_require_frm_p () const override { return true; }
bool has_merge_operand_p () const override { return false; }
rtx expand (function_expander &e) const override
{
if (e.op_info->op == OP_TYPE_vf)
return e.use_ternop_insn (
true, code_for_pred_mul_neg_scalar (MINUS, e.vector_mode ()));
if (e.op_info->op == OP_TYPE_vv)
return e.use_ternop_insn (true,
code_for_pred_mul_neg (MINUS, e.vector_mode ()));
gcc_unreachable ();
}
};
template<enum frm_op_type FRM_OP = NO_FRM>
class vfmsac : public function_base
{
public:
bool has_rounding_mode_operand_p () const override
{
return FRM_OP == HAS_FRM;
}
bool may_require_frm_p () const override { return true; }
bool has_merge_operand_p () const override { return false; }
rtx expand (function_expander &e) const override
{
if (e.op_info->op == OP_TYPE_vf)
return e.use_ternop_insn (true,
code_for_pred_mul_scalar (MINUS,
e.vector_mode ()));
if (e.op_info->op == OP_TYPE_vv)
return e.use_ternop_insn (true,
code_for_pred_mul (MINUS, e.vector_mode ()));
gcc_unreachable ();
}
};
template<enum frm_op_type FRM_OP = NO_FRM>
class vfnmadd : public function_base
{
public:
bool has_rounding_mode_operand_p () const override
{
return FRM_OP == HAS_FRM;
}
bool may_require_frm_p () const override { return true; }
bool has_merge_operand_p () const override { return false; }
rtx expand (function_expander &e) const override
{
if (e.op_info->op == OP_TYPE_vf)
return e.use_ternop_insn (
false, code_for_pred_mul_neg_scalar (MINUS, e.vector_mode ()));
if (e.op_info->op == OP_TYPE_vv)
return e.use_ternop_insn (false,
code_for_pred_mul_neg (MINUS, e.vector_mode ()));
gcc_unreachable ();
}
};
template<enum frm_op_type FRM_OP = NO_FRM>
class vfmsub : public function_base
{
public:
bool has_rounding_mode_operand_p () const override
{
return FRM_OP == HAS_FRM;
}
bool may_require_frm_p () const override { return true; }
bool has_merge_operand_p () const override { return false; }
rtx expand (function_expander &e) const override
{
if (e.op_info->op == OP_TYPE_vf)
return e.use_ternop_insn (false,
code_for_pred_mul_scalar (MINUS,
e.vector_mode ()));
if (e.op_info->op == OP_TYPE_vv)
return e.use_ternop_insn (false,
code_for_pred_mul (MINUS, e.vector_mode ()));
gcc_unreachable ();
}
};
template<enum frm_op_type FRM_OP = NO_FRM>
class vfwmacc : public function_base
{
public:
bool has_rounding_mode_operand_p () const override
{
return FRM_OP == HAS_FRM;
}
bool may_require_frm_p () const override { return true; }
bool has_merge_operand_p () const override { return false; }
rtx expand (function_expander &e) const override
{
if (e.op_info->op == OP_TYPE_vf)
return e.use_widen_ternop_insn (
code_for_pred_widen_mul_scalar (PLUS, e.vector_mode ()));
if (e.op_info->op == OP_TYPE_vv)
return e.use_widen_ternop_insn (
code_for_pred_widen_mul (PLUS, e.vector_mode ()));
gcc_unreachable ();
}
};
template<enum frm_op_type FRM_OP = NO_FRM>
class vfwnmacc : public function_base
{
public:
bool has_rounding_mode_operand_p () const override
{
return FRM_OP == HAS_FRM;
}
bool may_require_frm_p () const override { return true; }
bool has_merge_operand_p () const override { return false; }
rtx expand (function_expander &e) const override
{
if (e.op_info->op == OP_TYPE_vf)
return e.use_widen_ternop_insn (
code_for_pred_widen_mul_neg_scalar (MINUS, e.vector_mode ()));
if (e.op_info->op == OP_TYPE_vv)
return e.use_widen_ternop_insn (
code_for_pred_widen_mul_neg (MINUS, e.vector_mode ()));
gcc_unreachable ();
}
};
template<enum frm_op_type FRM_OP = NO_FRM>
class vfwmsac : public function_base
{
public:
bool has_rounding_mode_operand_p () const override
{
return FRM_OP == HAS_FRM;
}
bool may_require_frm_p () const override { return true; }
bool has_merge_operand_p () const override { return false; }
rtx expand (function_expander &e) const override
{
if (e.op_info->op == OP_TYPE_vf)
return e.use_widen_ternop_insn (
code_for_pred_widen_mul_scalar (MINUS, e.vector_mode ()));
if (e.op_info->op == OP_TYPE_vv)
return e.use_widen_ternop_insn (
code_for_pred_widen_mul (MINUS, e.vector_mode ()));
gcc_unreachable ();
}
};
template<enum frm_op_type FRM_OP = NO_FRM>
class vfwnmsac : public function_base
{
public:
bool has_rounding_mode_operand_p () const override
{
return FRM_OP == HAS_FRM;
}
bool may_require_frm_p () const override { return true; }
bool has_merge_operand_p () const override { return false; }
rtx expand (function_expander &e) const override
{
if (e.op_info->op == OP_TYPE_vf)
return e.use_widen_ternop_insn (
code_for_pred_widen_mul_neg_scalar (PLUS, e.vector_mode ()));
if (e.op_info->op == OP_TYPE_vv)
return e.use_widen_ternop_insn (
code_for_pred_widen_mul_neg (PLUS, e.vector_mode ()));
gcc_unreachable ();
}
};
/* Implements vfsqrt7/vfrec7/vfclass/vfsgnj/vfsgnjx. */
template<int UNSPEC, enum frm_op_type FRM_OP = NO_FRM>
class float_misc : public function_base
{
public:
bool has_rounding_mode_operand_p () const override
{
return FRM_OP == HAS_FRM;
}
bool may_require_frm_p () const override { return true; }
rtx expand (function_expander &e) const override
{
if (e.op_info->op == OP_TYPE_vf)
return e.use_exact_insn (code_for_pred_scalar (UNSPEC, e.vector_mode ()));
if (e.op_info->op == OP_TYPE_vv || e.op_info->op == OP_TYPE_v)
return e.use_exact_insn (code_for_pred (UNSPEC, e.vector_mode ()));
gcc_unreachable ();
}
};
/* Implements vfsgnjn. */
class vfsgnjn : public function_base
{
public:
rtx expand (function_expander &e) const override
{
if (e.op_info->op == OP_TYPE_vf)
return e.use_exact_insn (code_for_pred_ncopysign_scalar (e.vector_mode ()));
if (e.op_info->op == OP_TYPE_vv)
return e.use_exact_insn (code_for_pred_ncopysign (e.vector_mode ()));
gcc_unreachable ();
}
};
/* Implements vmfeq/vmfne/vmflt/vmfgt/vmfle/vmfge. */
template<rtx_code CODE>
class fcmp : public function_base
{
public:
rtx expand (function_expander &e) const override
{
switch (e.op_info->op)
{
case OP_TYPE_vf: {
return e.use_compare_insn (CODE, code_for_pred_cmp_scalar (
e.vector_mode ()));
}
case OP_TYPE_vv: {
return e.use_compare_insn (CODE,
code_for_pred_cmp (e.vector_mode ()));
}
default:
gcc_unreachable ();
}
}
};
/* Implements vfclass. */
class vfclass : public function_base
{
public:
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred_class (e.arg_mode (0)));
}
};
/* Implements vfcvt.x. */
template<int UNSPEC, enum frm_op_type FRM_OP = NO_FRM>
class vfcvt_x : public function_base
{
public:
bool has_rounding_mode_operand_p () const override
{
return FRM_OP == HAS_FRM;
}
bool may_require_frm_p () const override { return true; }
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred_fcvt_x_f (UNSPEC, e.arg_mode (0)));
}
};
/* Implements vfcvt.rtz.x. */
template<rtx_code CODE>
class vfcvt_rtz_x : public function_base
{
public:
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred (CODE, e.arg_mode (0)));
}
};
template<enum frm_op_type FRM_OP = NO_FRM>
class vfcvt_f : public function_base
{
public:
bool has_rounding_mode_operand_p () const override
{
return FRM_OP == HAS_FRM;
}
bool may_require_frm_p () const override { return true; }
rtx expand (function_expander &e) const override
{
if (e.op_info->op == OP_TYPE_x_v)
return e.use_exact_insn (code_for_pred (FLOAT, e.vector_mode ()));
if (e.op_info->op == OP_TYPE_xu_v)
return e.use_exact_insn (
code_for_pred (UNSIGNED_FLOAT, e.vector_mode ()));
gcc_unreachable ();
}
};
/* Implements vfwcvt.x. */
template<int UNSPEC, enum frm_op_type FRM_OP = NO_FRM>
class vfwcvt_x : public function_base
{
public:
bool has_rounding_mode_operand_p () const override
{
return FRM_OP == HAS_FRM;
}
bool may_require_frm_p () const override { return true; }
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (
code_for_pred_widen_fcvt_x_f (UNSPEC, e.vector_mode ()));
}
};
/* Implements vfwcvt.rtz.x. */
template<rtx_code CODE>
class vfwcvt_rtz_x : public function_base
{
public:
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred_widen (CODE, e.vector_mode ()));
}
};
class vfwcvt_f : public function_base
{
public:
rtx expand (function_expander &e) const override
{
if (e.op_info->op == OP_TYPE_f_v)
return e.use_exact_insn (code_for_pred_extend (e.vector_mode ()));
if (e.op_info->op == OP_TYPE_x_v)
return e.use_exact_insn (code_for_pred_widen (FLOAT, e.vector_mode ()));
if (e.op_info->op == OP_TYPE_xu_v)
return e.use_exact_insn (
code_for_pred_widen (UNSIGNED_FLOAT, e.vector_mode ()));
gcc_unreachable ();
}
};
/* Implements vfncvt.x. */
template<int UNSPEC, enum frm_op_type FRM_OP = NO_FRM>
class vfncvt_x : public function_base
{
public:
bool has_rounding_mode_operand_p () const override
{
return FRM_OP == HAS_FRM;
}
bool may_require_frm_p () const override { return true; }
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (
code_for_pred_narrow_fcvt_x_f (UNSPEC, e.arg_mode (0)));
}
};
/* Implements vfncvt.rtz.x. */
template<rtx_code CODE>
class vfncvt_rtz_x : public function_base
{
public:
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred_narrow (CODE, e.vector_mode ()));
}
};
template<enum frm_op_type FRM_OP = NO_FRM>
class vfncvt_f : public function_base
{
public:
bool has_rounding_mode_operand_p () const override
{
return FRM_OP == HAS_FRM;
}
bool may_require_frm_p () const override { return true; }
rtx expand (function_expander &e) const override
{
if (e.op_info->op == OP_TYPE_f_w)
return e.use_exact_insn (code_for_pred_trunc (e.vector_mode ()));
if (e.op_info->op == OP_TYPE_x_w)
return e.use_exact_insn (code_for_pred_narrow (FLOAT, e.arg_mode (0)));
if (e.op_info->op == OP_TYPE_xu_w)
return e.use_exact_insn (
code_for_pred_narrow (UNSIGNED_FLOAT, e.arg_mode (0)));
gcc_unreachable ();
}
};
class vfncvt_rod_f : public function_base
{
public:
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred_rod_trunc (e.vector_mode ()));
}
};
/* Implements reduction instructions. */
template<unsigned UNSPEC>
class reducop : public function_base
{
public:
bool apply_mask_policy_p () const override { return false; }
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred (UNSPEC, e.vector_mode ()));
}
};
/* Implements floating-point reduction instructions. */
template<unsigned UNSPEC, enum frm_op_type FRM_OP = NO_FRM>
class freducop : public function_base
{
public:
bool has_rounding_mode_operand_p () const override
{
return FRM_OP == HAS_FRM;
}
bool may_require_frm_p () const override { return true; }
bool apply_mask_policy_p () const override { return false; }
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred (UNSPEC, e.vector_mode ()));
}
};
/* Implements vmv/vfmv instructions. */
class vmv : public function_base
{
public:
bool apply_vl_p () const override { return false; }
bool apply_tail_policy_p () const override { return false; }
bool apply_mask_policy_p () const override { return false; }
bool use_mask_predication_p () const override { return false; }
bool has_merge_operand_p () const override { return false; }
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred_extract_first (e.vector_mode ()));
}
};
/* Implements vmv.s.x/vfmv.s.f. */
class vmv_s : public function_base
{
public:
rtx expand (function_expander &e) const override
{
return e.use_scalar_move_insn (code_for_pred_broadcast (e.vector_mode ()));
}
};
template<int UNSPEC>
class slideop : public function_base
{
public:
bool has_merge_operand_p () const override
{
if (UNSPEC == UNSPEC_VSLIDEUP)
return false;
return true;
}
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred_slide (UNSPEC, e.vector_mode ()));
}
};
class vrgather : public function_base
{
public:
rtx expand (function_expander &e) const override
{
switch (e.op_info->op)
{
case OP_TYPE_vx:
return e.use_exact_insn (
code_for_pred_gather_scalar (e.vector_mode ()));
case OP_TYPE_vv:
return e.use_exact_insn (code_for_pred_gather (e.vector_mode ()));
default:
gcc_unreachable ();
}
}
};
class vrgatherei16 : public function_base
{
public:
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred_gatherei16 (e.vector_mode ()));
}
};
class vcompress : public function_base
{
public:
bool apply_mask_policy_p () const override { return false; }
bool use_mask_predication_p () const override { return false; }
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred_compress (e.vector_mode ()));
}
};
class vundefined : public function_base
{
public:
bool apply_vl_p () const override
{
return false;
}
rtx expand (function_expander &e) const override
{
return e.generate_insn (code_for_vundefined (e.vector_mode ()));
}
};
class vreinterpret : public function_base
{
public:
bool apply_vl_p () const override
{
return false;
}
rtx expand (function_expander &e) const override
{
e.add_input_operand (0);
return e.generate_insn (code_for_vreinterpret (e.ret_mode ()));
}
};
class vlmul_ext : public function_base
{
public:
bool apply_vl_p () const override
{
return false;
}
rtx expand (function_expander &e) const override
{
if (!e.target)
return NULL_RTX;
tree arg = CALL_EXPR_ARG (e.exp, 0);
rtx src = expand_normal (arg);
emit_move_insn (gen_lowpart (e.vector_mode (), e.target), src);
return e.target;
}
};
class vlmul_trunc : public function_base
{
public:
bool apply_vl_p () const override { return false; }
rtx expand (function_expander &e) const override
{
if (!e.target)
return NULL_RTX;
rtx src = expand_normal (CALL_EXPR_ARG (e.exp, 0));
emit_move_insn (e.target, gen_lowpart (GET_MODE (e.target), src));
return e.target;
}
};
class vset : public function_base
{
public:
bool apply_vl_p () const override { return false; }
gimple *fold (gimple_folder &f) const override
{
tree rhs_tuple = gimple_call_arg (f.call, 0);
/* LMUL > 1 non-tuple vector types are not structure,
we can't use __val[index] to set the subpart. */
if (!riscv_v_ext_tuple_mode_p (TYPE_MODE (TREE_TYPE (rhs_tuple))))
return NULL;
tree index = gimple_call_arg (f.call, 1);
tree rhs_vector = gimple_call_arg (f.call, 2);
/* Replace the call with two statements: a copy of the full tuple
to the call result, followed by an update of the individual vector.
The fold routines expect the replacement statement to have the
same lhs as the original call, so return the copy statement
rather than the field update. */
gassign *copy = gimple_build_assign (unshare_expr (f.lhs), rhs_tuple);
/* Get a reference to the individual vector. */
tree field = tuple_type_field (TREE_TYPE (f.lhs));
tree lhs_array
= build3 (COMPONENT_REF, TREE_TYPE (field), f.lhs, field, NULL_TREE);
tree lhs_vector = build4 (ARRAY_REF, TREE_TYPE (rhs_vector), lhs_array,
index, NULL_TREE, NULL_TREE);
gassign *update = gimple_build_assign (lhs_vector, rhs_vector);
gsi_insert_after (f.gsi, update, GSI_SAME_STMT);
return copy;
}
rtx expand (function_expander &e) const override
{
if (!e.target)
return NULL_RTX;
rtx dest = expand_normal (CALL_EXPR_ARG (e.exp, 0));
gcc_assert (riscv_v_ext_vector_mode_p (GET_MODE (dest)));
rtx index = expand_normal (CALL_EXPR_ARG (e.exp, 1));
rtx src = expand_normal (CALL_EXPR_ARG (e.exp, 2));
poly_int64 offset = INTVAL (index) * GET_MODE_SIZE (GET_MODE (src));
emit_move_insn (e.target, dest);
rtx subreg = simplify_gen_subreg (GET_MODE (src), e.target,
GET_MODE (e.target), offset);
emit_move_insn (subreg, src);
return e.target;
}
};
class vget : public function_base
{
public:
bool apply_vl_p () const override { return false; }
gimple *fold (gimple_folder &f) const override
{
/* Fold into a normal gimple component access. */
tree rhs_tuple = gimple_call_arg (f.call, 0);
/* LMUL > 1 non-tuple vector types are not structure,
we can't use __val[index] to get the subpart. */
if (!riscv_v_ext_tuple_mode_p (TYPE_MODE (TREE_TYPE (rhs_tuple))))
return NULL;
tree index = gimple_call_arg (f.call, 1);
tree field = tuple_type_field (TREE_TYPE (rhs_tuple));
tree rhs_array
= build3 (COMPONENT_REF, TREE_TYPE (field), rhs_tuple, field, NULL_TREE);
tree rhs_vector = build4 (ARRAY_REF, TREE_TYPE (f.lhs), rhs_array, index,
NULL_TREE, NULL_TREE);
return gimple_build_assign (f.lhs, rhs_vector);
}
rtx expand (function_expander &e) const override
{
if (!e.target)
return NULL_RTX;
rtx src = expand_normal (CALL_EXPR_ARG (e.exp, 0));
gcc_assert (riscv_v_ext_vector_mode_p (GET_MODE (src)));
rtx index = expand_normal (CALL_EXPR_ARG (e.exp, 1));
poly_int64 offset = INTVAL (index) * GET_MODE_SIZE (GET_MODE (e.target));
rtx subreg
= simplify_gen_subreg (GET_MODE (e.target), src, GET_MODE (src), offset);
return subreg;
}
};
class vcreate : public function_base
{
public:
gimple *fold (gimple_folder &f) const override
{
unsigned int nargs = gimple_call_num_args (f.call);
tree lhs_type = TREE_TYPE (f.lhs);
/* LMUL > 1 non-tuple vector types are not structure,
we can't use __val[index] to set the subpart. */
if (!riscv_v_ext_tuple_mode_p (TYPE_MODE (lhs_type)))
return NULL;
/* Replace the call with a clobber of the result (to prevent it from
becoming upwards exposed) followed by stores into each individual
vector of tuple.
The fold routines expect the replacement statement to have the
same lhs as the original call, so return the clobber statement
rather than the final vector store. */
gassign *clobber = gimple_build_assign (f.lhs, build_clobber (lhs_type));
for (unsigned int i = nargs; i-- > 0; )
{
tree rhs_vector = gimple_call_arg (f.call, i);
tree field = tuple_type_field (TREE_TYPE (f.lhs));
tree lhs_array = build3 (COMPONENT_REF, TREE_TYPE (field),
unshare_expr (f.lhs), field, NULL_TREE);
tree lhs_vector = build4 (ARRAY_REF, TREE_TYPE (rhs_vector),
lhs_array, size_int (i),
NULL_TREE, NULL_TREE);
gassign *assign = gimple_build_assign (lhs_vector, rhs_vector);
gsi_insert_after (f.gsi, assign, GSI_SAME_STMT);
}
return clobber;
}
rtx expand (function_expander &e) const override
{
if (!e.target)
return NULL_RTX;
gcc_assert (riscv_v_ext_vector_mode_p (GET_MODE (e.target)));
unsigned int nargs = call_expr_nargs (e.exp);
for (unsigned int i = 0; i < nargs; i++)
{
rtx src = expand_normal (CALL_EXPR_ARG (e.exp, i));
poly_int64 offset = i * GET_MODE_SIZE (GET_MODE (src));
rtx subreg = simplify_gen_subreg (GET_MODE (src), e.target,
GET_MODE (e.target), offset);
emit_move_insn (subreg, src);
}
return e.target;
}
};
class read_vl : public function_base
{
public:
unsigned int call_properties (const function_instance &) const override
{
return CP_READ_CSR;
}
rtx expand (function_expander &e) const override
{
if (Pmode == SImode)
emit_insn (gen_read_vlsi (e.target));
else
emit_insn (gen_read_vldi_zero_extend (e.target));
return e.target;
}
};
class vleff : public function_base
{
public:
unsigned int call_properties (const function_instance &) const override
{
return CP_READ_MEMORY | CP_WRITE_CSR;
}
bool can_be_overloaded_p (enum predication_type_index pred) const override
{
return pred != PRED_TYPE_none;
}
gimple *fold (gimple_folder &f) const override
{
return fold_fault_load (f);
}
rtx expand (function_expander &e) const override
{
return e.use_contiguous_load_insn (
code_for_pred_fault_load (e.vector_mode ()));
}
};
/* Implements vlenb. */
class vlenb : public function_base
{
public:
bool apply_vl_p () const override { return false; }
rtx expand (function_expander &e) const override
{
machine_mode mode = GET_MODE (e.target);
rtx vlenb = gen_int_mode (BYTES_PER_RISCV_VECTOR, mode);
emit_move_insn (e.target, vlenb);
return e.target;
}
};
/* Implements vlseg.v. */
class vlseg : public function_base
{
public:
unsigned int call_properties (const function_instance &) const override
{
return CP_READ_MEMORY;
}
bool can_be_overloaded_p (enum predication_type_index pred) const override
{
return pred != PRED_TYPE_none;
}
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (
code_for_pred_unit_strided_load (e.vector_mode ()));
}
};
/* Implements vsseg.v. */
class vsseg : public function_base
{
public:
bool apply_tail_policy_p () const override { return false; }
bool apply_mask_policy_p () const override { return false; }
unsigned int call_properties (const function_instance &) const override
{
return CP_WRITE_MEMORY;
}
bool can_be_overloaded_p (enum predication_type_index) const override
{
return true;
}
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (
code_for_pred_unit_strided_store (e.vector_mode ()));
}
};
/* Implements vlsseg.v. */
class vlsseg : public function_base
{
public:
unsigned int call_properties (const function_instance &) const override
{
return CP_READ_MEMORY;
}
bool can_be_overloaded_p (enum predication_type_index pred) const override
{
return pred != PRED_TYPE_none;
}
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (
code_for_pred_strided_load (e.vector_mode ()));
}
};
/* Implements vssseg.v. */
class vssseg : public function_base
{
public:
bool apply_tail_policy_p () const override { return false; }
bool apply_mask_policy_p () const override { return false; }
unsigned int call_properties (const function_instance &) const override
{
return CP_WRITE_MEMORY;
}
bool can_be_overloaded_p (enum predication_type_index) const override
{
return true;
}
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (
code_for_pred_strided_store (e.vector_mode ()));
}
};
template<int UNSPEC>
class seg_indexed_load : public function_base
{
public:
unsigned int call_properties (const function_instance &) const override
{
return CP_READ_MEMORY;
}
bool can_be_overloaded_p (enum predication_type_index) const override
{
return true;
}
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (
code_for_pred_indexed_load (UNSPEC, e.vector_mode (), e.index_mode ()));
}
};
template<int UNSPEC>
class seg_indexed_store : public function_base
{
public:
bool apply_tail_policy_p () const override { return false; }
bool apply_mask_policy_p () const override { return false; }
unsigned int call_properties (const function_instance &) const override
{
return CP_WRITE_MEMORY;
}
bool can_be_overloaded_p (enum predication_type_index) const override
{
return true;
}
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (
code_for_pred_indexed_store (UNSPEC, e.vector_mode (), e.index_mode ()));
}
};
/* Implements vlsegff.v. */
class vlsegff : public function_base
{
public:
unsigned int call_properties (const function_instance &) const override
{
return CP_READ_MEMORY | CP_WRITE_CSR;
}
bool can_be_overloaded_p (enum predication_type_index pred) const override
{
return pred != PRED_TYPE_none;
}
gimple *fold (gimple_folder &f) const override
{
return fold_fault_load (f);
}
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred_fault_load (e.vector_mode ()));
}
};
/* Implements
* th.vl(b/h/w)[u].v/th.vs(b/h/w)[u].v/th.vls(b/h/w)[u].v/th.vss(b/h/w)[u].v/
* th.vlx(b/h/w)[u].v/th.vs[u]x(b/h/w).v
* codegen. */
template<bool STORE_P, lst_type LST_TYPE, int UNSPEC>
class th_loadstore_width : public function_base
{
public:
bool apply_tail_policy_p () const override { return !STORE_P; }
bool apply_mask_policy_p () const override { return !STORE_P; }
unsigned int call_properties (const function_instance &) const override
{
if (STORE_P)
return CP_WRITE_MEMORY;
else
return CP_READ_MEMORY;
}
bool can_be_overloaded_p (enum predication_type_index pred) const override
{
if (STORE_P || LST_TYPE == LST_INDEXED)
return true;
return pred != PRED_TYPE_none;
}
rtx expand (function_expander &e) const override
{
gcc_assert (TARGET_XTHEADVECTOR);
if (LST_TYPE == LST_INDEXED)
{
if (STORE_P)
return e.use_exact_insn (
code_for_pred_indexed_store_width (UNSPEC, UNSPEC,
e.vector_mode ()));
else
return e.use_exact_insn (
code_for_pred_indexed_load_width (UNSPEC, e.vector_mode ()));
}
else if (LST_TYPE == LST_STRIDED)
{
if (STORE_P)
return e.use_contiguous_store_insn (
code_for_pred_strided_store_width (UNSPEC, e.vector_mode ()));
else
return e.use_contiguous_load_insn (
code_for_pred_strided_load_width (UNSPEC, e.vector_mode ()));
}
else
{
if (STORE_P)
return e.use_contiguous_store_insn (
code_for_pred_store_width (UNSPEC, e.vector_mode ()));
else
return e.use_contiguous_load_insn (
code_for_pred_mov_width (UNSPEC, e.vector_mode ()));
}
}
};
/* Implements vext.x.v. */
class th_extract : public function_base
{
public:
bool apply_vl_p () const override { return false; }
bool apply_tail_policy_p () const override { return false; }
bool apply_mask_policy_p () const override { return false; }
bool use_mask_predication_p () const override { return false; }
bool has_merge_operand_p () const override { return false; }
rtx expand (function_expander &e) const override
{
gcc_assert (TARGET_XTHEADVECTOR);
return e.use_exact_insn (code_for_pred_th_extract (e.vector_mode ()));
}
};
/* Below implements are vector crypto */
/* Implements vandn.[vv,vx] */
class vandn : public function_base
{
public:
rtx expand (function_expander &e) const override
{
switch (e.op_info->op)
{
case OP_TYPE_vv:
return e.use_exact_insn (code_for_pred_vandn (e.vector_mode ()));
case OP_TYPE_vx:
return e.use_exact_insn (code_for_pred_vandn_scalar (e.vector_mode ()));
default:
gcc_unreachable ();
}
}
};
/* Implements vrol/vror/clz/ctz. */
template<rtx_code CODE>
class bitmanip : public function_base
{
public:
bool apply_tail_policy_p () const override
{
return (CODE == CLZ || CODE == CTZ) ? false : true;
}
bool apply_mask_policy_p () const override
{
return (CODE == CLZ || CODE == CTZ) ? false : true;
}
bool has_merge_operand_p () const override
{
return (CODE == CLZ || CODE == CTZ) ? false : true;
}
rtx expand (function_expander &e) const override
{
switch (e.op_info->op)
{
case OP_TYPE_v:
case OP_TYPE_vv:
return e.use_exact_insn (code_for_pred_v (CODE, e.vector_mode ()));
case OP_TYPE_vx:
return e.use_exact_insn (code_for_pred_v_scalar (CODE, e.vector_mode ()));
default:
gcc_unreachable ();
}
}
};
/* Implements vbrev/vbrev8/vrev8. */
template<int UNSPEC>
class b_reverse : public function_base
{
public:
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred_v (UNSPEC, e.vector_mode ()));
}
};
class vwsll : public function_base
{
public:
rtx expand (function_expander &e) const override
{
switch (e.op_info->op)
{
case OP_TYPE_vv:
return e.use_exact_insn (code_for_pred_vwsll (e.vector_mode ()));
case OP_TYPE_vx:
return e.use_exact_insn (code_for_pred_vwsll_scalar (e.vector_mode ()));
default:
gcc_unreachable ();
}
}
};
/* Implements clmul */
template<int UNSPEC>
class clmul : public function_base
{
public:
rtx expand (function_expander &e) const override
{
switch (e.op_info->op)
{
case OP_TYPE_vv:
return e.use_exact_insn (
code_for_pred_vclmul (UNSPEC, e.vector_mode ()));
case OP_TYPE_vx:
return e.use_exact_insn
(code_for_pred_vclmul_scalar (UNSPEC, e.vector_mode ()));
default:
gcc_unreachable ();
}
}
};
/* Implements vghsh/vsh2ms/vsha2c[hl]. */
template<int UNSPEC>
class vg_nhab : public function_base
{
public:
bool apply_mask_policy_p () const override { return false; }
bool use_mask_predication_p () const override { return false; }
bool has_merge_operand_p () const override { return false; }
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred_v (UNSPEC, e.vector_mode ()));
}
};
/* Implements vgmul/vaes*. */
template<int UNSPEC>
class crypto_vv : public function_base
{
public:
bool apply_mask_policy_p () const override { return false; }
bool use_mask_predication_p () const override { return false; }
bool has_merge_operand_p () const override { return false; }
rtx expand (function_expander &e) const override
{
poly_uint64 nunits = 0U;
switch (e.op_info->op)
{
case OP_TYPE_vv:
if (UNSPEC == UNSPEC_VGMUL)
return e.use_exact_insn
(code_for_pred_crypto_vv (UNSPEC, UNSPEC, e.vector_mode ()));
else
return e.use_exact_insn
(code_for_pred_crypto_vv (UNSPEC + 1, UNSPEC + 1, e.vector_mode ()));
case OP_TYPE_vs:
/* Calculate the ratio between arg0 and arg1*/
gcc_assert (multiple_p (GET_MODE_BITSIZE (e.arg_mode (0)),
GET_MODE_BITSIZE (e.arg_mode (1)), &nunits));
if (maybe_eq (nunits, 1U))
return e.use_exact_insn (code_for_pred_crypto_vvx1_scalar
(UNSPEC + 2, UNSPEC + 2, e.vector_mode ()));
else if (maybe_eq (nunits, 2U))
return e.use_exact_insn (code_for_pred_crypto_vvx2_scalar
(UNSPEC + 2, UNSPEC + 2, e.vector_mode ()));
else if (maybe_eq (nunits, 4U))
return e.use_exact_insn (code_for_pred_crypto_vvx4_scalar
(UNSPEC + 2, UNSPEC + 2, e.vector_mode ()));
else if (maybe_eq (nunits, 8U))
return e.use_exact_insn (code_for_pred_crypto_vvx8_scalar
(UNSPEC + 2, UNSPEC + 2, e.vector_mode ()));
else
return e.use_exact_insn (code_for_pred_crypto_vvx16_scalar
(UNSPEC + 2, UNSPEC + 2, e.vector_mode ()));
default:
gcc_unreachable ();
}
}
};
/* Implements vaeskf1/vsm4k. */
template<int UNSPEC>
class crypto_vi : public function_base
{
public:
bool apply_mask_policy_p () const override { return false; }
bool use_mask_predication_p () const override { return false; }
rtx expand (function_expander &e) const override
{
return e.use_exact_insn
(code_for_pred_crypto_vi_scalar (UNSPEC, e.vector_mode ()));
}
};
/* Implements vaeskf2/vsm3c. */
template<int UNSPEC>
class vaeskf2_vsm3c : public function_base
{
public:
bool apply_mask_policy_p () const override { return false; }
bool use_mask_predication_p () const override { return false; }
bool has_merge_operand_p () const override { return false; }
rtx expand (function_expander &e) const override
{
return e.use_exact_insn
(code_for_pred_vi_nomaskedoff_scalar (UNSPEC, e.vector_mode ()));
}
};
/* Implements vsm3me. */
class vsm3me : public function_base
{
public:
bool apply_mask_policy_p () const override { return false; }
bool use_mask_predication_p () const override { return false; }
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred_vsm3me (e.vector_mode ()));
}
};
/* Implements vfncvtbf16_f. */
template <enum frm_op_type FRM_OP = NO_FRM>
class vfncvtbf16_f : public function_base
{
public:
bool has_rounding_mode_operand_p () const override
{
return FRM_OP == HAS_FRM;
}
bool may_require_frm_p () const override { return true; }
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred_trunc_to_bf16 (e.vector_mode ()));
}
};
/* Implements vfwcvtbf16_f. */
class vfwcvtbf16_f : public function_base
{
public:
rtx expand (function_expander &e) const override
{
return e.use_exact_insn (code_for_pred_extend_bf16_to (e.vector_mode ()));
}
};
/* Implements vfwmaccbf16. */
template <enum frm_op_type FRM_OP = NO_FRM>
class vfwmaccbf16 : public function_base
{
public:
bool has_rounding_mode_operand_p () const override
{
return FRM_OP == HAS_FRM;
}
bool may_require_frm_p () const override { return true; }
bool has_merge_operand_p () const override { return false; }
rtx expand (function_expander &e) const override
{
if (e.op_info->op == OP_TYPE_vf)
return e.use_widen_ternop_insn (
code_for_pred_widen_bf16_mul_scalar (e.vector_mode ()));
if (e.op_info->op == OP_TYPE_vv)
return e.use_widen_ternop_insn (
code_for_pred_widen_bf16_mul (e.vector_mode ()));
gcc_unreachable ();
}
};
static CONSTEXPR const vsetvl<false> vsetvl_obj;
static CONSTEXPR const vsetvl<true> vsetvlmax_obj;
static CONSTEXPR const loadstore<false, LST_UNIT_STRIDE, false> vle_obj;
static CONSTEXPR const loadstore<true, LST_UNIT_STRIDE, false> vse_obj;
static CONSTEXPR const loadstore<false, LST_UNIT_STRIDE, false> vlm_obj;
static CONSTEXPR const loadstore<true, LST_UNIT_STRIDE, false> vsm_obj;
static CONSTEXPR const loadstore<false, LST_STRIDED, false> vlse_obj;
static CONSTEXPR const loadstore<true, LST_STRIDED, false> vsse_obj;
static CONSTEXPR const loadstore<false, LST_INDEXED, false> vluxei8_obj;
static CONSTEXPR const loadstore<false, LST_INDEXED, false> vluxei16_obj;
static CONSTEXPR const loadstore<false, LST_INDEXED, false> vluxei32_obj;
static CONSTEXPR const loadstore<false, LST_INDEXED, false> vluxei64_obj;
static CONSTEXPR const loadstore<false, LST_INDEXED, true> vloxei8_obj;
static CONSTEXPR const loadstore<false, LST_INDEXED, true> vloxei16_obj;
static CONSTEXPR const loadstore<false, LST_INDEXED, true> vloxei32_obj;
static CONSTEXPR const loadstore<false, LST_INDEXED, true> vloxei64_obj;
static CONSTEXPR const loadstore<true, LST_INDEXED, false> vsuxei8_obj;
static CONSTEXPR const loadstore<true, LST_INDEXED, false> vsuxei16_obj;
static CONSTEXPR const loadstore<true, LST_INDEXED, false> vsuxei32_obj;
static CONSTEXPR const loadstore<true, LST_INDEXED, false> vsuxei64_obj;
static CONSTEXPR const loadstore<true, LST_INDEXED, true> vsoxei8_obj;
static CONSTEXPR const loadstore<true, LST_INDEXED, true> vsoxei16_obj;
static CONSTEXPR const loadstore<true, LST_INDEXED, true> vsoxei32_obj;
static CONSTEXPR const loadstore<true, LST_INDEXED, true> vsoxei64_obj;
static CONSTEXPR const binop<PLUS> vadd_obj;
static CONSTEXPR const binop<MINUS> vsub_obj;
static CONSTEXPR const vrsub vrsub_obj;
static CONSTEXPR const binop<AND> vand_obj;
static CONSTEXPR const binop<IOR> vor_obj;
static CONSTEXPR const binop<XOR> vxor_obj;
static CONSTEXPR const binop<ASHIFT> vsll_obj;
static CONSTEXPR const binop<ASHIFTRT> vsra_obj;
static CONSTEXPR const binop<LSHIFTRT> vsrl_obj;
static CONSTEXPR const binop<SMIN> vmin_obj;
static CONSTEXPR const binop<SMAX> vmax_obj;
static CONSTEXPR const binop<UMIN> vminu_obj;
static CONSTEXPR const binop<UMAX> vmaxu_obj;
static CONSTEXPR const binop<MULT> vmul_obj;
static CONSTEXPR const vmulh<UNSPEC_VMULHS> vmulh_obj;
static CONSTEXPR const vmulh<UNSPEC_VMULHU> vmulhu_obj;
static CONSTEXPR const vmulh<UNSPEC_VMULHSU> vmulhsu_obj;
static CONSTEXPR const binop<DIV> vdiv_obj;
static CONSTEXPR const binop<MOD> vrem_obj;
static CONSTEXPR const binop<UDIV> vdivu_obj;
static CONSTEXPR const binop<UMOD> vremu_obj;
static CONSTEXPR const unop<NEG> vneg_obj;
static CONSTEXPR const unop<NOT> vnot_obj;
static CONSTEXPR const ext<SIGN_EXTEND> vsext_obj;
static CONSTEXPR const ext<ZERO_EXTEND> vzext_obj;
static CONSTEXPR const widen_binop<PLUS, SIGN_EXTEND>vwadd_obj;
static CONSTEXPR const widen_binop<MINUS, SIGN_EXTEND>vwsub_obj;
static CONSTEXPR const widen_binop<MULT, SIGN_EXTEND>vwmul_obj;
static CONSTEXPR const widen_binop<PLUS, ZERO_EXTEND>vwaddu_obj;
static CONSTEXPR const widen_binop<MINUS, ZERO_EXTEND>vwsubu_obj;
static CONSTEXPR const widen_binop<MULT, ZERO_EXTEND>vwmulu_obj;
static CONSTEXPR const vwmulsu vwmulsu_obj;
static CONSTEXPR const vwcvt<SIGN_EXTEND> vwcvt_x_obj;
static CONSTEXPR const vwcvt<ZERO_EXTEND> vwcvtu_x_obj;
static CONSTEXPR const vadc vadc_obj;
static CONSTEXPR const vsbc vsbc_obj;
static CONSTEXPR const vmadc vmadc_obj;
static CONSTEXPR const vmsbc vmsbc_obj;
static CONSTEXPR const vnshift<LSHIFTRT> vnsrl_obj;
static CONSTEXPR const vnshift<ASHIFTRT> vnsra_obj;
static CONSTEXPR const vncvt_x vncvt_x_obj;
static CONSTEXPR const vmerge vmerge_obj;
static CONSTEXPR const vmv_v vmv_v_obj;
static CONSTEXPR const icmp<EQ> vmseq_obj;
static CONSTEXPR const icmp<NE> vmsne_obj;
static CONSTEXPR const icmp<LT> vmslt_obj;
static CONSTEXPR const icmp<GT> vmsgt_obj;
static CONSTEXPR const icmp<LE> vmsle_obj;
static CONSTEXPR const icmp<GE> vmsge_obj;
static CONSTEXPR const icmp<LTU> vmsltu_obj;
static CONSTEXPR const icmp<GTU> vmsgtu_obj;
static CONSTEXPR const icmp<LEU> vmsleu_obj;
static CONSTEXPR const icmp<GEU> vmsgeu_obj;
static CONSTEXPR const vmacc vmacc_obj;
static CONSTEXPR const vnmsac vnmsac_obj;
static CONSTEXPR const vmadd vmadd_obj;
static CONSTEXPR const vnmsub vnmsub_obj;
static CONSTEXPR const vwmacc vwmacc_obj;
static CONSTEXPR const vwmaccu vwmaccu_obj;
static CONSTEXPR const vwmaccsu vwmaccsu_obj;
static CONSTEXPR const vwmaccus vwmaccus_obj;
static CONSTEXPR const binop<SS_PLUS> vsadd_obj;
static CONSTEXPR const binop<SS_MINUS> vssub_obj;
static CONSTEXPR const binop<US_PLUS> vsaddu_obj;
static CONSTEXPR const binop<US_MINUS> vssubu_obj;
static CONSTEXPR const sat_op<UNSPEC_VAADDU> vaaddu_obj;
static CONSTEXPR const sat_op<UNSPEC_VAADD> vaadd_obj;
static CONSTEXPR const sat_op<UNSPEC_VASUBU> vasubu_obj;
static CONSTEXPR const sat_op<UNSPEC_VASUB> vasub_obj;
static CONSTEXPR const sat_op<UNSPEC_VSMUL> vsmul_obj;
static CONSTEXPR const sat_op<UNSPEC_VSSRL> vssrl_obj;
static CONSTEXPR const sat_op<UNSPEC_VSSRA> vssra_obj;
static CONSTEXPR const vnclip<UNSPEC_VNCLIP> vnclip_obj;
static CONSTEXPR const vnclip<UNSPEC_VNCLIPU> vnclipu_obj;
static CONSTEXPR const mask_logic<AND> vmand_obj;
static CONSTEXPR const mask_nlogic<AND> vmnand_obj;
static CONSTEXPR const mask_notlogic<AND> vmandn_obj;
static CONSTEXPR const mask_logic<XOR> vmxor_obj;
static CONSTEXPR const mask_logic<IOR> vmor_obj;
static CONSTEXPR const mask_nlogic<IOR> vmnor_obj;
static CONSTEXPR const mask_notlogic<IOR> vmorn_obj;
static CONSTEXPR const mask_nlogic<XOR> vmxnor_obj;
static CONSTEXPR const vmmv vmmv_obj;
static CONSTEXPR const vmclr vmclr_obj;
static CONSTEXPR const vmset vmset_obj;
static CONSTEXPR const vmnot vmnot_obj;
static CONSTEXPR const vcpop vcpop_obj;
static CONSTEXPR const vfirst vfirst_obj;
static CONSTEXPR const mask_misc<UNSPEC_VMSBF> vmsbf_obj;
static CONSTEXPR const mask_misc<UNSPEC_VMSIF> vmsif_obj;
static CONSTEXPR const mask_misc<UNSPEC_VMSOF> vmsof_obj;
static CONSTEXPR const viota viota_obj;
static CONSTEXPR const vid vid_obj;
static CONSTEXPR const binop<PLUS, true> vfadd_obj;
static CONSTEXPR const binop<MINUS, true> vfsub_obj;
static CONSTEXPR const binop<PLUS, true, HAS_FRM> vfadd_frm_obj;
static CONSTEXPR const binop<MINUS, true, HAS_FRM> vfsub_frm_obj;
static CONSTEXPR const reverse_binop<MINUS> vfrsub_obj;
static CONSTEXPR const reverse_binop<MINUS, HAS_FRM> vfrsub_frm_obj;
static CONSTEXPR const widen_binop_fp<PLUS> vfwadd_obj;
static CONSTEXPR const widen_binop_fp<PLUS, HAS_FRM> vfwadd_frm_obj;
static CONSTEXPR const widen_binop_fp<MINUS> vfwsub_obj;
static CONSTEXPR const widen_binop_fp<MINUS, HAS_FRM> vfwsub_frm_obj;
static CONSTEXPR const binop<MULT, true> vfmul_obj;
static CONSTEXPR const binop<MULT, true, HAS_FRM> vfmul_frm_obj;
static CONSTEXPR const binop<DIV, true> vfdiv_obj;
static CONSTEXPR const binop<DIV, true, HAS_FRM> vfdiv_frm_obj;
static CONSTEXPR const reverse_binop<DIV> vfrdiv_obj;
static CONSTEXPR const reverse_binop<DIV, HAS_FRM> vfrdiv_frm_obj;
static CONSTEXPR const widen_binop_fp<MULT> vfwmul_obj;
static CONSTEXPR const widen_binop_fp<MULT, HAS_FRM> vfwmul_frm_obj;
static CONSTEXPR const vfmacc<NO_FRM> vfmacc_obj;
static CONSTEXPR const vfmacc<HAS_FRM> vfmacc_frm_obj;
static CONSTEXPR const vfnmsac<NO_FRM> vfnmsac_obj;
static CONSTEXPR const vfnmsac<HAS_FRM> vfnmsac_frm_obj;
static CONSTEXPR const vfmadd<NO_FRM> vfmadd_obj;
static CONSTEXPR const vfmadd<HAS_FRM> vfmadd_frm_obj;
static CONSTEXPR const vfnmsub<NO_FRM> vfnmsub_obj;
static CONSTEXPR const vfnmsub<HAS_FRM> vfnmsub_frm_obj;
static CONSTEXPR const vfnmacc<NO_FRM> vfnmacc_obj;
static CONSTEXPR const vfnmacc<HAS_FRM> vfnmacc_frm_obj;
static CONSTEXPR const vfmsac<NO_FRM> vfmsac_obj;
static CONSTEXPR const vfmsac<HAS_FRM> vfmsac_frm_obj;
static CONSTEXPR const vfnmadd<NO_FRM> vfnmadd_obj;
static CONSTEXPR const vfnmadd<HAS_FRM> vfnmadd_frm_obj;
static CONSTEXPR const vfmsub<NO_FRM> vfmsub_obj;
static CONSTEXPR const vfmsub<HAS_FRM> vfmsub_frm_obj;
static CONSTEXPR const vfwmacc<NO_FRM> vfwmacc_obj;
static CONSTEXPR const vfwmacc<HAS_FRM> vfwmacc_frm_obj;
static CONSTEXPR const vfwnmacc<NO_FRM> vfwnmacc_obj;
static CONSTEXPR const vfwnmacc<HAS_FRM> vfwnmacc_frm_obj;
static CONSTEXPR const vfwmsac<NO_FRM> vfwmsac_obj;
static CONSTEXPR const vfwmsac<HAS_FRM> vfwmsac_frm_obj;
static CONSTEXPR const vfwnmsac<NO_FRM> vfwnmsac_obj;
static CONSTEXPR const vfwnmsac<HAS_FRM> vfwnmsac_frm_obj;
static CONSTEXPR const unop<SQRT> vfsqrt_obj;
static CONSTEXPR const unop<SQRT, HAS_FRM> vfsqrt_frm_obj;
static CONSTEXPR const float_misc<UNSPEC_VFRSQRT7> vfrsqrt7_obj;
static CONSTEXPR const float_misc<UNSPEC_VFREC7> vfrec7_obj;
static CONSTEXPR const float_misc<UNSPEC_VFREC7, HAS_FRM> vfrec7_frm_obj;
static CONSTEXPR const binop<SMIN> vfmin_obj;
static CONSTEXPR const binop<SMAX> vfmax_obj;
static CONSTEXPR const float_misc<UNSPEC_VCOPYSIGN> vfsgnj_obj;
static CONSTEXPR const vfsgnjn vfsgnjn_obj;
static CONSTEXPR const float_misc<UNSPEC_VXORSIGN> vfsgnjx_obj;
static CONSTEXPR const unop<NEG> vfneg_obj;
static CONSTEXPR const unop<ABS> vfabs_obj;
static CONSTEXPR const fcmp<EQ> vmfeq_obj;
static CONSTEXPR const fcmp<NE> vmfne_obj;
static CONSTEXPR const fcmp<LT> vmflt_obj;
static CONSTEXPR const fcmp<GT> vmfgt_obj;
static CONSTEXPR const fcmp<LE> vmfle_obj;
static CONSTEXPR const fcmp<GE> vmfge_obj;
static CONSTEXPR const vfclass vfclass_obj;
static CONSTEXPR const vmerge vfmerge_obj;
static CONSTEXPR const vmv_v vfmv_v_obj;
static CONSTEXPR const vfcvt_x<UNSPEC_VFCVT> vfcvt_x_obj;
static CONSTEXPR const vfcvt_x<UNSPEC_VFCVT, HAS_FRM> vfcvt_x_frm_obj;
static CONSTEXPR const vfcvt_x<UNSPEC_UNSIGNED_VFCVT> vfcvt_xu_obj;
static CONSTEXPR const vfcvt_x<UNSPEC_UNSIGNED_VFCVT, HAS_FRM> vfcvt_xu_frm_obj;
static CONSTEXPR const vfcvt_rtz_x<FIX> vfcvt_rtz_x_obj;
static CONSTEXPR const vfcvt_rtz_x<UNSIGNED_FIX> vfcvt_rtz_xu_obj;
static CONSTEXPR const vfcvt_f<NO_FRM> vfcvt_f_obj;
static CONSTEXPR const vfcvt_f<HAS_FRM> vfcvt_f_frm_obj;
static CONSTEXPR const vfwcvt_x<UNSPEC_VFCVT> vfwcvt_x_obj;
static CONSTEXPR const vfwcvt_x<UNSPEC_VFCVT, HAS_FRM> vfwcvt_x_frm_obj;
static CONSTEXPR const vfwcvt_x<UNSPEC_UNSIGNED_VFCVT> vfwcvt_xu_obj;
static CONSTEXPR const vfwcvt_x<UNSPEC_UNSIGNED_VFCVT, HAS_FRM> vfwcvt_xu_frm_obj;
static CONSTEXPR const vfwcvt_rtz_x<FIX> vfwcvt_rtz_x_obj;
static CONSTEXPR const vfwcvt_rtz_x<UNSIGNED_FIX> vfwcvt_rtz_xu_obj;
static CONSTEXPR const vfwcvt_f vfwcvt_f_obj;
static CONSTEXPR const vfncvt_x<UNSPEC_VFCVT> vfncvt_x_obj;
static CONSTEXPR const vfncvt_x<UNSPEC_VFCVT, HAS_FRM> vfncvt_x_frm_obj;
static CONSTEXPR const vfncvt_x<UNSPEC_UNSIGNED_VFCVT> vfncvt_xu_obj;
static CONSTEXPR const vfncvt_x<UNSPEC_UNSIGNED_VFCVT, HAS_FRM> vfncvt_xu_frm_obj;
static CONSTEXPR const vfncvt_rtz_x<FIX> vfncvt_rtz_x_obj;
static CONSTEXPR const vfncvt_rtz_x<UNSIGNED_FIX> vfncvt_rtz_xu_obj;
static CONSTEXPR const vfncvt_f<NO_FRM> vfncvt_f_obj;
static CONSTEXPR const vfncvt_f<HAS_FRM> vfncvt_f_frm_obj;
static CONSTEXPR const vfncvt_rod_f vfncvt_rod_f_obj;
static CONSTEXPR const reducop<UNSPEC_REDUC_SUM> vredsum_obj;
static CONSTEXPR const reducop<UNSPEC_REDUC_MAXU> vredmaxu_obj;
static CONSTEXPR const reducop<UNSPEC_REDUC_MAX> vredmax_obj;
static CONSTEXPR const reducop<UNSPEC_REDUC_MINU> vredminu_obj;
static CONSTEXPR const reducop<UNSPEC_REDUC_MIN> vredmin_obj;
static CONSTEXPR const reducop<UNSPEC_REDUC_AND> vredand_obj;
static CONSTEXPR const reducop<UNSPEC_REDUC_OR> vredor_obj;
static CONSTEXPR const reducop<UNSPEC_REDUC_XOR> vredxor_obj;
static CONSTEXPR const reducop<UNSPEC_WREDUC_SUM> vwredsum_obj;
static CONSTEXPR const reducop<UNSPEC_WREDUC_SUMU> vwredsumu_obj;
static CONSTEXPR const freducop<UNSPEC_REDUC_SUM_UNORDERED> vfredusum_obj;
static CONSTEXPR const freducop<UNSPEC_REDUC_SUM_UNORDERED, HAS_FRM> vfredusum_frm_obj;
static CONSTEXPR const freducop<UNSPEC_REDUC_SUM_ORDERED> vfredosum_obj;
static CONSTEXPR const freducop<UNSPEC_REDUC_SUM_ORDERED, HAS_FRM> vfredosum_frm_obj;
static CONSTEXPR const reducop<UNSPEC_REDUC_MAX> vfredmax_obj;
static CONSTEXPR const reducop<UNSPEC_REDUC_MIN> vfredmin_obj;
static CONSTEXPR const freducop<UNSPEC_WREDUC_SUM_UNORDERED> vfwredusum_obj;
static CONSTEXPR const freducop<UNSPEC_WREDUC_SUM_UNORDERED, HAS_FRM> vfwredusum_frm_obj;
static CONSTEXPR const freducop<UNSPEC_WREDUC_SUM_ORDERED> vfwredosum_obj;
static CONSTEXPR const freducop<UNSPEC_WREDUC_SUM_ORDERED, HAS_FRM> vfwredosum_frm_obj;
static CONSTEXPR const vmv vmv_x_obj;
static CONSTEXPR const vmv_s vmv_s_obj;
static CONSTEXPR const vmv vfmv_f_obj;
static CONSTEXPR const vmv_s vfmv_s_obj;
static CONSTEXPR const slideop<UNSPEC_VSLIDEUP> vslideup_obj;
static CONSTEXPR const slideop<UNSPEC_VSLIDEDOWN> vslidedown_obj;
static CONSTEXPR const slideop<UNSPEC_VSLIDE1UP> vslide1up_obj;
static CONSTEXPR const slideop<UNSPEC_VSLIDE1DOWN> vslide1down_obj;
static CONSTEXPR const slideop<UNSPEC_VFSLIDE1UP> vfslide1up_obj;
static CONSTEXPR const slideop<UNSPEC_VFSLIDE1DOWN> vfslide1down_obj;
static CONSTEXPR const vrgather vrgather_obj;
static CONSTEXPR const vrgatherei16 vrgatherei16_obj;
static CONSTEXPR const vcompress vcompress_obj;
static CONSTEXPR const vundefined vundefined_obj;
static CONSTEXPR const vreinterpret vreinterpret_obj;
static CONSTEXPR const vlmul_ext vlmul_ext_obj;
static CONSTEXPR const vlmul_trunc vlmul_trunc_obj;
static CONSTEXPR const vset vset_obj;
static CONSTEXPR const vget vget_obj;
static CONSTEXPR const vcreate vcreate_obj;
static CONSTEXPR const read_vl read_vl_obj;
static CONSTEXPR const vleff vleff_obj;
static CONSTEXPR const vlenb vlenb_obj;
static CONSTEXPR const vlseg vlseg_obj;
static CONSTEXPR const vsseg vsseg_obj;
static CONSTEXPR const vlsseg vlsseg_obj;
static CONSTEXPR const vssseg vssseg_obj;
static CONSTEXPR const seg_indexed_load<UNSPEC_UNORDERED> vluxseg_obj;
static CONSTEXPR const seg_indexed_load<UNSPEC_ORDERED> vloxseg_obj;
static CONSTEXPR const seg_indexed_store<UNSPEC_UNORDERED> vsuxseg_obj;
static CONSTEXPR const seg_indexed_store<UNSPEC_ORDERED> vsoxseg_obj;
static CONSTEXPR const vlsegff vlsegff_obj;
static CONSTEXPR const th_loadstore_width<false, LST_UNIT_STRIDE, UNSPEC_TH_VLB> vlb_obj;
static CONSTEXPR const th_loadstore_width<false, LST_UNIT_STRIDE, UNSPEC_TH_VLBU> vlbu_obj;
static CONSTEXPR const th_loadstore_width<false, LST_UNIT_STRIDE, UNSPEC_TH_VLH> vlh_obj;
static CONSTEXPR const th_loadstore_width<false, LST_UNIT_STRIDE, UNSPEC_TH_VLHU> vlhu_obj;
static CONSTEXPR const th_loadstore_width<false, LST_UNIT_STRIDE, UNSPEC_TH_VLW> vlw_obj;
static CONSTEXPR const th_loadstore_width<false, LST_UNIT_STRIDE, UNSPEC_TH_VLWU> vlwu_obj;
static CONSTEXPR const th_loadstore_width<true, LST_UNIT_STRIDE, UNSPEC_TH_VLB> vsb_obj;
static CONSTEXPR const th_loadstore_width<true, LST_UNIT_STRIDE, UNSPEC_TH_VLH> vsh_obj;
static CONSTEXPR const th_loadstore_width<true, LST_UNIT_STRIDE, UNSPEC_TH_VLW> vsw_obj;
static CONSTEXPR const th_loadstore_width<false, LST_STRIDED, UNSPEC_TH_VLSB> vlsb_obj;
static CONSTEXPR const th_loadstore_width<false, LST_STRIDED, UNSPEC_TH_VLSBU> vlsbu_obj;
static CONSTEXPR const th_loadstore_width<false, LST_STRIDED, UNSPEC_TH_VLSH> vlsh_obj;
static CONSTEXPR const th_loadstore_width<false, LST_STRIDED, UNSPEC_TH_VLSHU> vlshu_obj;
static CONSTEXPR const th_loadstore_width<false, LST_STRIDED, UNSPEC_TH_VLSW> vlsw_obj;
static CONSTEXPR const th_loadstore_width<false, LST_STRIDED, UNSPEC_TH_VLSWU> vlswu_obj;
static CONSTEXPR const th_loadstore_width<true, LST_STRIDED, UNSPEC_TH_VLSB> vssb_obj;
static CONSTEXPR const th_loadstore_width<true, LST_STRIDED, UNSPEC_TH_VLSH> vssh_obj;
static CONSTEXPR const th_loadstore_width<true, LST_STRIDED, UNSPEC_TH_VLSW> vssw_obj;
static CONSTEXPR const th_loadstore_width<false, LST_INDEXED, UNSPEC_TH_VLXB> vlxb_obj;
static CONSTEXPR const th_loadstore_width<false, LST_INDEXED, UNSPEC_TH_VLXBU> vlxbu_obj;
static CONSTEXPR const th_loadstore_width<false, LST_INDEXED, UNSPEC_TH_VLXH> vlxh_obj;
static CONSTEXPR const th_loadstore_width<false, LST_INDEXED, UNSPEC_TH_VLXHU> vlxhu_obj;
static CONSTEXPR const th_loadstore_width<false, LST_INDEXED, UNSPEC_TH_VLXW> vlxw_obj;
static CONSTEXPR const th_loadstore_width<false, LST_INDEXED, UNSPEC_TH_VLXWU> vlxwu_obj;
static CONSTEXPR const th_loadstore_width<true, LST_INDEXED, UNSPEC_TH_VLXB> vsxb_obj;
static CONSTEXPR const th_loadstore_width<true, LST_INDEXED, UNSPEC_TH_VLXH> vsxh_obj;
static CONSTEXPR const th_loadstore_width<true, LST_INDEXED, UNSPEC_TH_VLXW> vsxw_obj;
static CONSTEXPR const th_loadstore_width<true, LST_INDEXED, UNSPEC_TH_VSUXB> vsuxb_obj;
static CONSTEXPR const th_loadstore_width<true, LST_INDEXED, UNSPEC_TH_VSUXH> vsuxh_obj;
static CONSTEXPR const th_loadstore_width<true, LST_INDEXED, UNSPEC_TH_VSUXW> vsuxw_obj;
static CONSTEXPR const th_extract vext_x_v_obj;
/* Crypto Vector */
static CONSTEXPR const vandn vandn_obj;
static CONSTEXPR const bitmanip<ROTATE> vrol_obj;
static CONSTEXPR const bitmanip<ROTATERT> vror_obj;
static CONSTEXPR const b_reverse<UNSPEC_VBREV> vbrev_obj;
static CONSTEXPR const b_reverse<UNSPEC_VBREV8> vbrev8_obj;
static CONSTEXPR const b_reverse<UNSPEC_VREV8> vrev8_obj;
static CONSTEXPR const bitmanip<CLZ> vclz_obj;
static CONSTEXPR const bitmanip<CTZ> vctz_obj;
static CONSTEXPR const vwsll vwsll_obj;
static CONSTEXPR const clmul<UNSPEC_VCLMUL> vclmul_obj;
static CONSTEXPR const clmul<UNSPEC_VCLMULH> vclmulh_obj;
static CONSTEXPR const vg_nhab<UNSPEC_VGHSH> vghsh_obj;
static CONSTEXPR const crypto_vv<UNSPEC_VGMUL> vgmul_obj;
static CONSTEXPR const crypto_vv<UNSPEC_VAESEF> vaesef_obj;
static CONSTEXPR const crypto_vv<UNSPEC_VAESEM> vaesem_obj;
static CONSTEXPR const crypto_vv<UNSPEC_VAESDF> vaesdf_obj;
static CONSTEXPR const crypto_vv<UNSPEC_VAESDM> vaesdm_obj;
static CONSTEXPR const crypto_vv<UNSPEC_VAESZ> vaesz_obj;
static CONSTEXPR const crypto_vi<UNSPEC_VAESKF1> vaeskf1_obj;
static CONSTEXPR const vaeskf2_vsm3c<UNSPEC_VAESKF2> vaeskf2_obj;
static CONSTEXPR const vg_nhab<UNSPEC_VSHA2MS> vsha2ms_obj;
static CONSTEXPR const vg_nhab<UNSPEC_VSHA2CH> vsha2ch_obj;
static CONSTEXPR const vg_nhab<UNSPEC_VSHA2CL> vsha2cl_obj;
static CONSTEXPR const crypto_vi<UNSPEC_VSM4K> vsm4k_obj;
static CONSTEXPR const crypto_vv<UNSPEC_VSM4R> vsm4r_obj;
static CONSTEXPR const vsm3me vsm3me_obj;
static CONSTEXPR const vaeskf2_vsm3c<UNSPEC_VSM3C> vsm3c_obj;
/* Zvfbfmin */
static CONSTEXPR const vfncvtbf16_f<NO_FRM> vfncvtbf16_f_obj;
static CONSTEXPR const vfncvtbf16_f<HAS_FRM> vfncvtbf16_f_frm_obj;
static CONSTEXPR const vfwcvtbf16_f vfwcvtbf16_f_obj;
/* Zvfbfwma; */
static CONSTEXPR const vfwmaccbf16<NO_FRM> vfwmaccbf16_obj;
static CONSTEXPR const vfwmaccbf16<HAS_FRM> vfwmaccbf16_frm_obj;
/* Declare the function base NAME, pointing it to an instance
of class <NAME>_obj. */
#define BASE(NAME) \
namespace bases { const function_base *const NAME = &NAME##_obj; }
BASE (vsetvl)
BASE (vsetvlmax)
BASE (vle)
BASE (vse)
BASE (vlm)
BASE (vsm)
BASE (vlse)
BASE (vsse)
BASE (vluxei8)
BASE (vluxei16)
BASE (vluxei32)
BASE (vluxei64)
BASE (vloxei8)
BASE (vloxei16)
BASE (vloxei32)
BASE (vloxei64)
BASE (vsuxei8)
BASE (vsuxei16)
BASE (vsuxei32)
BASE (vsuxei64)
BASE (vsoxei8)
BASE (vsoxei16)
BASE (vsoxei32)
BASE (vsoxei64)
BASE (vadd)
BASE (vsub)
BASE (vrsub)
BASE (vand)
BASE (vor)
BASE (vxor)
BASE (vsll)
BASE (vsra)
BASE (vsrl)
BASE (vmin)
BASE (vmax)
BASE (vminu)
BASE (vmaxu)
BASE (vmul)
BASE (vmulh)
BASE (vmulhu)
BASE (vmulhsu)
BASE (vdiv)
BASE (vrem)
BASE (vdivu)
BASE (vremu)
BASE (vneg)
BASE (vnot)
BASE (vsext)
BASE (vzext)
BASE (vwadd)
BASE (vwsub)
BASE (vwmul)
BASE (vwaddu)
BASE (vwsubu)
BASE (vwmulu)
BASE (vwmulsu)
BASE (vwcvt_x)
BASE (vwcvtu_x)
BASE (vadc)
BASE (vsbc)
BASE (vmadc)
BASE (vmsbc)
BASE (vnsrl)
BASE (vnsra)
BASE (vncvt_x)
BASE (vmerge)
BASE (vmv_v)
BASE (vmseq)
BASE (vmsne)
BASE (vmslt)
BASE (vmsgt)
BASE (vmsle)
BASE (vmsge)
BASE (vmsltu)
BASE (vmsgtu)
BASE (vmsleu)
BASE (vmsgeu)
BASE (vmacc)
BASE (vnmsac)
BASE (vmadd)
BASE (vnmsub)
BASE (vwmacc)
BASE (vwmaccu)
BASE (vwmaccsu)
BASE (vwmaccus)
BASE (vsadd)
BASE (vssub)
BASE (vsaddu)
BASE (vssubu)
BASE (vaadd)
BASE (vasub)
BASE (vaaddu)
BASE (vasubu)
BASE (vsmul)
BASE (vssra)
BASE (vssrl)
BASE (vnclip)
BASE (vnclipu)
BASE (vmand)
BASE (vmnand)
BASE (vmandn)
BASE (vmxor)
BASE (vmor)
BASE (vmnor)
BASE (vmorn)
BASE (vmxnor)
BASE (vmmv)
BASE (vmclr)
BASE (vmset)
BASE (vmnot)
BASE (vcpop)
BASE (vfirst)
BASE (vmsbf)
BASE (vmsif)
BASE (vmsof)
BASE (viota)
BASE (vid)
BASE (vfadd)
BASE (vfadd_frm)
BASE (vfsub)
BASE (vfsub_frm)
BASE (vfrsub)
BASE (vfrsub_frm)
BASE (vfwadd)
BASE (vfwadd_frm)
BASE (vfwsub)
BASE (vfwsub_frm)
BASE (vfmul)
BASE (vfmul_frm)
BASE (vfdiv)
BASE (vfdiv_frm)
BASE (vfrdiv)
BASE (vfrdiv_frm)
BASE (vfwmul)
BASE (vfwmul_frm)
BASE (vfmacc)
BASE (vfmacc_frm)
BASE (vfnmsac)
BASE (vfnmsac_frm)
BASE (vfmadd)
BASE (vfmadd_frm)
BASE (vfnmsub)
BASE (vfnmsub_frm)
BASE (vfnmacc)
BASE (vfnmacc_frm)
BASE (vfmsac)
BASE (vfmsac_frm)
BASE (vfnmadd)
BASE (vfnmadd_frm)
BASE (vfmsub)
BASE (vfmsub_frm)
BASE (vfwmacc)
BASE (vfwmacc_frm)
BASE (vfwnmacc)
BASE (vfwnmacc_frm)
BASE (vfwmsac)
BASE (vfwmsac_frm)
BASE (vfwnmsac)
BASE (vfwnmsac_frm)
BASE (vfsqrt)
BASE (vfsqrt_frm)
BASE (vfrsqrt7)
BASE (vfrec7)
BASE (vfrec7_frm)
BASE (vfmin)
BASE (vfmax)
BASE (vfsgnj)
BASE (vfsgnjn)
BASE (vfsgnjx)
BASE (vfneg)
BASE (vfabs)
BASE (vmfeq)
BASE (vmfne)
BASE (vmflt)
BASE (vmfgt)
BASE (vmfle)
BASE (vmfge)
BASE (vfclass)
BASE (vfmerge)
BASE (vfmv_v)
BASE (vfcvt_x)
BASE (vfcvt_x_frm)
BASE (vfcvt_xu)
BASE (vfcvt_xu_frm)
BASE (vfcvt_rtz_x)
BASE (vfcvt_rtz_xu)
BASE (vfcvt_f)
BASE (vfcvt_f_frm)
BASE (vfwcvt_x)
BASE (vfwcvt_x_frm)
BASE (vfwcvt_xu)
BASE (vfwcvt_xu_frm)
BASE (vfwcvt_rtz_x)
BASE (vfwcvt_rtz_xu)
BASE (vfwcvt_f)
BASE (vfncvt_x)
BASE (vfncvt_x_frm)
BASE (vfncvt_xu)
BASE (vfncvt_xu_frm)
BASE (vfncvt_rtz_x)
BASE (vfncvt_rtz_xu)
BASE (vfncvt_f)
BASE (vfncvt_f_frm)
BASE (vfncvt_rod_f)
BASE (vredsum)
BASE (vredmaxu)
BASE (vredmax)
BASE (vredminu)
BASE (vredmin)
BASE (vredand)
BASE (vredor)
BASE (vredxor)
BASE (vwredsum)
BASE (vwredsumu)
BASE (vfredusum)
BASE (vfredusum_frm)
BASE (vfredosum)
BASE (vfredosum_frm)
BASE (vfredmax)
BASE (vfredmin)
BASE (vfwredosum)
BASE (vfwredosum_frm)
BASE (vfwredusum)
BASE (vfwredusum_frm)
BASE (vmv_x)
BASE (vmv_s)
BASE (vfmv_f)
BASE (vfmv_s)
BASE (vslideup)
BASE (vslidedown)
BASE (vslide1up)
BASE (vslide1down)
BASE (vfslide1up)
BASE (vfslide1down)
BASE (vrgather)
BASE (vrgatherei16)
BASE (vcompress)
BASE (vundefined)
BASE (vreinterpret)
BASE (vlmul_ext)
BASE (vlmul_trunc)
BASE (vset)
BASE (vget)
BASE (vcreate)
BASE (read_vl)
BASE (vleff)
BASE (vlenb)
BASE (vlseg)
BASE (vsseg)
BASE (vlsseg)
BASE (vssseg)
BASE (vluxseg)
BASE (vloxseg)
BASE (vsuxseg)
BASE (vsoxseg)
BASE (vlsegff)
BASE (vlb)
BASE (vlh)
BASE (vlw)
BASE (vlbu)
BASE (vlhu)
BASE (vlwu)
BASE (vsb)
BASE (vsh)
BASE (vsw)
BASE (vlsb)
BASE (vlsh)
BASE (vlsw)
BASE (vlsbu)
BASE (vlshu)
BASE (vlswu)
BASE (vssb)
BASE (vssh)
BASE (vssw)
BASE (vlxb)
BASE (vlxh)
BASE (vlxw)
BASE (vlxbu)
BASE (vlxhu)
BASE (vlxwu)
BASE (vsxb)
BASE (vsxh)
BASE (vsxw)
BASE (vsuxb)
BASE (vsuxh)
BASE (vsuxw)
BASE (vext_x_v)
/* Crypto vector */
BASE (vandn)
BASE (vbrev)
BASE (vbrev8)
BASE (vrev8)
BASE (vclz)
BASE (vctz)
BASE (vrol)
BASE (vror)
BASE (vwsll)
BASE (vclmul)
BASE (vclmulh)
BASE (vghsh)
BASE (vgmul)
BASE (vaesef)
BASE (vaesem)
BASE (vaesdf)
BASE (vaesdm)
BASE (vaesz)
BASE (vaeskf1)
BASE (vaeskf2)
BASE (vsha2ms)
BASE (vsha2ch)
BASE (vsha2cl)
BASE (vsm4k)
BASE (vsm4r)
BASE (vsm3me)
BASE (vsm3c)
/* Zvfbfmin */
BASE (vfncvtbf16_f)
BASE (vfncvtbf16_f_frm)
BASE (vfwcvtbf16_f)
/* Zvfbfwma */
BASE (vfwmaccbf16)
BASE (vfwmaccbf16_frm)
} // end namespace riscv_vector
|