Commit bb50c8a
Enable EVEX feature: Embedded Rounding for Avx512F.Add() (dotnet#94684)
* some workaround with embedded rounding in compiler backend.
* extend _idEvexbContext to 2bit to distinguish embedded broadcast and embedded rounding
* Expose APIs with rounding mode.
* Apply format patch
* Do not include the third parameter in Avx512.Add(left, right)
* split _idEvexbContext bits and made a explicit convert function from uint8_t to insOpts for embedded rounding mode.
* Remove unexpected comment-out
* Fix unexpected deletion
* resolve comments:
removed redundent bits in instDesc for EVEX.b context.
Introduced `emitDispEmbRounding` to display the embedded rounding feature in the disassembly.
* bug fix:
fix un-needed assertion check.
* Apply format patch.
* Resolve comments:
merge INS_OPTS_EVEX_b and INS_OPTS_EVEX_er_rd
Do a pre-check for embedded rounding before lowering.
* Add a helper function to generalize the logic when lowering the embedded rounding intrinsics.
* Resolve comments:
1. fix typo in commnets
2. Add SetEvexBroadcastIfNeeded
3. Added mask in insOpts
* 1. Add unit case for non-default rounding mode
2. removed round-to-even, the default option from InsOpts as it will be handled on the default path.
* formatting
* 1. Create a fallback jump table for embedded rounding APIs when control byte is not constant.
2. Create a template to generate the unit tests for embedded rounding APIs.
3. nit: fix naming.
* remove hand-written unit tests for embedded rounding.
* formatting
* Resolve comments.
* formatting
* revert changes:
let SetEmbRoundingMode accept unexpected values to accomadate the jump table generatation logics.1 parent a36c365 commit bb50c8a
File tree
19 files changed
+760
-45
lines changed- src
- coreclr/jit
- libraries
- System.Private.CoreLib/src/System/Runtime/Intrinsics/X86
- System.Runtime.Intrinsics/ref
- tests
- Common/GenerateHWIntrinsicTests
19 files changed
+760
-45
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
971 | 971 | | |
972 | 972 | | |
973 | 973 | | |
| 974 | + | |
974 | 975 | | |
975 | 976 | | |
976 | 977 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
774 | 774 | | |
775 | 775 | | |
776 | 776 | | |
777 | | - | |
778 | | - | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
779 | 783 | | |
780 | 784 | | |
781 | 785 | | |
| |||
808 | 812 | | |
809 | 813 | | |
810 | 814 | | |
811 | | - | |
812 | | - | |
| 815 | + | |
| 816 | + | |
813 | 817 | | |
814 | 818 | | |
815 | 819 | | |
| |||
828 | 832 | | |
829 | 833 | | |
830 | 834 | | |
831 | | - | |
| 835 | + | |
832 | 836 | | |
833 | 837 | | |
834 | 838 | | |
| |||
863 | 867 | | |
864 | 868 | | |
865 | 869 | | |
866 | | - | |
867 | | - | |
| 870 | + | |
| 871 | + | |
868 | 872 | | |
869 | 873 | | |
870 | 874 | | |
| |||
880 | 884 | | |
881 | 885 | | |
882 | 886 | | |
883 | | - | |
884 | | - | |
| 887 | + | |
| 888 | + | |
885 | 889 | | |
886 | 890 | | |
887 | 891 | | |
| |||
1578 | 1582 | | |
1579 | 1583 | | |
1580 | 1584 | | |
1581 | | - | |
| 1585 | + | |
1582 | 1586 | | |
1583 | 1587 | | |
1584 | 1588 | | |
1585 | | - | |
| 1589 | + | |
| 1590 | + | |
1586 | 1591 | | |
1587 | 1592 | | |
1588 | | - | |
1589 | | - | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
1590 | 1614 | | |
1591 | 1615 | | |
1592 | 1616 | | |
| |||
2166 | 2190 | | |
2167 | 2191 | | |
2168 | 2192 | | |
| 2193 | + | |
2169 | 2194 | | |
2170 | 2195 | | |
2171 | 2196 | | |
| |||
3814 | 3839 | | |
3815 | 3840 | | |
3816 | 3841 | | |
3817 | | - | |
| 3842 | + | |
3818 | 3843 | | |
3819 | 3844 | | |
3820 | 3845 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1139 | 1139 | | |
1140 | 1140 | | |
1141 | 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 | + | |
1142 | 1166 | | |
1143 | 1167 | | |
1144 | 1168 | | |
| |||
1309 | 1333 | | |
1310 | 1334 | | |
1311 | 1335 | | |
1312 | | - | |
| 1336 | + | |
1313 | 1337 | | |
1314 | 1338 | | |
1315 | 1339 | | |
1316 | 1340 | | |
1317 | | - | |
| 1341 | + | |
1318 | 1342 | | |
1319 | 1343 | | |
1320 | 1344 | | |
1321 | | - | |
| 1345 | + | |
1322 | 1346 | | |
1323 | 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 | + | |
1324 | 1380 | | |
1325 | 1381 | | |
1326 | 1382 | | |
| |||
6742 | 6798 | | |
6743 | 6799 | | |
6744 | 6800 | | |
6745 | | - | |
6746 | | - | |
6747 | | - | |
6748 | | - | |
6749 | | - | |
| 6801 | + | |
6750 | 6802 | | |
6751 | 6803 | | |
6752 | 6804 | | |
| |||
6871 | 6923 | | |
6872 | 6924 | | |
6873 | 6925 | | |
6874 | | - | |
6875 | | - | |
6876 | | - | |
6877 | | - | |
6878 | | - | |
| 6926 | + | |
6879 | 6927 | | |
6880 | 6928 | | |
6881 | 6929 | | |
| |||
6889 | 6937 | | |
6890 | 6938 | | |
6891 | 6939 | | |
6892 | | - | |
| 6940 | + | |
| 6941 | + | |
6893 | 6942 | | |
6894 | 6943 | | |
6895 | 6944 | | |
| |||
6901 | 6950 | | |
6902 | 6951 | | |
6903 | 6952 | | |
| 6953 | + | |
| 6954 | + | |
| 6955 | + | |
| 6956 | + | |
| 6957 | + | |
| 6958 | + | |
| 6959 | + | |
6904 | 6960 | | |
6905 | 6961 | | |
6906 | 6962 | | |
| |||
6921 | 6977 | | |
6922 | 6978 | | |
6923 | 6979 | | |
| 6980 | + | |
6924 | 6981 | | |
6925 | | - | |
6926 | | - | |
6927 | | - | |
6928 | | - | |
6929 | | - | |
6930 | 6982 | | |
6931 | 6983 | | |
6932 | 6984 | | |
| |||
8224 | 8276 | | |
8225 | 8277 | | |
8226 | 8278 | | |
8227 | | - | |
| 8279 | + | |
8228 | 8280 | | |
8229 | 8281 | | |
8230 | 8282 | | |
8231 | | - | |
| 8283 | + | |
8232 | 8284 | | |
8233 | 8285 | | |
8234 | 8286 | | |
| |||
10656 | 10708 | | |
10657 | 10709 | | |
10658 | 10710 | | |
10659 | | - | |
| 10711 | + | |
10660 | 10712 | | |
10661 | 10713 | | |
10662 | 10714 | | |
| |||
10665 | 10717 | | |
10666 | 10718 | | |
10667 | 10719 | | |
| 10720 | + | |
| 10721 | + | |
| 10722 | + | |
| 10723 | + | |
| 10724 | + | |
| 10725 | + | |
| 10726 | + | |
| 10727 | + | |
| 10728 | + | |
| 10729 | + | |
| 10730 | + | |
| 10731 | + | |
| 10732 | + | |
| 10733 | + | |
| 10734 | + | |
| 10735 | + | |
| 10736 | + | |
| 10737 | + | |
| 10738 | + | |
| 10739 | + | |
| 10740 | + | |
| 10741 | + | |
| 10742 | + | |
| 10743 | + | |
| 10744 | + | |
| 10745 | + | |
| 10746 | + | |
| 10747 | + | |
| 10748 | + | |
| 10749 | + | |
| 10750 | + | |
10668 | 10751 | | |
10669 | 10752 | | |
10670 | 10753 | | |
| |||
11533 | 11616 | | |
11534 | 11617 | | |
11535 | 11618 | | |
| 11619 | + | |
11536 | 11620 | | |
11537 | 11621 | | |
11538 | 11622 | | |
| |||
0 commit comments