[InstCombine] Make sure we preserve fast math flags when folding fp instructions...
authorCraig Topper <craig.topper@gmail.com>
Mon, 10 Apr 2017 07:00:10 +0000 (07:00 +0000)
committerCraig Topper <craig.topper@gmail.com>
Mon, 10 Apr 2017 07:00:10 +0000 (07:00 +0000)
commit838d13e7ee6168ec31822b8278949cfe6266ac1e
tree69d4e9ce5ba2c2dceb96bb1a918c2f0aeb0bc45f
parentd8840d7b101d6958e1746183b8e7d09e16e07c55
[InstCombine] Make sure we preserve fast math flags when folding fp instructions into phi nodes

Summary: I noticed in the select folding code that we copied fast math flags, but did not do the same for the similar handling in phi nodes. This patch fixes that to do the same thing as select

Reviewers: spatel, davide, majnemer, hfinkel

Reviewed By: davide

Subscribers: llvm-commits

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

llvm-svn: 299838
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
llvm/test/Transforms/InstCombine/fast-math.ll