[InstCombine] Use setAllBits in place of getAllOnesValue since we know the bitwidths...
authorCraig Topper <craig.topper@gmail.com>
Tue, 4 Apr 2017 05:03:02 +0000 (05:03 +0000)
committerCraig Topper <craig.topper@gmail.com>
Tue, 4 Apr 2017 05:03:02 +0000 (05:03 +0000)
llvm-svn: 299413

llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp

index b126992..8eca22a 100644 (file)
@@ -235,7 +235,7 @@ Value *InstCombiner::SimplifyDemandedUseBits(Value *V, APInt DemandedMask,
   // operands.  This allows visitTruncInst (for example) to simplify the
   // operand of a trunc without duplicating all the logic below.
   if (Depth == 0 && !V->hasOneUse())
-    DemandedMask = APInt::getAllOnesValue(BitWidth);
+    DemandedMask.setAllBits();
 
   switch (I->getOpcode()) {
   default: