[mips] Compare splat value with element size instead of calling isUIntN.
authorAkira Hatanaka <ahatanaka@mips.com>
Tue, 23 Apr 2013 18:09:42 +0000 (18:09 +0000)
committerAkira Hatanaka <ahatanaka@mips.com>
Tue, 23 Apr 2013 18:09:42 +0000 (18:09 +0000)
No intended changes in functionality.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180130 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Mips/MipsSEISelLowering.cpp

index 7ba3123711555e2c465a79f4bcd06287be067f1e..7e103bbef74661cbd678cd639a38af8a2e5200d7 100644 (file)
@@ -330,9 +330,9 @@ static SDValue performDSPShiftCombine(unsigned Opc, SDNode *N, EVT Ty,
 
   if (!BV ||
       !BV->isConstantSplat(SplatValue, SplatUndef, SplatBitSize, HasAnyUndefs,
-                           EltSize,!Subtarget->isLittle()) ||
+                           EltSize, !Subtarget->isLittle()) ||
       (SplatBitSize != EltSize) ||
-      !isUIntN(Log2_32(EltSize), SplatValue.getZExtValue()))
+      (SplatValue.getZExtValue() >= EltSize))
     return SDValue();
 
   return DAG.getNode(Opc, N->getDebugLoc(), Ty, N->getOperand(0),