mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-14 23:48:56 +00:00
[x86] use getSignBit() for clarity; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294333 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d1bd111c03
commit
6271cac448
@ -29477,8 +29477,8 @@ static SDValue combineSelect(SDNode *N, SelectionDAG &DAG,
|
||||
|
||||
// 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, SelectionDAG &DAG,
|
||||
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());
|
||||
|
Loading…
Reference in New Issue
Block a user