Conversation
|
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1edf65b to
9602bda
Compare
|
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_gcc Some changes occurred to the CTFE machinery Some changes occurred to the CTFE / Miri interpreter cc @rust-lang/miri Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3
cc @Amanieu, @folkertdev, @sayantn |
03450ad to
24dd8fb
Compare
| enum IntrinsicKind { | ||
| Builtin(&'static str), | ||
| Extern(&'static str), | ||
| BuiltinF16Cast(&'static str), | ||
| Fallback, | ||
| } |
There was a problem hiding this comment.
this is the only part of the PR where I did something weird; @antoyo you might want to double check it's fine. basically i wanted to keep the exact same behaviour as before merging the intrinsics, but the GCC frontend has very inconsistent treatment of them: some have a builtin name, some use an external function, some f16's go through a f32 and cast down (but not all, and with a different name from the f16?), etc. so i made an enum to clarify what handling is chosen without fiddling with the behaviour as i have no expertise there
if i'm misunderstanding something and there is actually a prettier/more succint way of doing this do let me know :) e.g. the f16 casts use __builtin_sqrt, but f32 uses the builtin sqrtf: is there a difference there?
This comment has been minimized.
This comment has been minimized.
|
not sure how to fix this; where do the additional symbols come from? |
| &self, | ||
| x: F, | ||
| mode: rustc_apfloat::Round, | ||
| ) -> InterpResult<'tcx, Scalar<M::Provenance>> |
There was a problem hiding this comment.
It is oddly inconsistent to take an F but return a Scalar. Why that choice?
There was a problem hiding this comment.
just because this was the simplest :)
float_round's two callers can easily do the ImmTy -> Scalar -> F conversion (it's needed there to avoid re-specifying the float type every time), so we might as well re-use theF- returning an
Fwould mean resolving theInterpResultto re-convert it into a scalar every time, so we might as well save the work and not redo it outside (this also would impactintrinsics/simd.rs)
agree it's not the prettiest signature but it's the most practical for how its used
There was a problem hiding this comment.
Hm... I guess it's a private function so it's not worth too much effort to make it pretty. Fair.^^
The error happens in clippy, so those symbols are likely part of the clippy symbol list and have to be removed there. See |
24dd8fb to
ad990b2
Compare
|
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
ad990b2 to
81ddbbf
Compare
This comment has been minimized.
This comment has been minimized.
|
Ah right so the float functions in |
|
The "before" side of the diff used relative paths, would that work to resolve the warning? |
81ddbbf to
bc4c70b
Compare
This comment has been minimized.
This comment has been minimized.
bc4c70b to
597ecf6
Compare
This comment has been minimized.
This comment has been minimized.
597ecf6 to
da61d47
Compare
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
☔ The latest upstream changes (presumably #155292) made this pull request unmergeable. Please resolve the merge conflicts. |
Follow up PR to #153834, commits split for readability
Commit 1 cleans up the cranelift code to make subsequent commit diffs simpler.
The rest of the commits apply the same merging as done before to the rest of the unary float intrinsics, namely
floor,ceil,trunc,round_ties_even,round,sqrtsin,cosexp,exp2,log,log2,log10The intrinsics were renamed to be the name of the function without the
f_part. for most this makes sense, but it does mean there isintrinsics::logwhich might be misleading (since it's not a logging function); happy to rename itr? tgross35