[all-commits] [llvm/llvm-project] 1bee54: [LoopVectorize] propagate fast-math-flags from ind...

RotateRight via All-commits all-commits at lists.llvm.org
Thu Mar 4 14:22:02 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1bee549737ace3a96288d8b16768aec5899fbb91
      https://github.com/llvm/llvm-project/commit/1bee549737ace3a96288d8b16768aec5899fbb91
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-03-04 (Thu, 04 Mar 2021)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    M llvm/test/Transforms/LoopVectorize/float-induction.ll

  Log Message:
  -----------
  [LoopVectorize] propagate fast-math-flags from induction instructions

This code assumed that FP math was only permissable if it was
fully "fast", so it hard-coded "fast" when creating new instructions.

The underlying code already allows matching recurrences/reductions
that are only "reassoc", so this change should prevent the potential
miscompile seen in the test diffs (we created "fast" ops even though
none existed in the original code).

I don't know if we need to create the temporary IRBuilder objects
used here, so that could be follow-up clean-up.

There's an open question about whether we should require "nsz" in
addition to "reassoc" here. InstCombine uses that combo for its
reassociative folds, but I think codegen is not as strict.




More information about the All-commits mailing list