diff options
author | David Sherwood <david.sherwood@arm.com> | 2021-11-23 14:36:08 +0000 |
---|---|---|
committer | David Sherwood <david.sherwood@arm.com> | 2021-11-29 08:08:17 +0000 |
commit | a31f4bdfe8211ecb38741c4fd570baf0d6e16f76 (patch) | |
tree | 3a2bb9f223dc08a66fd2962d71304e55168711a6 /llvm/lib/Transforms/Utils/Local.cpp | |
parent | 9d1938fd1441935313ac0e44e39069bee8171a86 (diff) | |
download | llvm-a31f4bdfe8211ecb38741c4fd570baf0d6e16f76.zip llvm-a31f4bdfe8211ecb38741c4fd570baf0d6e16f76.tar.gz llvm-a31f4bdfe8211ecb38741c4fd570baf0d6e16f76.tar.bz2 |
[CodeGen][SVE] Use whilelo instruction when lowering @llvm.get.active.lane.mask
In most common cases the @llvm.get.active.lane.mask intrinsic maps directly
to the SVE whilelo instruction, which already takes overflow into account.
However, currently in SelectionDAGBuilder::visitIntrinsicCall we always lower
this immediately to a generic sequence of instructions that explicitly
take overflow into account. This makes it very difficult to then later
transform back into a single whilelo instruction. Therefore, this patch
introduces a new TLI function called shouldExpandGetActiveLaneMask that asks if
we should lower/expand this to a sequence of generic ISD nodes, or instead
just leave it as an intrinsic for the target to lower.
You can see the significant improvement in code quality for some of the
tests in this file:
CodeGen/AArch64/active_lane_mask.ll
Differential Revision: https://reviews.llvm.org/D114542
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
0 files changed, 0 insertions, 0 deletions