[llvm] r301768 - [APInt] Replace calls to setBits with more specific calls to setBitsFrom and setLowBits where possible.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 30 00:44:59 PDT 2017
Author: ctopper
Date: Sun Apr 30 02:44:58 2017
New Revision: 301768
URL: http://llvm.org/viewvc/llvm-project?rev=301768&view=rev
Log:
[APInt] Replace calls to setBits with more specific calls to setBitsFrom and setLowBits where possible.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=301768&r1=301767&r2=301768&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Sun Apr 30 02:44:58 2017
@@ -2516,7 +2516,7 @@ void SelectionDAG::computeKnownBits(SDVa
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:
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=301768&r1=301767&r2=301768&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Sun Apr 30 02:44:58 2017
@@ -26701,11 +26701,11 @@ void X86TargetLowering::computeKnownBits
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::computeKnownBits
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;
}
}
More information about the llvm-commits
mailing list