Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add llvm.x86.sse2.cvtps2dq #1495

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

folkertdev
Copy link
Contributor

part of #1492, but some further intrinsics are needed for the tiny_skia test suite to pass with cranelift:

warning: unsupported x86 llvm intrinsic llvm.x86.sse.rcp.ps; replacing with trap

warning: unsupported x86 llvm intrinsic llvm.x86.sse.rsqrt.ps; replacing with trap

warning: unsupported x86 llvm intrinsic llvm.x86.sse2.psll.d; replacing with trap

warning: unsupported x86 llvm intrinsic llvm.x86.sse2.psrl.d; replacing with trap

nonetheless, this addition makes 26 more tests pass

Comment on lines +462 to +464
let value = fx.bcx.ins().x86_cvtt2dq(types::I32X4, a);
let cvalue = CValue::by_val(value, ret.layout());
ret.write_cvalue(fx, cvalue);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hopefully this is sort of idiomatic. It's weird that cvtt2dq got its own special instruction in cranelift but cvt2dq did not.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess only cvtt2dq was necessary for implementing the wasm simd support.

@bjorn3 bjorn3 merged commit c511676 into rust-lang:master Jun 6, 2024
17 of 18 checks passed
@bjorn3
Copy link
Member

bjorn3 commented Jun 6, 2024

Thanks!

I'm currently trying to completely rework the way vendor intrinsics are implemented. I don't know if it will work out yet, but maybe hold off on implementing other intrinsics for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants