Commit f1d136b
authored
Rollup merge of #128731 - RalfJung:simd-shuffle-vector, r=workingjubilee
simd_shuffle intrinsic: allow argument to be passed as vector
See rust-lang/rust#128738 for context.
I'd like to get rid of [this hack](https://github.com/rust-lang/rust/blob/6c0b89dfac65be9a5be12f938f23098ebc36c635/compiler/rustc_codegen_ssa/src/mir/block.rs#L922-L935). rust-lang/rust#128537 almost lets us do that since constant SIMD vectors will then be passed as immediate arguments. However, simd_shuffle for some reason actually takes an *array* as argument, not a vector, so the hack is still required to ensure that the array becomes an immediate (which then later stages of codegen convert into a vector, as that's what LLVM needs).
This PR prepares simd_shuffle to also support a vector as the `idx` argument. Once this lands, stdarch can hopefully be updated to pass `idx` as a vector, and then support for arrays can be removed, which finally lets us get rid of that hack.2 files changed
+42
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1923 | 1923 | | |
1924 | 1924 | | |
1925 | 1925 | | |
1926 | | - | |
1927 | | - | |
1928 | 1926 | | |
1929 | 1927 | | |
1930 | 1928 | | |
1931 | 1929 | | |
1932 | 1930 | | |
1933 | | - | |
1934 | | - | |
1935 | 1931 | | |
1936 | 1932 | | |
1937 | 1933 | | |
| |||
1942 | 1938 | | |
1943 | 1939 | | |
1944 | 1940 | | |
1945 | | - | |
1946 | | - | |
1947 | | - | |
1948 | | - | |
1949 | | - | |
1950 | | - | |
1951 | | - | |
1952 | | - | |
| 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 | + | |
1953 | 1969 | | |
1954 | 1970 | | |
1955 | 1971 | | |
1956 | 1972 | | |
1957 | | - | |
| 1973 | + | |
1958 | 1974 | | |
1959 | 1975 | | |
1960 | 1976 | | |
| |||
1998 | 2014 | | |
1999 | 2015 | | |
2000 | 2016 | | |
2001 | | - | |
| 2017 | + | |
2002 | 2018 | | |
2003 | 2019 | | |
2004 | 2020 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
356 | | - | |
| 356 | + | |
357 | 357 | | |
358 | | - | |
| 358 | + | |
| 359 | + | |
359 | 360 | | |
360 | 361 | | |
361 | 362 | | |
362 | 363 | | |
363 | 364 | | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
369 | 374 | | |
370 | 375 | | |
371 | 376 | | |
| |||
0 commit comments