[llvm] r299413 - [InstCombine] Use setAllBits in place of getAllOnesValue since we know the bitwidths are the same. NFCI
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 3 22:03:03 PDT 2017
Author: ctopper
Date: Tue Apr 4 00:03:02 2017
New Revision: 299413
URL: http://llvm.org/viewvc/llvm-project?rev=299413&view=rev
Log:
[InstCombine] Use setAllBits in place of getAllOnesValue since we know the bitwidths are the same. NFCI
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp?rev=299413&r1=299412&r2=299413&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp Tue Apr 4 00:03:02 2017
@@ -235,7 +235,7 @@ Value *InstCombiner::SimplifyDemandedUse
// 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:
More information about the llvm-commits
mailing list