[all-commits] [llvm/llvm-project] bbed5f: [LoopVectorize] improve IR fast-math-flags propaga...

RotateRight via All-commits all-commits at lists.llvm.org
Mon Feb 1 13:21:58 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bbed5f2f8a04ae3a49f5e8f900c117f405101424
      https://github.com/llvm/llvm-project/commit/bbed5f2f8a04ae3a49f5e8f900c117f405101424
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-02-01 (Mon, 01 Feb 2021)

  Changed paths:
    M llvm/include/llvm/IR/Operator.h
    M llvm/include/llvm/Transforms/Utils/LoopUtils.h
    M llvm/lib/Analysis/IVDescriptors.cpp
    M llvm/lib/Transforms/Utils/LoopUtils.cpp
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    M llvm/test/Transforms/LoopVectorize/X86/reduction-fastmath.ll
    M llvm/test/Transforms/LoopVectorize/float-minmax-instruction-flag.ll

  Log Message:
  -----------
  [LoopVectorize] improve IR fast-math-flags propagation in reductions

This is another step (see D95452) towards correcting fast-math-flags
bugs in vector reductions.

There are multiple bugs visible in the test diffs, and this is still
not working as it should. We still use function attributes (rather
than FMF) to drive part of the logic, but we are not checking for
the correct FP function attributes.

Note that FMF may not be propagated optimally on selects (example
in https://llvm.org/PR35607 ). That's why I'm proposing to union the
FMF of a fcmp+select pair and avoid regressions on existing vectorizer
tests.

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




More information about the All-commits mailing list