[all-commits] [llvm/llvm-project] a31f4b: [CodeGen][SVE] Use whilelo instruction when loweri...
david-arm via All-commits
all-commits at lists.llvm.org
Mon Nov 29 00:30:43 PST 2021
Author: David Sherwood <david.sherwood at arm.com>
Date: 2021-11-29 (Mon, 29 Nov 2021)
[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:
Differential Revision: https://reviews.llvm.org/D114542
More information about the All-commits