1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00

Fixed logic to enable complex FMA formation.

llvm-svn: 235508
This commit is contained in:
Olivier Sallenave 2015-04-22 14:07:26 +00:00
parent 324b320beb
commit ae0f515c24

View File

@ -7164,7 +7164,7 @@ SDValue DAGCombiner::visitFADDForFMACombine(SDNode *N) {
N0));
}
if (LookThroughFPExt) {
if (UnsafeFPMath && LookThroughFPExt) {
// fold (fadd (fma x, y, (fpext (fmul u, v))), z)
// -> (fma x, y, (fma (fpext u), (fpext v), z))
auto FoldFAddFMAFPExtFMul = [&] (
@ -7415,7 +7415,7 @@ SDValue DAGCombiner::visitFSUBForFMACombine(SDNode *N) {
N21, N0));
}
if (LookThroughFPExt) {
if (UnsafeFPMath && LookThroughFPExt) {
// fold (fsub (fma x, y, (fpext (fmul u, v))), z)
// -> (fma x, y (fma (fpext u), (fpext v), (fneg z)))
if (N0.getOpcode() == PreferredFusedOpcode) {