[PATCH] D126362: [VP][fix] Don't discard masks in reductions

Simon Moll via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 25 02:42:36 PDT 2022


simoll created this revision.
simoll added reviewers: frasercrmck, rogfer01, craig.topper.
simoll added a project: VP.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
simoll requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

When expanding VP reductions to non VP-code, the reduction pass was ignoring the mask before. Fix this by keeping the mask and selecting neutral elements where the mask is zero.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D126362

Files:
  llvm/lib/CodeGen/ExpandVectorPredication.cpp
  llvm/test/CodeGen/Generic/expand-vp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126362.431920.patch
Type: text/x-patch
Size: 18564 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220525/ee664b8d/attachment.bin>


More information about the llvm-commits mailing list