]> granicus.if.org Git - llvm/commit
[LoopUtils][SLPVectorizer] clean up management of fast-math-flags
authorSanjay Patel <spatel@rotateright.com>
Wed, 5 Jun 2019 14:58:04 +0000 (14:58 +0000)
committerSanjay Patel <spatel@rotateright.com>
Wed, 5 Jun 2019 14:58:04 +0000 (14:58 +0000)
commit07f47d17fb7c6219983bcb8470f33bb673f4d0df
treedd2153f825dd4eba3bd3ef4da54e882c65f66102
parent6a266ee2b51c623600a5d194dc29aadff7dfc88f
[LoopUtils][SLPVectorizer] clean up management of fast-math-flags

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.

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 (should be able to reduce with IR-level FMF)

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362612 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Utils/LoopUtils.h
lib/CodeGen/ExpandReductions.cpp
lib/Transforms/Utils/LoopUtils.cpp
lib/Transforms/Vectorize/SLPVectorizer.cpp