From: Akira Hatanaka Date: Fri, 11 Nov 2011 04:18:21 +0000 (+0000) Subject: Do not try to detect DAG combine patterns for integer multiply-add/sub if value X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e184fec550ea249d00e058cfba34ec6913951895;p=oota-llvm.git 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144373 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/Mips/MipsISelLowering.cpp b/lib/Target/Mips/MipsISelLowering.cpp index d916edd73ae..2b0e90b894e 100644 --- a/lib/Target/Mips/MipsISelLowering.cpp +++ b/lib/Target/Mips/MipsISelLowering.cpp @@ -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();