-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
[arm32] (vec1 & (vec2 ^ vec3)) ^ vec3
should transform into vbit
/vbsl
/vbif
#92267
Labels
Comments
@llvm/issue-subscribers-backend-arm Author: Niles Salter (Validark)
```zig
export fn select(vec1: @Vector(8, u8), vec2: @TypeOf(vec1), vec3: @TypeOf(vec1)) @TypeOf(vec1) {
return (vec1 & (vec2 ^ vec3)) ^ vec3;
}
export fn select2(vec1: @Vector(8, u8), vec2: @TypeOf(vec1), vec3: @TypeOf(vec1)) @TypeOf(vec1) {
On arm, we get: select:
vldr d16, [sp]
vmov d17, r2, r3
vmov d18, r0, r1
veor d17, d16, d17
vand d17, d17, d18
veor d16, d17, d16
vmov r0, r1, d16
bx lr
select2:
vmov d18, r0, r1
vldr d16, [sp]
vmov d17, r2, r3
vbit d16, d17, d18
vmov r0, r1, d16
bx lr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On aarch64, these compile the same:
On arm, we get:
https://zig.godbolt.org/z/haTaP4hnK
The text was updated successfully, but these errors were encountered: