[all-commits] [llvm/llvm-project] 14eecc: [LoopVectorize] Don't use strict reductions when r...

kmclaughlin-arm via All-commits all-commits at lists.llvm.org
Tue Jun 8 02:40:31 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 14eeccfe9adb372c76d11d6ffa98fdb6e9808acc
      https://github.com/llvm/llvm-project/commit/14eeccfe9adb372c76d11d6ffa98fdb6e9808acc
  Author: Kerry McLaughlin <kerry.mclaughlin at arm.com>
  Date:   2021-06-08 (Tue, 08 Jun 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] Don't use strict reductions when reordering is allowed

If the `-enable-strict-reductions` flag is set to true, then currently we will
always choose to vectorize the loop with strict in-order reductions. This is
not necessary where we allow the reordering of FP operations, such as
when loop hints are passed via metadata.

This patch moves useOrderedReductions so that we can also check whether
loop hints allow reordering, in which case we should use the default
behaviour of vectorizing with unordered reductions.

Reviewed By: sdesmalen

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




More information about the All-commits mailing list