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)
commitbe9137a5c5eba6fde096232e6fe908ab0da2579e
treec3fdd81855bbcf35f9d3c7e4f10410c5a80ccda5
parentc537743984d0f90ddd89f2fa9ebcb51dd55b73cf
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.

llvm-svn: 168648
llvm/include/llvm/Analysis/InstructionSimplify.h
llvm/lib/Analysis/InstructionSimplify.cpp