-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Atomic intrinsics : use const generic ordering, part 2 #141700
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
Some changes occurred in compiler/rustc_codegen_gcc Some changes occurred to the intrinsics. Make sure the CTFE / Miri interpreter cc @rust-lang/miri, @RalfJung, @oli-obk, @lcnr Some changes occurred in compiler/rustc_codegen_ssa The Miri subtree was changed cc @rust-lang/miri Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 |
This comment has been minimized.
This comment has been minimized.
} else if intrinsic_name == sym::contract_check_ensures { | ||
// contract_check_ensures::<Ret, C>(Ret, C) -> Ret | ||
// where C: for<'a> Fn(&'a Ret) -> bool, | ||
// | ||
// so: two type params, 0 lifetime param, 0 const params, two inputs, no return | ||
(2, 0, 0, vec![param(0), param(1)], param(1), hir::Safety::Safe) |
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.
@celinval do you know why this intrinsic is handled separately rather than in the big match with all the others?
28cacd2
to
b35d186
Compare
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #141716) made this pull request unmergeable. Please resolve the merge conflicts. |
b35d186
to
1b4ba1f
Compare
#[rustc_intrinsic] | ||
pub unsafe fn atomic_xchg_seqcst<T>(dst: *mut T, src: T) -> T; | ||
pub unsafe fn atomic_xchg<T, const ORD: AtomicOrdering>(dst: *mut T, src: T) -> T; |
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 this test use core::intrinsics
instead?
Edit: Nope, that would invalidate the test. It seems like it could use a different intrinsic though.
Edit2: This test was added in 22e3a85
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.
Yeah I don't know what this is testing so I changed it as little as possible...
This comment has been minimized.
This comment has been minimized.
1b4ba1f
to
bfcece2
Compare
|
This comment has been minimized.
This comment has been minimized.
bfcece2
to
581de04
Compare
This comment has been minimized.
This comment has been minimized.
Uh, how could this PR possibly break that incremental test... ( |
I don't really know much about incremental 🙏 Hope you manage to figure it out |
I can look later if you are willing to wait a day or so 🤔 |
The PR is blocked on some other stuff anyway. |
This isn't an incremental bug per se, but instead a bug that has to do with debug printing query keys when debug assertions and I've pushed a commit which should fix this. |
The job Click to see the possible cause of the failure (guessed by this bot)
|
☔ The latest upstream changes (presumably #139118) made this pull request unmergeable. Please resolve the merge conflicts. |
Ah, sorry, needs bless tests due to my changes. I can probably pull it out into a separate PR, lemme do that tomorrow. |
Sounds good, thanks for looking into this. :) |
This completes what got started in #141507 by using a const generic for the ordering for all intrinsics. It is based on that PR; only the last commit is new.
Blocked on:
r? @bjorn3