[PATCH] D62272: [LoopUtils][SLPVectorizer] clean up management of fast-math-flags

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 22 15:57:50 PDT 2019


spatel created this revision.
spatel added reviewers: ABataev, hfinkel, RKSimon.
Herald added subscribers: hiraditya, mcrosier.
Herald added a project: LLVM.

Instead of passing around fast-math-flags as a parameter, we can set those using an IRBuilder guard object. This is no-functional-change-intended, but hopefully someone more familiar with this code can try to confirm that.

The motivation is to eventually fix the vectorizers to use and set the correct fast-math-flags for reductions. Examples of that not behaving as expected are:
https://bugs.llvm.org/show_bug.cgi?id=23116 (should be able to reduce with less than 'fast')
https://bugs.llvm.org/show_bug.cgi?id=35538 (possible miscompile for -0.0)
D61802 <https://reviews.llvm.org/D61802> (should be able to reduce with IR-level FMF)


https://reviews.llvm.org/D62272

Files:
  llvm/include/llvm/Transforms/Utils/LoopUtils.h
  llvm/lib/CodeGen/ExpandReductions.cpp
  llvm/lib/Transforms/Utils/LoopUtils.cpp
  llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62272.200831.patch
Type: text/x-patch
Size: 9581 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190522/8993a62d/attachment.bin>


More information about the llvm-commits mailing list