Skip to content

Add vqdmul* neon instructions #1130

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

Merged
merged 3 commits into from
Apr 21, 2021
Merged

Add vqdmul* neon instructions #1130

merged 3 commits into from
Apr 21, 2021

Conversation

SparrowLii
Copy link
Member

@SparrowLii SparrowLii commented Apr 20, 2021

This PR does the following:

  1. Add vqdmull, vqdmlal, vqdmlsl, vqdmulh neon instructions.
  2. Correct the links of vqadd and vqsub to be consistent with Clang.

@rust-highfive
Copy link

r? @Amanieu

(rust-highfive has picked a reviewer for you, use r? to override)

@SparrowLii
Copy link
Member Author

SparrowLii commented Apr 20, 2021

There seems to be bugs in the llvm.aarch64.neon.*.i32 (.i64) link types, so I currently canceled the adding of the instructions using primitive parameters

@Amanieu
Copy link
Member

Amanieu commented Apr 20, 2021

What is the bug? Does the same issue happen in Clang?

@SparrowLii
Copy link
Member Author

SparrowLii commented Apr 21, 2021

Look this CI fail in #1127 , llvm.aarch64.neon.srshl.i64 (the implement of vrshld_s64 in Clang) went to error LLVM ERROR: Cannot select: 0x7f88213835b0: i64 = AArch64ISD::VSHL Constant:i64<1>, Constant:i32<2> under the target aarch64-linux-android. But it did not fail on other aarch64 targets. I don't know the reason for it.

@SparrowLii
Copy link
Member Author

So I now avoid using primitive type suffixes in linking (for example, using .v1i64 instead of .i64), but this will cause the compiler to not be able to optimize it into the instructions we want.

@Amanieu
Copy link
Member

Amanieu commented Apr 21, 2021

I can reproduce the crash in Clang (godbolt), I will open a bug on LLVM.

@Amanieu
Copy link
Member

Amanieu commented Apr 21, 2021

@Amanieu Amanieu merged commit d385078 into rust-lang:master Apr 21, 2021
@Amanieu
Copy link
Member

Amanieu commented Apr 21, 2021

We can add back the missing intrinsics once the LLVM bug is fixed.

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.

3 participants