rust/compiler/rustc_codegen_llvm
Trevor Gross cdb299c0d8 Enable f16 and f128 on targets that were fixed in LLVM21
LLVM21 fixed the new float types on a number of targets:

* SystemZ gained f16 support
  https://github.com/llvm/llvm-project/pull/109164
* Hexagon now uses soft f16 to avoid recursion bugs
  https://github.com/llvm/llvm-project/pull/130977
* Mips now correctly handles f128 (actually since LLVM20)
  https://github.com/llvm/llvm-project/pull/117525
* f128 is now correctly aligned when passing the stack on x86
  https://github.com/llvm/llvm-project/pull/138092

Thus, enable the types on relevant targets for LLVM > 21.0.0.

NVPTX also gained handling of f128 as a storage type, but it lacks
support for basic math operations so is still disabled here.
2025-08-07 15:34:49 -05:00
..

The codegen crate contains the code to convert from MIR into LLVM IR, and then from LLVM IR into machine code. In general it contains code that runs towards the end of the compilation process.

For more information about how codegen works, see the rustc dev guide.