1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

Do not try to detect DAG combine patterns for integer multiply-add/sub if value

type is not i32. MIPS does not have 64-bit integer multiply-add/sub
instructions.

llvm-svn: 144373
This commit is contained in:
Akira Hatanaka 2011-11-11 04:18:21 +00:00
parent 3b1457c21d
commit 4ff64c3ed4

View File

@ -395,7 +395,8 @@ static SDValue PerformADDECombine(SDNode *N, SelectionDAG& DAG,
if (DCI.isBeforeLegalize())
return SDValue();
if (Subtarget->hasMips32() && SelectMadd(N, &DAG))
if (Subtarget->hasMips32() && N->getValueType(0) == MVT::i32 &&
SelectMadd(N, &DAG))
return SDValue(N, 0);
return SDValue();
@ -407,7 +408,8 @@ static SDValue PerformSUBECombine(SDNode *N, SelectionDAG& DAG,
if (DCI.isBeforeLegalize())
return SDValue();
if (Subtarget->hasMips32() && SelectMsub(N, &DAG))
if (Subtarget->hasMips32() && N->getValueType(0) == MVT::i32 &&
SelectMsub(N, &DAG))
return SDValue(N, 0);
return SDValue();