[APInt] Replace calls to setBits with more specific calls to setBitsFrom and setLowBi...
authorCraig Topper <craig.topper@gmail.com>
Sun, 30 Apr 2017 07:44:58 +0000 (07:44 +0000)
committerCraig Topper <craig.topper@gmail.com>
Sun, 30 Apr 2017 07:44:58 +0000 (07:44 +0000)
llvm-svn: 301768

llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/lib/Target/X86/X86ISelLowering.cpp

index 71d8109fb5a16559b87742cd55b91cc78225dfdf..46419a3c3c308959ac2185b580f5db036e110762 100644 (file)
@@ -2516,7 +2516,7 @@ void SelectionDAG::computeKnownBits(SDValue Op, KnownBits &Known,
     computeKnownBits(Op.getOperand(1), Known2, DemandedElts, Depth + 1);
     KnownZeroLow = std::min(KnownZeroLow,
                             Known2.Zero.countTrailingOnes());
-    Known.Zero.setBits(0, KnownZeroLow);
+    Known.Zero.setLowBits(KnownZeroLow);
     break;
   }
   case ISD::UADDO:
index d767a7a7d2c7e7ae3ecf4d4de826450274227efa..523462b98854ee7e350d83159b0cd3883505758c 100644 (file)
@@ -26701,11 +26701,11 @@ void X86TargetLowering::computeKnownBitsForTargetNode(const SDValue Op,
       break;
     LLVM_FALLTHROUGH;
   case X86ISD::SETCC:
-    Known.Zero.setBits(1, BitWidth);
+    Known.Zero.setBitsFrom(1);
     break;
   case X86ISD::MOVMSK: {
     unsigned NumLoBits = Op.getOperand(0).getValueType().getVectorNumElements();
-    Known.Zero.setBits(NumLoBits, BitWidth);
+    Known.Zero.setBitsFrom(NumLoBits);
     break;
   }
   case X86ISD::VSHLI:
@@ -26746,7 +26746,7 @@ void X86TargetLowering::computeKnownBitsForTargetNode(const SDValue Op,
     DAG.computeKnownBits(N0, Known, DemandedSrcElts, Depth + 1);
     Known.One = Known.One.zext(BitWidth);
     Known.Zero = Known.Zero.zext(BitWidth);
-    Known.Zero.setBits(InBitWidth, BitWidth);
+    Known.Zero.setBitsFrom(InBitWidth);
     break;
   }
   }