This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 280b326
authored
Unrolled build for rust-lang#137953
Rollup merge of rust-lang#137953 - RalfJung:simd-intrinsic-masks, r=WaffleLapkin
simd intrinsics with mask: accept unsigned integer masks, and fix some of the errors
It's not clear at all why the mask would have to be signed, it is anyway interpreted bitwise. The backend should just make sure that works no matter the surface-level type; our LLVM backend already does this correctly. The note of "the mask may be widened, which only has the correct behavior for signed integers" explains... nothing? Why can't the code do the widening correctly? If necessary, just cast to the signed type first...
Also while we are at it, fix the errors. For simd_masked_load/store, the errors talked about the "third argument" but they meant the first argument (the mask is the first argument there). They also used the wrong type for `expected_element`.
I have extremely low confidence in the GCC part of this PR.
See [discussion on Zulip](https://rust-lang.zulipchat.com/#narrow/channel/257879-project-portable-simd/topic/On.20the.20sign.20of.20masks)File tree
18 files changed
+119
-148
lines changed- compiler
- rustc_codegen_gcc/src/intrinsic
- rustc_codegen_llvm/src
- rustc_codegen_ssa
- src
- library/core/src/intrinsics
- src/tools/miri/src
- tests
- codegen/simd-intrinsic
- ui/simd
- intrinsic
18 files changed
+119
-148
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
| 450 | + | |
450 | 451 | | |
451 | 452 | | |
452 | | - | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
453 | 458 | | |
454 | 459 | | |
455 | 460 | | |
| |||
991 | 996 | | |
992 | 997 | | |
993 | 998 | | |
994 | | - | |
| 999 | + | |
| 1000 | + | |
995 | 1001 | | |
996 | 1002 | | |
997 | 1003 | | |
998 | 1004 | | |
999 | 1005 | | |
1000 | 1006 | | |
1001 | | - | |
1002 | | - | |
1003 | | - | |
1004 | | - | |
1005 | | - | |
1006 | | - | |
| 1007 | + | |
1007 | 1008 | | |
1008 | 1009 | | |
1009 | 1010 | | |
| |||
1109 | 1110 | | |
1110 | 1111 | | |
1111 | 1112 | | |
| 1113 | + | |
1112 | 1114 | | |
1113 | 1115 | | |
1114 | 1116 | | |
1115 | 1117 | | |
1116 | 1118 | | |
1117 | | - | |
1118 | | - | |
1119 | | - | |
1120 | | - | |
1121 | | - | |
1122 | | - | |
| 1119 | + | |
1123 | 1120 | | |
1124 | 1121 | | |
1125 | 1122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1184 | 1184 | | |
1185 | 1185 | | |
1186 | 1186 | | |
1187 | | - | |
1188 | | - | |
1189 | | - | |
1190 | | - | |
1191 | | - | |
1192 | | - | |
1193 | | - | |
1194 | | - | |
1195 | | - | |
1196 | | - | |
1197 | | - | |
1198 | | - | |
1199 | 1187 | | |
1200 | 1188 | | |
1201 | 1189 | | |
| |||
1485 | 1473 | | |
1486 | 1474 | | |
1487 | 1475 | | |
1488 | | - | |
| 1476 | + | |
1489 | 1477 | | |
1490 | | - | |
| 1478 | + | |
1491 | 1479 | | |
1492 | 1480 | | |
1493 | 1481 | | |
| |||
1508 | 1496 | | |
1509 | 1497 | | |
1510 | 1498 | | |
1511 | | - | |
| 1499 | + | |
1512 | 1500 | | |
1513 | 1501 | | |
1514 | 1502 | | |
| |||
1732 | 1720 | | |
1733 | 1721 | | |
1734 | 1722 | | |
1735 | | - | |
| 1723 | + | |
1736 | 1724 | | |
1737 | | - | |
1738 | | - | |
1739 | | - | |
1740 | | - | |
1741 | | - | |
1742 | | - | |
| 1725 | + | |
1743 | 1726 | | |
1744 | 1727 | | |
1745 | 1728 | | |
| |||
1834 | 1817 | | |
1835 | 1818 | | |
1836 | 1819 | | |
1837 | | - | |
| 1820 | + | |
1838 | 1821 | | |
1839 | | - | |
1840 | | - | |
1841 | | - | |
1842 | | - | |
1843 | | - | |
1844 | | - | |
| 1822 | + | |
1845 | 1823 | | |
1846 | 1824 | | |
1847 | 1825 | | |
| |||
1924 | 1902 | | |
1925 | 1903 | | |
1926 | 1904 | | |
1927 | | - | |
| 1905 | + | |
1928 | 1906 | | |
1929 | | - | |
1930 | | - | |
1931 | | - | |
1932 | | - | |
1933 | | - | |
1934 | | - | |
| 1907 | + | |
1935 | 1908 | | |
1936 | 1909 | | |
1937 | 1910 | | |
| |||
2019 | 1992 | | |
2020 | 1993 | | |
2021 | 1994 | | |
2022 | | - | |
2023 | | - | |
| 1995 | + | |
| 1996 | + | |
2024 | 1997 | | |
2025 | | - | |
2026 | | - | |
2027 | | - | |
2028 | | - | |
2029 | | - | |
2030 | | - | |
| 1998 | + | |
2031 | 1999 | | |
2032 | 2000 | | |
2033 | 2001 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
129 | | - | |
| 128 | + | |
130 | 129 | | |
131 | 130 | | |
132 | 131 | | |
| |||
158 | 157 | | |
159 | 158 | | |
160 | 159 | | |
161 | | - | |
162 | | - | |
163 | 160 | | |
164 | 161 | | |
165 | 162 | | |
| |||
172 | 169 | | |
173 | 170 | | |
174 | 171 | | |
175 | | - | |
176 | | - | |
177 | 172 | | |
178 | 173 | | |
179 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1037 | 1037 | | |
1038 | 1038 | | |
1039 | 1039 | | |
1040 | | - | |
1041 | | - | |
1042 | | - | |
| 1040 | + | |
| 1041 | + | |
1043 | 1042 | | |
1044 | 1043 | | |
1045 | 1044 | | |
1046 | 1045 | | |
1047 | 1046 | | |
1048 | 1047 | | |
1049 | | - | |
1050 | | - | |
1051 | | - | |
1052 | | - | |
1053 | | - | |
1054 | | - | |
1055 | | - | |
1056 | | - | |
1057 | | - | |
1058 | 1048 | | |
1059 | 1049 | | |
1060 | 1050 | | |
| |||
1077 | 1067 | | |
1078 | 1068 | | |
1079 | 1069 | | |
1080 | | - | |
1081 | | - | |
1082 | | - | |
1083 | | - | |
1084 | | - | |
1085 | | - | |
1086 | | - | |
1087 | | - | |
1088 | | - | |
1089 | 1070 | | |
1090 | 1071 | | |
1091 | 1072 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
307 | | - | |
| 307 | + | |
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
| 328 | + | |
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
| |||
349 | 349 | | |
350 | 350 | | |
351 | 351 | | |
352 | | - | |
| 352 | + | |
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
375 | | - | |
| 375 | + | |
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| |||
556 | 556 | | |
557 | 557 | | |
558 | 558 | | |
559 | | - | |
| 559 | + | |
560 | 560 | | |
561 | 561 | | |
562 | 562 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1382 | 1382 | | |
1383 | 1383 | | |
1384 | 1384 | | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
1385 | 1390 | | |
1386 | 1391 | | |
1387 | 1392 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
32 | 45 | | |
33 | 46 | | |
34 | 47 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
26 | 39 | | |
27 | 40 | | |
28 | 41 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
26 | 35 | | |
27 | 36 | | |
28 | 37 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
28 | 37 | | |
29 | 38 | | |
30 | 39 | | |
| |||
0 commit comments