-
Notifications
You must be signed in to change notification settings - Fork 13.3k
make abi_unsupported_vector_types a hard error #139309
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
base: master
Are you sure you want to change the base?
Conversation
r? @fee1-dead rustbot has assigned @fee1-dead. Use |
This comment has been minimized.
This comment has been minimized.
f4e41c2
to
607bd91
Compare
This comment has been minimized.
This comment has been minimized.
607bd91
to
39f82c8
Compare
@@ -3,7 +3,7 @@ | |||
// x86 only. | |||
|
|||
//@ add-core-stubs | |||
//@ compile-flags: --target i686-unknown-linux-gnu -Cno-prepopulate-passes -Copt-level=3 | |||
//@ compile-flags: --target i686-unknown-linux-gnu -Cno-prepopulate-passes -Copt-level=3 -Ctarget-feature=+avx |
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.
@azhogin this test was using SIMD vector types without the appropriate target feature... I hope adding the target feature preserves the meaning of the test.
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.
It does.
This comment has been minimized.
This comment has been minimized.
39f82c8
to
d817e10
Compare
This comment has been minimized.
This comment has been minimized.
d817e10
to
00743be
Compare
Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 |
This comment has been minimized.
This comment has been minimized.
00743be
to
764fe74
Compare
This PR modifies cc @jieyouxu |
This comment has been minimized.
This comment has been minimized.
764fe74
to
f6eb25c
Compare
@@ -56,7 +56,7 @@ fn main() { | |||
.target(&target) | |||
.emit("llvm-ir,asm") | |||
.input("simd.rs") | |||
.arg("-Ctarget-feature=-soft-float,+neon,+sse") | |||
.arg("-Ctarget-feature=-soft-float,+neon,+sse2,+msa") | |||
.arg(&format!("-Cextra-filename=-{target}")) | |||
.run(); |
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.
This test will become a complete nightmare to maintain when we start to properly enforce some basic consistency of target features.
@RalfJung Do you think we can get this documented in the reference? Like maybe somewhere in the target_feature documentation or probably it makes more sense to be a part of the abi chapter with the abi chapter rework? Although I'm a little confused since Connor removed the SIMD section and I'm not sure why. My uncertainty is emphasized because we currently don't really document SIMD, and I don't know how we plan to do that. |
This comment has been minimized.
This comment has been minimized.
f6eb25c
to
5bbf200
Compare
Seems like this should be part of rust-lang/reference#1545 so I'd rather not add a separate PR now, that would just be a huge conflict. |
☔ The latest upstream changes (presumably #139555) made this pull request unmergeable. Please resolve the merge conflicts. |
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.
Compiler changes LGTM
@rfcbot fcp merge |
Team member @tmandry has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. |
Sounds right to me. @rfcbot reviewed |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
@rfcbot reviewed |
Fixes #116558 by completing the transition; see that issue for context. The lint was introduced with Rust 1.84 and this has been shown in cargo's future breakage reports since Rust 1.85, released 6 weeks ago, and so far we got 0 complaints by users. There's not even a backlink on the tracking issue. We did a crater run when the lint was originally added and found no breakage. So I don't think we need another crater run now, but I can do one if the team prefers that.
#131800 is done, so for most current targets (in particular, all tier 1 and tier 2 targets) we have the information to implement this check (modulo the targets where we don't properly support SIMD vectors yet, see the sub-issues of #116558). If a new target gets added in the future, it will default to reject all SIMD vector types until proper information is added, which is the default we want.
This will need approval by for @rust-lang/lang. Cc @workingjubilee @veluca93