[PATCH] D115354: [CodeGen] Improve SelectionDAGBuilder lowering code for get.active.lane.mask intrinsic

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 8 08:26:09 PST 2021


david-arm created this revision.
david-arm added reviewers: sdesmalen, SjoerdMeijer, peterwaller-arm, kmclaughlin, efriedma.
Herald added subscribers: dmgreen, hiraditya, kristof.beyls.
david-arm requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Previously we were using UADDO to generate a two-result value with
the unsigned addition and the overflow mask. We then combined the
overflow mask with the trip count comparison to get a result.
However, we don't need to do this - we can simply use a UADDSAT
saturating add node to add the vector index splat and the stepvector
together. Then we can just compare this to a splat of the trip count.
This results in overall better code quality for both Thumb2 and AArch64.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D115354

Files:
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/test/CodeGen/AArch64/active_lane_mask.ll
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/constbound.ll
  llvm/test/CodeGen/Thumb2/active_lane_mask.ll
  llvm/test/CodeGen/Thumb2/mve-blockplacement.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115354.392790.patch
Type: text/x-patch
Size: 47764 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211208/bfbb7605/attachment.bin>


More information about the llvm-commits mailing list