Repository navigation
Conversation
|
Some changes occurred in compiler/rustc_attr_ir cc @jdonszelmann, @JonathanBrouwer Some changes occurred in compiler/rustc_attr_parsing cc @jdonszelmann, @JonathanBrouwer Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred in compiler/rustc_passes/src/check_attr.rs |
|
Error: Failed to set assignee to
Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #triagebot on Zulip. |
|
r? RalfJung |
|
|
|
Cc @folkertdev |
39047e6 to
a0ad71b
Compare
|
Can you check that all places in the compiler that check for |
I gave a look, and I think so, but I am definitely not knowledgeable enough of compiler internals to be sure. |
ebce41f to
90416b5
Compare
|
Some changes occurred to constck cc @fee1-dead Some changes occurred to the CTFE machinery
cc @bjorn3 |
This comment has been minimized.
This comment has been minimized.
90416b5 to
c906c98
Compare
|
cc @rust-lang/clippy |
|
Reminder, once the PR becomes ready for a review, use |
e294fce to
e18a91c
Compare
|
@rustbot ready |
This comment has been minimized.
This comment has been minimized.
e18a91c to
f28292b
Compare
This comment has been minimized.
This comment has been minimized.
f28292b to
40c3e33
Compare
| #[rustc_intrinsic(llvm = "llvm.fshl.i64")] | ||
| fn fshl(a: i64, b: i64, sh: i64) -> i64 { | ||
| (((a as i128) << 64) | (b as i128) >> sh) as i64 | ||
| } | ||
|
|
||
| fn main() { | ||
| const { fshl(1, 2, 3) }; | ||
| //~^ ERROR: cannot call non-const function `fshl` in constants [E0015] | ||
| } |
There was a problem hiding this comment.
Not sure if this is worth a test, it's just standard const checking. Would be very surprising if we allowed calling a function that's not marked as const.
More interesting is ensuring that const stability checks work properly. You could extend tests/ui/consts/const-unstable-intrinsic.rs to also check backend intrinsics.
There was a problem hiding this comment.
Removed, and added more tests to the other file.
|
Btw the PR title and description seem to still refer to an earlier version of this PR. |
40c3e33 to
62cfa98
Compare
|
cc @rust-lang/miri |
llvm = argument to rustc_intrinsic.
62cfa98 to
e6d0471
Compare
e6d0471 to
7281468
Compare
This comment has been minimized.
This comment has been minimized.
7281468 to
f6b41d9
Compare
|
☔ The latest upstream changes (presumably #165588) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
View all comments
This is meant for usage in core::arch, to define the platform-specific LLVM intrinsics that correspond to each intrinsic.
LLM usage: I used an LLM to point me at places in the code from which to start the implementation, but I did not generate any code. The main non-trivial input from the LLM was to prevent inlining of callees annotated with rustc_llvm_intrinsic.Code has been since re-designed following @bjorn3's and @RalfJung's proposals so there's no trace of any LLM input left :-)r? RalfJ