mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
[SelectionDAG] Add VT consistency checks to the creation of ISD::FMA.
This is similar to what is done for binops. I don't know if this would have helped us catch the bug fixed in r336566 earlier or not, but I figured it couldn't hurt. llvm-svn: 336576
This commit is contained in:
parent
6df9a21e1d
commit
22ea0712b3
@ -4856,6 +4856,9 @@ SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, EVT VT,
|
||||
// Perform various simplifications.
|
||||
switch (Opcode) {
|
||||
case ISD::FMA: {
|
||||
assert(VT.isFloatingPoint() && "This operator only applies to FP types!");
|
||||
assert(N1.getValueType() == VT && N2.getValueType() == VT &&
|
||||
N3.getValueType() == VT && "FMA types must match!");
|
||||
ConstantFPSDNode *N1CFP = dyn_cast<ConstantFPSDNode>(N1);
|
||||
ConstantFPSDNode *N2CFP = dyn_cast<ConstantFPSDNode>(N2);
|
||||
ConstantFPSDNode *N3CFP = dyn_cast<ConstantFPSDNode>(N3);
|
||||
|
Loading…
x
Reference in New Issue
Block a user