Open DGriffin91 opened 1 day ago
Support for f16 and f128 is basically non-existent in Cranelift so I can't implement these intrinsics the regular way of emulating it using scalar operations. Instead I did have to use inline asm to directly emit the respective x86 instructions, which makes compilation slower as it involves spawning another rustc instance with the LLVM backend to do the compilation of assembly for us. I have some ideas about how to handle this better in the future, but those ideas are not something that will be implemented within a couple of weeks.
(some more info at https://github.com/rust-lang/rustc_codegen_cranelift/issues/1461)
@bjorn3 Does Cranelift want to eventually support f16 and f128 more directly or is the asm route the plan for the foreseeable future?
Cranelift will probably have to support it eventually, but the asm route will be much quicker.
When compiling half I noticed two warnings for a missing x86 llvm intrinsic vcvtph2ps:
Thanks for all your work on the cranelift backend for rust!
Edit: I guess this is might be related to https://github.com/rust-lang/rustc_codegen_cranelift/issues/1461