fix CTFE/Miri simd_insert/extract on array-style repr(simd) types#90999
Merged
bors merged 2 commits intorust-lang:masterfrom Nov 20, 2021
Merged
fix CTFE/Miri simd_insert/extract on array-style repr(simd) types#90999bors merged 2 commits intorust-lang:masterfrom
bors merged 2 commits intorust-lang:masterfrom
Conversation
Contributor
|
Some changes occured to the CTFE / Miri engine cc @rust-lang/miri |
This comment has been minimized.
This comment has been minimized.
oli-obk
reviewed
Nov 18, 2021
| @@ -7,7 +7,8 @@ | |||
|
|
|||
| #[repr(simd)] struct i8x1(i8); | |||
Contributor
There was a problem hiding this comment.
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.
Member
Author
There was a problem hiding this comment.
Good point, I have added that case to the test as well.
RalfJung
commented
Nov 18, 2021
| 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())?; |
Member
Author
There was a problem hiding this comment.
FWIW, this will assert that the types are equal, thus taking care of the remaining assertions that I removed.
Contributor
|
@bors r+ |
Collaborator
|
📌 Commit 0304e16 has been approved by |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Nov 18, 2021
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`
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Nov 19, 2021
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``
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Nov 19, 2021
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```
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Nov 19, 2021
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````
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Nov 19, 2021
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`````
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 20, 2021
…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
bors
added a commit
to rust-lang/miri
that referenced
this pull request
Nov 21, 2021
portable SIMD: basic binops First steps towards #1912. Requires rust-lang/rust#90999.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The changed test would previously fail since
place_indexwould 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