aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorDavid Green <david.green@arm.com>2020-06-30 18:40:04 +0100
committerDavid Green <david.green@arm.com>2020-06-30 19:56:37 +0100
commit9e49d1d9b8702a568baf82e2549e246197ecc334 (patch)
tree4c44dd1847c87dc96caa56131d0cd1426bf76a3e /clang/lib/Frontend/CompilerInvocation.cpp
parent99f213e07c044fec0d527d177b40e05c014ac49d (diff)
downloadllvm-9e49d1d9b8702a568baf82e2549e246197ecc334.zip
llvm-9e49d1d9b8702a568baf82e2549e246197ecc334.tar.gz
llvm-9e49d1d9b8702a568baf82e2549e246197ecc334.tar.bz2
[InstCombine] fma x, y, 0 -> fmul x, y
If the addend of the fma is zero, common sense would suggest that we can convert fma x, y, 0.0 to fmul x, y. This comes up with some user code that was expecting the first fma in an unrolled loop to simplify to a fmul. Floating point often does not follow naive common sense though. Alive suggests that this should be guarded by nsz (as fadd -0.0, 0.0 = 0.0). fma x, y, -0.0 is always valid. Differential Revision: https://reviews.llvm.org/D82778
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions