-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Calls to sin() don't get converted to sinf, leading to inefficient use of vector variants with -fveclib=ArmPL #139044
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
Comments
@llvm/issue-subscribers-backend-aarch64 Author: Will Lovett (willlovett-arm)
https://godbolt.org/z/fE16nGPxP
generates calls to If we replace that code with
I'm reasonably sure it's legitimate to implicitly switch to sinf(), and this would lead to double the vector throughput. |
We do this if the function is a |
This optimization already exists, but for the libcall versions of these functions and not for their intrinsic form. Solves #139044. There are probably more opportunities for other intrinsics, because the switch-case in `LibCallSimplifier::optimizeCall` covers only `pow`, `exp2`, `log`, `log2`, `log10`, `sqrt`, `memset`, `memcpy` and `memmove`.
…wed (#139082) This optimization already exists, but for the libcall versions of these functions and not for their intrinsic form. Solves llvm/llvm-project#139044. There are probably more opportunities for other intrinsics, because the switch-case in `LibCallSimplifier::optimizeCall` covers only `pow`, `exp2`, `log`, `log2`, `log10`, `sqrt`, `memset`, `memcpy` and `memmove`.
Should be fixed by #139082 |
Amazing turnaround! Thanks @guy-david , all 🙏 |
https://godbolt.org/z/fE16nGPxP
generates calls to
armpl_vsinq_f64
instead ofarmpl_vsinq_f32
.If we replace that code with
sinf
it works fine:I'm reasonably sure it's legitimate to implicitly switch to sinf(), and this would lead to double the vector throughput.
The text was updated successfully, but these errors were encountered: