[PATCH] D147266: [AArch64] Add IR intrinsics for vbsl* C intrinsics

Pranav Kant via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 30 13:46:22 PDT 2023


pranavk created this revision.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
pranavk requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.

VBSL intrinsics can be found here: https://developer.arm.com/architectures/instruction-sets/intrinsics/#q=vbsl

They directly lower to BSL instruction on AArch64. This patch makes clang lower any of these C intrinsics to this newly introduced LLVM IR intrinsic which is directly mapped to BSL instruction in the backend.

This will also solve performance bugs like this: https://github.com/llvm/llvm-project/issues/49305


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D147266

Files:
  clang/lib/CodeGen/CGBuiltin.cpp
  clang/test/CodeGen/aarch64-neon-intrinsics.c
  clang/test/CodeGen/aarch64-poly64.c
  clang/test/CodeGen/aarch64-v8.2a-neon-intrinsics.c
  llvm/include/llvm/IR/IntrinsicsAArch64.td
  llvm/lib/Target/AArch64/AArch64InstrInfo.td
  llvm/test/CodeGen/AArch64/aarch64-vbsl.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147266.509512.patch
Type: text/x-patch
Size: 32544 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230330/153e7c91/attachment.bin>


More information about the llvm-commits mailing list