[all-commits] [llvm/llvm-project] 68ffed: [IVDescriptors] Fix bug in checkOrderedReduction

annamthomas via All-commits all-commits at lists.llvm.org
Tue Jul 27 06:31:57 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 68ffed12b7e29c498e5b6d563a218f8710c46e61
      https://github.com/llvm/llvm-project/commit/68ffed12b7e29c498e5b6d563a218f8710c46e61
  Author: Anna Thomas <anna at azul.com>
  Date:   2021-07-27 (Tue, 27 Jul 2021)

  Changed paths:
    M llvm/lib/Analysis/IVDescriptors.cpp
    A llvm/test/Transforms/LoopVectorize/fp-reduction-crash.ll

  Log Message:
  -----------
  [IVDescriptors] Fix bug in checkOrderedReduction

The Exit instruction passed in for checking if it's an ordered reduction need not be
an FPAdd operation. We need to bail out at that point instead of
assuming it is an FPAdd (and hence has two operands). See added testcase.
It crashes without the patch because the Exit instruction is a phi with
exactly one operand.
This latent bug was exposed by 95346ba which added support for
multi-exit loops for vectorization.

Reviewed-By: kmclaughlin
Differential Revision: https://reviews.llvm.org/D106843




More information about the All-commits mailing list