[ARM][AArch64] Introduce qrdmlah and qrdmlsh intrinsics
authorDavid Green <david.green@arm.com>
Thu, 27 Jan 2022 19:19:46 +0000 (19:19 +0000)
committerDavid Green <david.green@arm.com>
Thu, 27 Jan 2022 19:19:46 +0000 (19:19 +0000)
commit82973edfb72a95b442fa6d2bb404e15a4031855e
treef1de6c22079f628efce089ef675e76c978afe05e
parentb75bdff4a0e91af1237ba77adce2f9fc7198ec26
[ARM][AArch64] Introduce qrdmlah and qrdmlsh intrinsics

Since it's introduction, the qrdmlah has been represented as a qrdmulh
and a sadd_sat. This doesn't produce the same result for all input
values though. This patch fixes that by introducing a qrdmlah (and
qrdmlsh) intrinsic specifically for the vqrdmlah and sqrdmlah
instructions. The old test cases will now produce a qrdmulh and sqadd,
as expected.

Fixes #53120 and #50905 and #51761.

Differential Revision: https://reviews.llvm.org/D117592
clang/include/clang/Basic/arm_neon.td
clang/lib/CodeGen/CGBuiltin.cpp
clang/test/CodeGen/aarch64-v8.1a-neon-intrinsics.c
clang/test/CodeGen/arm-v8.1a-neon-intrinsics.c
llvm/include/llvm/IR/IntrinsicsAArch64.td
llvm/include/llvm/IR/IntrinsicsARM.td
llvm/lib/Target/AArch64/AArch64InstrFormats.td
llvm/lib/Target/AArch64/AArch64InstrInfo.td
llvm/lib/Target/ARM/ARMInstrNEON.td
llvm/test/CodeGen/AArch64/arm64-neon-v8.1a.ll
llvm/test/CodeGen/ARM/neon-v8.1a.ll