mark f128 as reliable on powerpc64 with +vsx - #162979
Conversation
This comment has been minimized.
This comment has been minimized.
db428b4 to
b540652
Compare
|
This will result in @bors r+ |
|
@bors r-
Seems to work on compiler explorer? |
|
This pull request was unapproved. |
|
I think LLVM just emits that symbol, but it does not actually exist #![feature(f128)]
#[unsafe(no_mangle)]
pub fn square(num: f128) -> f128 {
num.sin()
}
fn main() {
dbg!(square(3.14));
dbg!(3.14f32.sin());
}with That is different from the x86 issue though (which means I must be misunderstanding the x86 problem in LLVM, or it just does not actually apply here and really is x86-specific). I'll adjust the comment. |
b540652 to
b601491
Compare
This feature is only enabled by default for powerpc64le, and not enabled on the big-endian targets. Even with vsx, the default long double is ppcf128 on the big-endian targets, so LLVM calls the incorrect libcall. Also some libcalls just don't exist
b601491 to
a3ad87e
Compare
|
@rustbot ready |
|
A quick check on compiler explorer suggests LLVM has emitted the correct libcalls for x86_64 since LLVM 19. I think the main blocker now on most major targets is implementing the symbols in compiler builtins. That does lead me to wonder whether the blanket |
Right, but only on gnu targets. I ran into this before llvm/llvm-project#44744 (comment) For powerpc even with the musl targets the names are correct. Just, musl does not provide any f128 implementations as far as I'm aware. |
…rees mark `f128` as reliable on `powerpc64` with `+vsx` This feature is only enabled by default for powerpc64le, and not enabled on the big-endian targets. Even with vsx, the default long double is ppcf128 on the big-endian targets, so LLVM calls the incorrect libcall. Also some libcalls just don't exist. I tested this with and without `rustflags = ["-C", "target-feature=+vsx"]` in the `bootstrap.toml`: ``` ./x.py test library/core --target powerpc64-unknown-linux-gnu ./x.py test library/core --target powerpc64le-unknown-linux-gnu ``` These all hit one failure, in the docs test for `library/core/src/keyword_docs.rs` where `become` is used: powerpc does not support guaranteed tail calls. Anyway, that is not relevant for f128 support. Sadly `powerpc-unknown-linux-gnu` with `+vsx` hits the issue fixed in llvm/llvm-project#216613, I've requested a backport for the fix. r? beetrees or @tgross35 cc @Gelbpunkt
Rollup of 18 pull requests Successful merges: - #162499 (`rustc_codegen_gcc` subtree update) - #161424 (implement `VaArgSafe` for `f128`) - #161777 (Add Natvis visualiser and debuginfo tests for `f128`) - #162506 (Avoid suggesting imports of traits declared inside fn bodies) - #162591 (Move parse error recovery for expression operators "out of line" & refactor in the area) - #162669 ([rustdoc] Correctly handle intra-doc links on inlined same item with different names) - #162733 (Add useful APIs to `Unique(Arc|Rc)`) - #162913 (Refactor LivenessResults into LivenessComputation, without typeck) - #162950 (More AST lowering cleanups) - #162964 (Update `browser-ui-test` version to `0.25.2`) - #162979 (mark `f128` as reliable on `powerpc64` with `+vsx`) - #161743 (Add performance notes for the floating-point round method) - #162797 (yeet AliasConstKind::opt_def_id) - #162836 (Ping T-libs-ping instead of T-libs-fcp for backports) - #162873 (Adjust `bug!`/`span_bug!` emission) - #162875 (Add .seek_read_exact(), .seek_write_all() to std::os::windows::fs::FileExt) - #162956 (Add missing `#[repr(C)]` in UI, codegen and assembly tests) - #162981 (rustc-dev-guide subtree update) Failed merges: - #162177 (Properly implement the gpu-kernel ABI for amdgpu)
Rollup of 18 pull requests Successful merges: - #162499 (`rustc_codegen_gcc` subtree update) - #161424 (implement `VaArgSafe` for `f128`) - #161777 (Add Natvis visualiser and debuginfo tests for `f128`) - #162506 (Avoid suggesting imports of traits declared inside fn bodies) - #162591 (Move parse error recovery for expression operators "out of line" & refactor in the area) - #162669 ([rustdoc] Correctly handle intra-doc links on inlined same item with different names) - #162733 (Add useful APIs to `Unique(Arc|Rc)`) - #162913 (Refactor LivenessResults into LivenessComputation, without typeck) - #162950 (More AST lowering cleanups) - #162964 (Update `browser-ui-test` version to `0.25.2`) - #162979 (mark `f128` as reliable on `powerpc64` with `+vsx`) - #161743 (Add performance notes for the floating-point round method) - #162797 (yeet AliasConstKind::opt_def_id) - #162836 (Ping T-libs-ping instead of T-libs-fcp for backports) - #162873 (Adjust `bug!`/`span_bug!` emission) - #162875 (Add .seek_read_exact(), .seek_write_all() to std::os::windows::fs::FileExt) - #162956 (Add missing `#[repr(C)]` in UI, codegen and assembly tests) - #162981 (rustc-dev-guide subtree update) Failed merges: - #162177 (Properly implement the gpu-kernel ABI for amdgpu)
…rees mark `f128` as reliable on `powerpc64` with `+vsx` This feature is only enabled by default for powerpc64le, and not enabled on the big-endian targets. Even with vsx, the default long double is ppcf128 on the big-endian targets, so LLVM calls the incorrect libcall. Also some libcalls just don't exist. I tested this with and without `rustflags = ["-C", "target-feature=+vsx"]` in the `bootstrap.toml`: ``` ./x.py test library/core --target powerpc64-unknown-linux-gnu ./x.py test library/core --target powerpc64le-unknown-linux-gnu ``` These all hit one failure, in the docs test for `library/core/src/keyword_docs.rs` where `become` is used: powerpc does not support guaranteed tail calls. Anyway, that is not relevant for f128 support. Sadly `powerpc-unknown-linux-gnu` with `+vsx` hits the issue fixed in llvm/llvm-project#216613, I've requested a backport for the fix. r? beetrees or @tgross35 cc @Gelbpunkt
…uwer Rollup of 22 pull requests Successful merges: - #163001 (Temporarily disable `test-x86_64-fuchsia`) - #162880 (Mini optimization in `rustc_hir_typeck::upvar::restrict_precision_for_drop_types`) - #161424 (implement `VaArgSafe` for `f128`) - #161777 (Add Natvis visualiser and debuginfo tests for `f128`) - #162506 (Avoid suggesting imports of traits declared inside fn bodies) - #162591 (Move parse error recovery for expression operators "out of line" & refactor in the area) - #162669 ([rustdoc] Correctly handle intra-doc links on inlined same item with different names) - #162733 (Add useful APIs to `Unique(Arc|Rc)`) - #162913 (Refactor LivenessResults into LivenessComputation, without typeck) - #162924 (Remove applying inline attributes at the callsite) - #162940 (Use spawned `SBDebugger` instance) - #162950 (More AST lowering cleanups) - #162964 (Update `browser-ui-test` version to `0.25.2`) - #162979 (mark `f128` as reliable on `powerpc64` with `+vsx`) - #161743 (Add performance notes for the floating-point round method) - #162797 (yeet AliasConstKind::opt_def_id) - #162836 (Ping T-libs-ping instead of T-libs-fcp for backports) - #162873 (Adjust `bug!`/`span_bug!` emission) - #162956 (Add missing `#[repr(C)]` in UI, codegen and assembly tests) - #162971 (libtest harness: avoid 'extern crate test' with custom runner) - #162981 (rustc-dev-guide subtree update) - #162985 (Error on invalid placements for unstable attributes)
Rollup merge of #162979 - folkertdev:ppc-enable-f128, r=beetrees mark `f128` as reliable on `powerpc64` with `+vsx` This feature is only enabled by default for powerpc64le, and not enabled on the big-endian targets. Even with vsx, the default long double is ppcf128 on the big-endian targets, so LLVM calls the incorrect libcall. Also some libcalls just don't exist. I tested this with and without `rustflags = ["-C", "target-feature=+vsx"]` in the `bootstrap.toml`: ``` ./x.py test library/core --target powerpc64-unknown-linux-gnu ./x.py test library/core --target powerpc64le-unknown-linux-gnu ``` These all hit one failure, in the docs test for `library/core/src/keyword_docs.rs` where `become` is used: powerpc does not support guaranteed tail calls. Anyway, that is not relevant for f128 support. Sadly `powerpc-unknown-linux-gnu` with `+vsx` hits the issue fixed in llvm/llvm-project#216613, I've requested a backport for the fix. r? beetrees or @tgross35 cc @Gelbpunkt
|
I guess AIX has VSX but is still broken llvm/llvm-project#101545, seems like this may have broken builds on the target https://github.com/rust-lang/libc/actions/runs/35495229282/job/106036887284?pr=5411 |
Skip AIX targets from CI tests while rust-lang/rust#162979 gets sorted out.
…uwer Rollup of 22 pull requests Successful merges: - rust-lang/rust#163001 (Temporarily disable `test-x86_64-fuchsia`) - rust-lang/rust#162880 (Mini optimization in `rustc_hir_typeck::upvar::restrict_precision_for_drop_types`) - rust-lang/rust#161424 (implement `VaArgSafe` for `f128`) - rust-lang/rust#161777 (Add Natvis visualiser and debuginfo tests for `f128`) - rust-lang/rust#162506 (Avoid suggesting imports of traits declared inside fn bodies) - rust-lang/rust#162591 (Move parse error recovery for expression operators "out of line" & refactor in the area) - rust-lang/rust#162669 ([rustdoc] Correctly handle intra-doc links on inlined same item with different names) - rust-lang/rust#162733 (Add useful APIs to `Unique(Arc|Rc)`) - rust-lang/rust#162913 (Refactor LivenessResults into LivenessComputation, without typeck) - rust-lang/rust#162924 (Remove applying inline attributes at the callsite) - rust-lang/rust#162940 (Use spawned `SBDebugger` instance) - rust-lang/rust#162950 (More AST lowering cleanups) - rust-lang/rust#162964 (Update `browser-ui-test` version to `0.25.2`) - rust-lang/rust#162979 (mark `f128` as reliable on `powerpc64` with `+vsx`) - rust-lang/rust#161743 (Add performance notes for the floating-point round method) - rust-lang/rust#162797 (yeet AliasConstKind::opt_def_id) - rust-lang/rust#162836 (Ping T-libs-ping instead of T-libs-fcp for backports) - rust-lang/rust#162873 (Adjust `bug!`/`span_bug!` emission) - rust-lang/rust#162956 (Add missing `#[repr(C)]` in UI, codegen and assembly tests) - rust-lang/rust#162971 (libtest harness: avoid 'extern crate test' with custom runner) - rust-lang/rust#162981 (rustc-dev-guide subtree update) - rust-lang/rust#162985 (Error on invalid placements for unstable attributes)
don't mark `f128` as reliable on AIX In fact the type is really not supported at all there. In rust-lang#162979 we made `f128` reliable on powerpc64 when the `vsx` feature is enabled. Apparently this is the case on AIX, but it just does not implement `f128` at all. r? tgross35
don't mark `f128` as reliable on AIX In fact the type is really not supported at all there. In rust-lang#162979 we made `f128` reliable on powerpc64 when the `vsx` feature is enabled. Apparently this is the case on AIX, but it just does not implement `f128` at all. r? tgross35
Skip AIX targets from CI tests while rust-lang/rust#162979 gets sorted out.
Skip AIX targets from CI tests while rust-lang/rust#162979 gets sorted out.
Rollup merge of #163066 - folkertdev:f128-not-aix, r=beetrees don't mark `f128` as reliable on AIX In fact the type is really not supported at all there. In #162979 we made `f128` reliable on powerpc64 when the `vsx` feature is enabled. Apparently this is the case on AIX, but it just does not implement `f128` at all. r? tgross35
…uwer Rollup of 22 pull requests Successful merges: - rust-lang/rust#163001 (Temporarily disable `test-x86_64-fuchsia`) - rust-lang/rust#162880 (Mini optimization in `rustc_hir_typeck::upvar::restrict_precision_for_drop_types`) - rust-lang/rust#161424 (implement `VaArgSafe` for `f128`) - rust-lang/rust#161777 (Add Natvis visualiser and debuginfo tests for `f128`) - rust-lang/rust#162506 (Avoid suggesting imports of traits declared inside fn bodies) - rust-lang/rust#162591 (Move parse error recovery for expression operators "out of line" & refactor in the area) - rust-lang/rust#162669 ([rustdoc] Correctly handle intra-doc links on inlined same item with different names) - rust-lang/rust#162733 (Add useful APIs to `Unique(Arc|Rc)`) - rust-lang/rust#162913 (Refactor LivenessResults into LivenessComputation, without typeck) - rust-lang/rust#162924 (Remove applying inline attributes at the callsite) - rust-lang/rust#162940 (Use spawned `SBDebugger` instance) - rust-lang/rust#162950 (More AST lowering cleanups) - rust-lang/rust#162964 (Update `browser-ui-test` version to `0.25.2`) - rust-lang/rust#162979 (mark `f128` as reliable on `powerpc64` with `+vsx`) - rust-lang/rust#161743 (Add performance notes for the floating-point round method) - rust-lang/rust#162797 (yeet AliasConstKind::opt_def_id) - rust-lang/rust#162836 (Ping T-libs-ping instead of T-libs-fcp for backports) - rust-lang/rust#162873 (Adjust `bug!`/`span_bug!` emission) - rust-lang/rust#162956 (Add missing `#[repr(C)]` in UI, codegen and assembly tests) - rust-lang/rust#162971 (libtest harness: avoid 'extern crate test' with custom runner) - rust-lang/rust#162981 (rustc-dev-guide subtree update) - rust-lang/rust#162985 (Error on invalid placements for unstable attributes)
This feature is only enabled by default for powerpc64le, and not enabled on the big-endian targets. Even with vsx, the default long double is ppcf128 on the big-endian targets, so LLVM calls the incorrect libcall. Also some libcalls just don't exist.
I tested this with and without
rustflags = ["-C", "target-feature=+vsx"]in thebootstrap.toml:These all hit one failure, in the docs test for
library/core/src/keyword_docs.rswherebecomeis used: powerpc does not support guaranteed tail calls. Anyway, that is not relevant for f128 support.Sadly
powerpc-unknown-linux-gnuwith+vsxhits the issue fixed in llvm/llvm-project#216613, I've requested a backport for the fix.r? beetrees or @tgross35
cc @Gelbpunkt