[PATCH] D114542: [CodeGen][SVE] Use whilelo instruction when lowering @llvm.get.active.lane.mask
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 24 08:42:53 PST 2021
david-arm created this revision.
david-arm added reviewers: sdesmalen, SjoerdMeijer, c-rhodes, kmclaughlin, efriedma.
Herald added subscribers: ctetreau, psnobl, hiraditya, kristof.beyls, tschuett.
david-arm requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
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 lowerGetActiveLaneMask 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
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D114542
Files:
llvm/include/llvm/CodeGen/TargetLowering.h
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.h
llvm/test/CodeGen/AArch64/active_lane_mask.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114542.389512.patch
Type: text/x-patch
Size: 15796 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211124/6e90ee83/attachment.bin>
More information about the llvm-commits
mailing list