Skip to content
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

Mark simd_shuffle intrinsics as rustc_args_required_const #278

Merged
merged 2 commits into from
Sep 25, 2020

Conversation

ecstatic-morse
Copy link
Contributor

This change was made in stdarch but not packed_simd. See rust-lang/rust#69280 for background.

This change was made in `stdarch` but not `packed_simd`. See rust-lang/rust#69280 for background.
bors added a commit to rust-lang/rust that referenced this pull request Feb 22, 2020
…nkov

Revert #69280

Resolves #69313 by reverting #69280.

After #69280, `#[rustc_args_required_const(2)]` is required on the declaration of `simd_shuffle` intrinsics. This is allowed breakage, since you can't define platform intrinsics on stable. However, the latest release of the widely used `packed_simd` crate defines these intrinsics without the requisite attribute. Since there's no urgency to merge #69280, let's revert it. We can reconsider when rust-lang/packed_simd#278 is included in a point release of `packed_simd`.

r? @petrochenkov
@GabrielMajeri
Copy link
Contributor

I've tried running cargo test with this PR checked-out, and it gave an error with

error[E0658]: this is an internal attribute that will never be stable
  --> src/codegen/llvm.rs:13:5
   |
13 |     #[rustc_args_required_const(2)]
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #29642 <https://github.com/rust-lang/rust/issues/29642> for more information
   = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable

I guess adding #![feature(rustc_attrs)] should fix this.

@GabrielMajeri
Copy link
Contributor

I've checked it out locally and all tests passed. @gnzlbg is it ok to merge?

@ecstatic-morse
Copy link
Contributor Author

ping @gnzlbg

@hsivonen
Copy link
Member

@ecstatic-morse, why was this closed without merging?

@ecstatic-morse
Copy link
Contributor Author

Just due to inactivity. I'm not sure how to move it forward.

@ecstatic-morse
Copy link
Contributor Author

It seems @workingjubilee might be maintaining this repo now? This is still relevant.

@Lokathor
Copy link
Contributor

The crate is being moved into long-term maintenance mode. Unless this is critical to keeping the crate building, we are unlikely to handle any particular issue.

New work by the Portable SIMD Project Group (not yet announced) is going into a fresh crate so that we can examine each part as it goes into the crate.

@ecstatic-morse
Copy link
Contributor Author

It's critical to keeping this crate building.

@Lokathor
Copy link
Contributor

(oops, this is already a pr, not an issue. my bad, we'll probably review and accept it)

@workingjubilee workingjubilee added this to the 0.3.4 milestone Sep 24, 2020
@workingjubilee
Copy link
Member

Hello! Fixing this is tentatively on the docket, but what does the numeric parameter to the attribute mean?

@Lokathor
Copy link
Contributor

It's the arg index within the argument list.

Copy link
Member

@workingjubilee workingjubilee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! Then this is obviously correct.

@workingjubilee workingjubilee merged commit f989976 into rust-lang:master Sep 25, 2020
@stefson
Copy link

stefson commented Jul 8, 2021

hey there, this is a friendly note to everyone that rustc_args_required_const was removed in rust-1.54, and this will most likely lead to compile errors. At least the version of packed_sim that firefox pulls into its source tree doesn't compile anymore.

corresponding rust bug/pullrequest: rust-lang/rust#85110

@hsivonen
Copy link
Member

hsivonen commented Jul 9, 2021

At least the version of packed_sim that firefox pulls into its source tree doesn't compile anymore.

I'm in the process of cherry-picking the relevant packed_simd patches to Firefox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants