[llvm] r294333 - [x86] use getSignBit() for clarity; NFCI
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 7 11:01:35 PST 2017
Author: spatel
Date: Tue Feb 7 13:01:35 2017
New Revision: 294333
URL: http://llvm.org/viewvc/llvm-project?rev=294333&view=rev
Log:
[x86] use getSignBit() for clarity; NFCI
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=294333&r1=294332&r2=294333&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Feb 7 13:01:35 2017
@@ -29477,8 +29477,8 @@ static SDValue combineSelect(SDNode *N,
// If this is a *dynamic* select (non-constant condition) and we can match
// this node with one of the variable blend instructions, restructure the
- // condition so that the blends can use the high bit of each element and use
- // SimplifyDemandedBits to simplify the condition operand.
+ // condition so that blends can use the high (sign) bit of each element and
+ // use SimplifyDemandedBits to simplify the condition operand.
if (N->getOpcode() == ISD::VSELECT && DCI.isBeforeLegalizeOps() &&
!DCI.isBeforeLegalize() &&
!ISD::isBuildVectorOfConstantSDNodes(Cond.getNode())) {
@@ -29513,8 +29513,7 @@ static SDValue combineSelect(SDNode *N,
return SDValue();
assert(BitWidth >= 8 && BitWidth <= 64 && "Invalid mask size");
- APInt DemandedMask = APInt::getHighBitsSet(BitWidth, 1);
-
+ APInt DemandedMask(APInt::getSignBit(BitWidth));
APInt KnownZero, KnownOne;
TargetLowering::TargetLoweringOpt TLO(DAG, DCI.isBeforeLegalize(),
DCI.isBeforeLegalizeOps());
More information about the llvm-commits
mailing list