Fast-math optimization: fold multiply by zero
authorMichael Ilseman <milseman@apple.com>
Tue, 27 Nov 2012 00:46:26 +0000 (00:46 +0000)
committerMichael Ilseman <milseman@apple.com>
Tue, 27 Nov 2012 00:46:26 +0000 (00:46 +0000)
commiteb61c920f12cacee38815bf10821d2f294b66f3a
tree2e983dec27c11ee07708c46fa7f23af9285f19bb
parenta52f3ae45ce28198bb402ddea8db5a8cb8d8ced7
Fast-math optimization: fold multiply by zero

Added in first optimization using fast-math flags to serve as an example for following optimizations. SimplifyInstruction will now try to optimize an fmul observing its FastMathFlags to see if it can fold multiply by zero when 'nnan' and 'nsz' flags are set.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168648 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/InstructionSimplify.h
lib/Analysis/InstructionSimplify.cpp