rustc_codegen_cranelift icon indicating copy to clipboard operation
rustc_codegen_cranelift copied to clipboard

llvm.x86.vcvtps2ph.128 missing

Open m4b opened this issue 3 months ago • 3 comments

I was directed to create an issue when compiling a particular example in iced_anim (the other examples I was build and trying out did not panic fwiw).

Simple repro (assumes cranelift + cargo all setup, etc.):

git clone https://github.com/bradysimon/iced_anim

cd iced_anim

cargo r --example animated_widgets

thread 'main' (180923) panicked at library/core/src/panicking.rs:225:5:
llvm.x86.vcvtps2ph.128 is not yet supported.
See https://github.com/rust-lang/rustc_codegen_cranelift/issues/171
Please open an issue at https://github.com/rust-lang/rustc_codegen_cranelift/issues
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread caused non-unwinding panic. aborting.
fish: Job 1, 'cargo r --example animated_widg…' terminated by signal SIGABRT (Abort)

ref #171

Great work btw, I recently started using it again, and I have subsecond incremental debug builds with it + wild on linux machines, for rather large project like iced application, very impressive!

m4b avatar Sep 22 '25 04:09 m4b

Also just ran into llvm.x86.vcvtps2ph.128. Seems to be conversion of f32 to f16 https://github.com/Mic92/x86_64-linux-cheatsheats/blob/master/pages/VCVTPS2PH

EriKWDev avatar Sep 24 '25 21:09 EriKWDev

If I would like to contribute to this, how would I go about it? I am reading the src/intrinsics/llvm_x86.rs and trying to figure out how it works.

Any tips for how to go about it?

EriKWDev avatar Sep 26 '25 08:09 EriKWDev

Basically look for the corresponding user facing function in core::arch (https://github.com/rust-lang/stdarch/tree/master/crates/core_arch) and then replicate the behavior given for this function in the intel intrinsic guide.

bjorn3 avatar Sep 26 '25 09:09 bjorn3