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

Rollup of 5 pull requests #128423

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b61570a
Structured suggestion for `extern crate foo` when `foo` isn't resolve…
estebank Jul 24, 2024
67a08b5
Attribute checking simplifications
oli-obk Jul 30, 2024
efdf219
Revert "Rollup merge of #128104 - mu001999-contrib:fix/128053, r=petr…
compiler-errors Jul 30, 2024
8a0cd61
Revert "Rollup merge of #127017 - mu001999-contrib:dead/enhance, r=pn…
compiler-errors Jul 30, 2024
cfe4039
Revert "Rollup merge of #127107 - mu001999-contrib:dead/enhance-2, r=…
compiler-errors Jul 30, 2024
16d989b
Revert "Rollup merge of #126618 - mu001999-contrib:dead/enhance, r=pn…
compiler-errors Jul 30, 2024
3037f88
Revert "Rollup merge of #126315 - mu001999-contrib:fix/126289, r=petr…
compiler-errors Jul 30, 2024
ada5b54
Revert "Rollup merge of #125572 - mu001999-contrib:dead/enhance, r=pn…
compiler-errors Jul 30, 2024
4e84989
Suppress new false-negatives that were masked by dead code analysis c…
compiler-errors Jul 30, 2024
72844ee
Bless test fallout
compiler-errors Jul 30, 2024
a75d2f9
Cleanup sys module to match house style
ChrisDenton Jul 24, 2024
9169622
Move Windows implementation of anon pipe
ChrisDenton Jul 24, 2024
c586eb6
Specify the integer type of the `powi` LLVM intrinsic
tgross35 Jul 12, 2024
b6d0517
Add math intrinsics for `f16` and `f128`
tgross35 Jun 19, 2024
90e63dd
Add math functions for `f16` and `f128`
tgross35 Jun 27, 2024
a4657dd
Add `core` functions for `f16` and `f128` that require math routines
tgross35 Jul 17, 2024
e1d23c9
Update comments for `{f16, f32, f64, f128}::midpoint`
tgross35 Jul 18, 2024
d64bbb1
Add a disclaimer about x86 `f128` math functions
tgross35 Jul 30, 2024
144a1bf
Rollup merge of #128151 - estebank:missing-extern-crate, r=petrochenkov
matthiaskrgr Jul 31, 2024
a9ed873
Rollup merge of #128162 - ChrisDenton:cleanup, r=joboet
matthiaskrgr Jul 31, 2024
4940bb2
Rollup merge of #128402 - oli-obk:checked_attrs, r=compiler-errors
matthiaskrgr Jul 31, 2024
0c986b1
Rollup merge of #128404 - compiler-errors:revert-dead-code-changes, r…
matthiaskrgr Jul 31, 2024
edc1983
Rollup merge of #128417 - tgross35:f16-f128-math, r=dtolnay
matthiaskrgr Jul 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Specify the integer type of the powi LLVM intrinsic
Since LLVM <https://reviews.llvm.org/D99439> (4c7f820, "Update
@llvm.powi to handle different int sizes for the exponent"), the size of
the integer can be specified for the `powi` intrinsic. Make use of this
so it is more obvious that integer size is consistent across all float
types.

This feature is available since LLVM 13 (October 2021). Based on
bootstrap we currently support >= 17.0, so there should be no support
problems.
  • Loading branch information
tgross35 committed Jul 30, 2024
commit c586eb6906f26f458a0081850b58728072e3b51a
8 changes: 4 additions & 4 deletions compiler/rustc_codegen_llvm/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -775,10 +775,10 @@ impl<'ll> CodegenCx<'ll, '_> {
ifn!("llvm.debugtrap", fn() -> void);
ifn!("llvm.frameaddress", fn(t_i32) -> ptr);

ifn!("llvm.powi.f16", fn(t_f16, t_i32) -> t_f16);
ifn!("llvm.powi.f32", fn(t_f32, t_i32) -> t_f32);
ifn!("llvm.powi.f64", fn(t_f64, t_i32) -> t_f64);
ifn!("llvm.powi.f128", fn(t_f128, t_i32) -> t_f128);
ifn!("llvm.powi.f16.i32", fn(t_f16, t_i32) -> t_f16);
ifn!("llvm.powi.f32.i32", fn(t_f32, t_i32) -> t_f32);
ifn!("llvm.powi.f64.i32", fn(t_f64, t_i32) -> t_f64);
ifn!("llvm.powi.f128.i32", fn(t_f128, t_i32) -> t_f128);

ifn!("llvm.pow.f16", fn(t_f16, t_f16) -> t_f16);
ifn!("llvm.pow.f32", fn(t_f32, t_f32) -> t_f32);
Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_codegen_llvm/src/intrinsic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ fn get_simple_intrinsic<'ll>(
sym::sqrtf64 => "llvm.sqrt.f64",
sym::sqrtf128 => "llvm.sqrt.f128",

sym::powif16 => "llvm.powi.f16",
sym::powif32 => "llvm.powi.f32",
sym::powif64 => "llvm.powi.f64",
sym::powif128 => "llvm.powi.f128",
sym::powif16 => "llvm.powi.f16.i32",
sym::powif32 => "llvm.powi.f32.i32",
sym::powif64 => "llvm.powi.f64.i32",
sym::powif128 => "llvm.powi.f128.i32",

sym::sinf16 => "llvm.sin.f16",
sym::sinf32 => "llvm.sin.f32",
Expand Down