[LoopUtils,LV] Propagate fast-math flags on generated FCmp instructions
authorJames Molloy <james.molloy@arm.com>
Mon, 21 Sep 2015 19:41:19 +0000 (19:41 +0000)
committerJames Molloy <james.molloy@arm.com>
Mon, 21 Sep 2015 19:41:19 +0000 (19:41 +0000)
commitf30ebaced7a284209032f59be6c15b533c4c8c67
tree7a0127a3abde292b722d27d264d45a598aea2ad2
parentff278be8cfd136b7e3d6128b7dc70114db2fa888
[LoopUtils,LV] Propagate fast-math flags on generated FCmp instructions

We're currently losing any fast-math flags when synthesizing fcmps for
min/max reductions. In LV, make sure we copy over the scalar inst's
flags. In LoopUtils, we know we only ever match patterns with
hasUnsafeAlgebra, so apply that to any synthesized ops.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248201 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/LoopUtils.cpp
lib/Transforms/Vectorize/LoopVectorize.cpp
test/Transforms/LoopVectorize/minmax_reduction.ll