[PATCH] D148120: [InstCombine] Remove scalable get_active_lane_mask calls which are always false

Matt Devereau via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 12 05:52:28 PDT 2023


MattDevereau created this revision.
MattDevereau added reviewers: david-arm, sdesmalen, nikic.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
MattDevereau requested review of this revision.
Herald added subscribers: llvm-commits, alextsao1999.
Herald added a project: LLVM.

The LoopVectorizer pass can emit calls to get_active_lane_mask who's operands
are induction variables which in reality only increment in a single loop
iteration before the get_active_lane_mask call, meaning the intrinsic always
returns an all-false predicate. It is possible to detect this in InstCombine
and eliminate the always false intrinsic which allows optimizations further
down the pipeline to trigger for scalable vectors.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D148120

Files:
  llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
  llvm/test/Transforms/InstCombine/get-active-lane-mask.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148120.512798.patch
Type: text/x-patch
Size: 9259 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230412/334da533/attachment.bin>


More information about the llvm-commits mailing list