Skip to content
  • Kerry McLaughlin's avatar
    [LoopVectorize] Fix strict reductions where VF = 1 · f9967256
    Kerry McLaughlin authored
    Currently we will allow loops with a fixed width VF of 1 to vectorize
    if the -enable-strict-reductions flag is set. However, the loop vectorizer
    will not use ordered reductions if `VF.isScalar()` and the resulting
    vectorized loop will be out of order.
    
    This patch removes `VF.isVector()` when checking if ordered reductions
    should be used. Also, instead of converting the FAdds to reductions if the
    VF = 1, operands of the FAdds are changed such that the order is preserved.
    
    Reviewed By: david-arm
    
    Differential Revision: https://reviews.llvm.org/D104533
    f9967256