-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix CTFE/Miri simd_insert/extract on array-style repr(simd) types #90999
Conversation
Some changes occured to the CTFE / Miri engine cc @rust-lang/miri |
This comment has been minimized.
This comment has been minimized.
@@ -7,7 +7,8 @@ | |||
|
|||
#[repr(simd)] struct i8x1(i8); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you check whether #[repr(simd)] struct i8x1([i8; 1]);
won't end up with an immediate? Not that this type makes much sense, but probably good to be exhaustive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I have added that case to the test as well.
let place = self.mplace_index(&dest, i)?; | ||
let value = | ||
if i == index { *elem } else { self.mplace_index(&input, i)?.into() }; | ||
self.copy_op(&value, &place.into())?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, this will assert that the types are equal, thus taking care of the remaining assertions that I removed.
@bors r+ |
📌 Commit 0304e16 has been approved by |
fix CTFE/Miri simd_insert/extract on array-style repr(simd) types The changed test would previously fail since `place_index` would just return the only field of `f32x4`, i.e., the array -- rather than *indexing into* the array which is what we have to do. The new helper methods will also be needed for rust-lang/miri#1912. r? `@oli-obk`
fix CTFE/Miri simd_insert/extract on array-style repr(simd) types The changed test would previously fail since `place_index` would just return the only field of `f32x4`, i.e., the array -- rather than *indexing into* the array which is what we have to do. The new helper methods will also be needed for rust-lang/miri#1912. r? ``@oli-obk``
fix CTFE/Miri simd_insert/extract on array-style repr(simd) types The changed test would previously fail since `place_index` would just return the only field of `f32x4`, i.e., the array -- rather than *indexing into* the array which is what we have to do. The new helper methods will also be needed for rust-lang/miri#1912. r? ```@oli-obk```
fix CTFE/Miri simd_insert/extract on array-style repr(simd) types The changed test would previously fail since `place_index` would just return the only field of `f32x4`, i.e., the array -- rather than *indexing into* the array which is what we have to do. The new helper methods will also be needed for rust-lang/miri#1912. r? ````@oli-obk````
fix CTFE/Miri simd_insert/extract on array-style repr(simd) types The changed test would previously fail since `place_index` would just return the only field of `f32x4`, i.e., the array -- rather than *indexing into* the array which is what we have to do. The new helper methods will also be needed for rust-lang/miri#1912. r? `````@oli-obk`````
…askrgr Rollup of 8 pull requests Successful merges: - rust-lang#88361 (Makes docs for references a little less confusing) - rust-lang#90089 (Improve display of enum variants) - rust-lang#90956 (Add a regression test for rust-lang#87573) - rust-lang#90999 (fix CTFE/Miri simd_insert/extract on array-style repr(simd) types) - rust-lang#91026 (rustdoc doctest: detect `fn main` after an unexpected semicolon) - rust-lang#91035 (Put back removed empty line) - rust-lang#91044 (Turn all 0x1b_u8 into '\x1b' or b'\x1b') - rust-lang#91054 (rustdoc: Fix some unescaped HTML tags in docs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
portable SIMD: basic binops First steps towards #1912. Requires rust-lang/rust#90999.
The changed test would previously fail since
place_index
would just return the only field off32x4
, i.e., the array -- rather than indexing into the array which is what we have to do.The new helper methods will also be needed for rust-lang/miri#1912.
r? @oli-obk