Commit Graph

12 Commits

Author SHA1 Message Date
hev
890cd1e0f9
Enable f16 for LoongArch (#770)
[ the configured-out tests should be re-enabled once we have the symbols
  in nightly - Trevor ]
2025-03-05 06:11:51 +00:00
Trevor Gross
afea1c0555 Disable f16 on AArch64 without the neon feature
There is an LLVM regression that breaks some `f16`-related code when
`fp-armv8` is disabled [1]. Since Rust ties that feature to `neon`,
disable `f16` if `neon` is not available.

[1]: https://github.com/llvm/llvm-project/issues/129394
2025-03-01 14:40:03 -05:00
Martin Nordholts
49224fb9ed Enable f16 for MIPS
It seems as if `f16` works on MIPS now according to my
testing on Rust master with LLVM 20, and I was asked to
create PRs with my changes.

I only tested on the flavour of `mipsel-unknown-linux-gnu`
hardware that happens to be available to me, so I can't say
anything about other MIPS hardware, but from a casual
skimming of the LLVM code ([1], [2]) it seems like `f16`
should work on all MIPS hardware. So enable it for all MIPS
hardware.

[1]: https://github.com/rust-lang/llvm-project/blob/rustc/20.1-2025-02-13/llvm/lib/Target/Mips/MipsISelLowering.h#L370
[2]: https://github.com/rust-lang/llvm-project/blob/rustc/20.1-2025-02-13/llvm/lib/CodeGen/TargetLoweringBase.cpp#L1367-L1388
2025-02-23 22:40:57 -05:00
Trevor Gross
4e1b885595 Add a version to some FIXMEs that will be resolved in LLVM 20 2025-01-27 20:27:53 -06:00
Trevor Gross
83a61e67fd Account for optimization levels other than numbers
The build script currently panics with `opt-level=z` or `opt-level=s`.
Account for this here.

This is the `compiler-builtins` version of [1].

Fixes: https://github.com/rust-lang/compiler-builtins/issues/742

[1]: https://github.com/rust-lang/libm/pull/417
2025-01-07 18:13:04 -05:00
Trevor Gross
f4f942c3e9 Update the libm submodule 2025-01-06 19:17:41 -05:00
Sebastian Neubauer
e8eb76a45a
Disable f128 for amdgpu (#737)
`compiler_builtins` fails to compile to amdgpu if f128 is enabled.
The reason seems to be that compiler_builtins uses libcalls in the
implementation. I’m not really familiar with what libcalls are, but the
LLVM amdgpu backend explicitly does not support them.

Error message:
```
LLVM ERROR: unsupported libcall legalization
```
2024-12-26 00:01:14 -05:00
Trevor Gross
04ccb683d9 Disable f16 on platforms that have recursion problems
CI in [1] seems to indicate that there are cases where the `f16`
infinite recursion bug ([2], [3]) can make its way into what gets called
during tests, even though this doesn't seem to be the usual case. In
order to make sure that we avoid these completely, just unset
`f16_enabled` on any platforms that have the recursion problem.

This also refactors the `match` statement to be more in line with
`library/std/build.rs`.

[1]: https://github.com/rust-lang/compiler-builtins/pull/729
[2]: https://github.com/llvm/llvm-project/issues/97981
[3]: https://github.com/rust-lang/compiler-builtins/issues/651
2024-11-05 02:57:34 -06:00
beetrees
10bdf3b6c1
Remove incorrect sparcv9 match pattern from configure_f16_f128 2024-11-03 22:54:01 +00:00
hev
53b3e71bbc
Disable f16 for LoongArch64 (#722)
Disable `f161` for LoongArch64 due to incorrect code generation on LLVM 19,
which causes failures in `testcrate/tests/conv.rs`. This workaround will
remain in place until llvm/llvm-project#109093 is merged or we upgrade to
LLVM 20.
2024-11-01 10:00:00 +00:00
Trevor Gross
db9debf096 Apply fixes to build.rs files
Make the following changes:

- Add `rerun-if-changed` to the new `configure.rs`, it seems this was
  causing incorrect caching.
- Change from matching `i686` to `x86`. The target triple starts with
  `i686` so that is what we were checking before, but the architecture
  is `x86`. This change should have been made when we added `struct
  Target`, update it now instead.
2024-08-19 07:04:07 -05:00
Kleis Auke Wolthuizen
13cc7daf05 Fix CI for targets that conditionally disable f16 or f128 support 2024-08-12 14:56:59 +02:00