[all-commits] [llvm/llvm-project] 652fae: [CodeGen] Improve SelectionDAGBuilder lowering cod...

david-arm via All-commits all-commits at lists.llvm.org
Fri Dec 10 05:39:52 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 652faed3539eefad773bccd635fd01a037e0a4ce
      https://github.com/llvm/llvm-project/commit/652faed3539eefad773bccd635fd01a037e0a4ce
  Author: David Sherwood <david.sherwood at arm.com>
  Date:   2021-12-10 (Fri, 10 Dec 2021)

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

  Log Message:
  -----------
  [CodeGen] Improve SelectionDAGBuilder lowering code for get.active.lane.mask intrinsic

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.

Differential Revision: https://reviews.llvm.org/D115354




More information about the All-commits mailing list