Add check for completeness. Note that this doesn't actually have any
authorEli Friedman <eli.friedman@gmail.com>
Sun, 23 Aug 2009 00:14:19 +0000 (00:14 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Sun, 23 Aug 2009 00:14:19 +0000 (00:14 +0000)
effect with the way the current code is structured.

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

lib/CodeGen/SelectionDAG/DAGCombiner.cpp

index 4138e98f18e7d61abd471835c9cd74d740b2970d..301c7b35c3d8d567c7265c333040e00e8716e117 100644 (file)
@@ -3460,7 +3460,7 @@ SDValue DAGCombiner::ReduceLoadWidth(SDNode *N) {
 
   unsigned EVTBits = ExtVT.getSizeInBits();
   unsigned ShAmt = 0;
-  if (N0.getOpcode() == ISD::SRL && N0.hasOneUse()) {
+  if (N0.getOpcode() == ISD::SRL && N0.hasOneUse() && ExtVT.isRound()) {
     if (ConstantSDNode *N01 = dyn_cast<ConstantSDNode>(N0.getOperand(1))) {
       ShAmt = N01->getZExtValue();
       // Is the shift amount a multiple of size of VT?