[all-commits] [llvm/llvm-project] 9cc217: [LoopVectorize] Prevent multiple Phis being genera...

kmclaughlin-arm via All-commits all-commits at lists.llvm.org
Wed Apr 28 03:29:57 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9cc217ab36eb003dee8ace8359e6f535ac059cfd
      https://github.com/llvm/llvm-project/commit/9cc217ab36eb003dee8ace8359e6f535ac059cfd
  Author: Kerry McLaughlin <kerry.mclaughlin at arm.com>
  Date:   2021-04-28 (Wed, 28 Apr 2021)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    M llvm/test/Transforms/LoopVectorize/AArch64/scalable-strict-fadd.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/strict-fadd.ll

  Log Message:
  -----------
  [LoopVectorize] Prevent multiple Phis being generated with in-order reductions

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

Reviewed By: david-arm

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




More information about the All-commits mailing list