mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-04 11:17:31 +00:00
DAGCombine: always constant fold FMA when target disable FP exceptions
Summary: When trying to constant fold an FMA in the DAG, getNode() fails to fold the FMA if an operand is not finite. In this case this patch allows the constant folding if !TLI->hasFloatingPointExceptions() Reviewers: resistor Reviewed By: resistor Subscribers: hfinkel, llvm-commits Differential Revision: http://reviews.llvm.org/D6912 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 226901
This commit is contained in:
parent
25dc17847a
commit
8d442c114d
@ -3620,7 +3620,7 @@ SDValue SelectionDAG::getNode(unsigned Opcode, SDLoc DL, EVT VT,
|
||||
const APFloat &V3 = N3CFP->getValueAPF();
|
||||
APFloat::opStatus s =
|
||||
V1.fusedMultiplyAdd(V2, V3, APFloat::rmNearestTiesToEven);
|
||||
if (s != APFloat::opInvalidOp)
|
||||
if (!TLI->hasFloatingPointExceptions() || s != APFloat::opInvalidOp)
|
||||
return getConstantFP(V1, VT);
|
||||
}
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user