[PATCH] D121792: [AArch64][SVE] InstCombine llvm.aarch64.sve.sel to select

Peter Waller via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 17 02:13:29 PDT 2022


peterwaller-arm added a comment.

In D121792#3388585 <https://reviews.llvm.org/D121792#3388585>, @dmgreen wrote:

> Why do we have llvm.aarch64.sve.sel if we are always going to replace it with a select? Why not remove llvm.aarch64.sve.sel entirely?

I'm not the key decisionmaker here, but hopefully I can summarize the position and others can chime in if I'm mistaken or misdirecting.

1. You're right, and we've been discussing the possibility removing these intrinsics where they're unnecessary.
2. The intrinsics exist largely to support the ACLE.
3. There are a significant number of them, at the moment there is a straightforward correspondence between the C level and IR level.
4. Because of the correspondence, there is currently very little code/complexity per-intrinsic required in clang to support the ACLE.
5. Therefore, removing these intrinsics requires increasing the complexity of the frontend.
6. Some intrinsics will always be required.

Given these considerations, our current thinking is to have a future effort to see if removing intrinsics like this and lowering directly to clean IR is a net win in total. And to commit to doing this with a holistic view of the situation rather than doing it bit-by-bit and making a mess.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121792/new/

https://reviews.llvm.org/D121792



More information about the cfe-commits mailing list