[PATCH] D100570: [LoopVectorize] Prevent multiple Phis being generated with in-order reductions

Kerry McLaughlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 15 08:37:03 PDT 2021


kmclaughlin created this revision.
kmclaughlin added reviewers: sdesmalen, fhahn, dmgreen, david-arm, spatel.
Herald added a subscriber: hiraditya.
kmclaughlin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

When using the -enable-strict-reductions flag where UF>1 we generate multiple
Phi nodes, though only one of these is used as an input to the vector.reduce.fadd
intrinsics. The unused Phi nodes are removed later by instcombine.

This patch changes widenPHIInstruction/fixReduction to only generate
one Phi, and adds an additional test for unrolling to strict-fadd.ll


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D100570

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/test/Transforms/LoopVectorize/AArch64/strict-fadd.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100570.337779.patch
Type: text/x-patch
Size: 5422 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210415/9505c9c3/attachment.bin>


More information about the llvm-commits mailing list