Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Commit de8551c

Browse files
committed
[x86] simplify code for SDValue.getOperand(); NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351557 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 1498f1d commit de8551c

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

lib/Target/X86/X86ISelLowering.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32966,7 +32966,7 @@ static SDValue combineBitcastvxi1(SelectionDAG &DAG, SDValue BitCast,
3296632966
const X86Subtarget &Subtarget) {
3296732967
EVT VT = BitCast.getValueType();
3296832968
SDValue N0 = BitCast.getOperand(0);
32969-
EVT VecVT = N0->getValueType(0);
32969+
EVT VecVT = N0.getValueType();
3297032970

3297132971
if (!VT.isScalarInteger() || !VecVT.isSimple())
3297232972
return SDValue();
@@ -33006,8 +33006,8 @@ static SDValue combineBitcastvxi1(SelectionDAG &DAG, SDValue BitCast,
3300633006
SExtVT = MVT::v4i32;
3300733007
// For cases such as (i4 bitcast (v4i1 setcc v4i64 v1, v2))
3300833008
// sign-extend to a 256-bit operation to avoid truncation.
33009-
if (N0->getOpcode() == ISD::SETCC && Subtarget.hasAVX() &&
33010-
N0->getOperand(0).getValueType().is256BitVector()) {
33009+
if (N0.getOpcode() == ISD::SETCC && Subtarget.hasAVX() &&
33010+
N0.getOperand(0).getValueType().is256BitVector()) {
3301133011
SExtVT = MVT::v4i64;
3301233012
}
3301333013
break;
@@ -33018,9 +33018,9 @@ static SDValue combineBitcastvxi1(SelectionDAG &DAG, SDValue BitCast,
3301833018
// If the setcc operand is 128-bit, prefer sign-extending to 128-bit over
3301933019
// 256-bit because the shuffle is cheaper than sign extending the result of
3302033020
// the compare.
33021-
if (N0->getOpcode() == ISD::SETCC && Subtarget.hasAVX() &&
33022-
(N0->getOperand(0).getValueType().is256BitVector() ||
33023-
N0->getOperand(0).getValueType().is512BitVector())) {
33021+
if (N0.getOpcode() == ISD::SETCC && Subtarget.hasAVX() &&
33022+
(N0.getOperand(0).getValueType().is256BitVector() ||
33023+
N0.getOperand(0).getValueType().is512BitVector())) {
3302433024
SExtVT = MVT::v8i32;
3302533025
}
3302633026
break;
@@ -35765,8 +35765,8 @@ static SDValue combineVectorPack(SDNode *N, SelectionDAG &DAG,
3576535765
// Constant Folding.
3576635766
APInt UndefElts0, UndefElts1;
3576735767
SmallVector<APInt, 32> EltBits0, EltBits1;
35768-
if ((N0->isUndef() || N->isOnlyUserOf(N0.getNode())) &&
35769-
(N1->isUndef() || N->isOnlyUserOf(N1.getNode())) &&
35768+
if ((N0.isUndef() || N->isOnlyUserOf(N0.getNode())) &&
35769+
(N1.isUndef() || N->isOnlyUserOf(N1.getNode())) &&
3577035770
getTargetConstantBitsFromNode(N0, SrcBitsPerElt, UndefElts0, EltBits0) &&
3577135771
getTargetConstantBitsFromNode(N1, SrcBitsPerElt, UndefElts1, EltBits1)) {
3577235772
unsigned NumLanes = VT.getSizeInBits() / 128;
@@ -35974,8 +35974,8 @@ static SDValue combineCompareEqual(SDNode *N, SelectionDAG &DAG,
3597435974
if (Subtarget.hasSSE2() && isAndOrOfSetCCs(SDValue(N, 0U), opcode)) {
3597535975
SDValue N0 = N->getOperand(0);
3597635976
SDValue N1 = N->getOperand(1);
35977-
SDValue CMP0 = N0->getOperand(1);
35978-
SDValue CMP1 = N1->getOperand(1);
35977+
SDValue CMP0 = N0.getOperand(1);
35978+
SDValue CMP1 = N1.getOperand(1);
3597935979
SDLoc DL(N);
3598035980

3598135981
// The SETCCs should both refer to the same CMP.
@@ -36126,7 +36126,7 @@ static SDValue PromoteMaskArithmetic(SDNode *N, SelectionDAG &DAG,
3612636126
return SDValue();
3612736127

3612836128
// The type of the truncated inputs.
36129-
if (N0->getOperand(0).getValueType() != VT)
36129+
if (N0.getOperand(0).getValueType() != VT)
3613036130
return SDValue();
3613136131

3613236132
// The right side has to be a 'trunc' or a constant vector.
@@ -36142,9 +36142,9 @@ static SDValue PromoteMaskArithmetic(SDNode *N, SelectionDAG &DAG,
3614236142
return SDValue();
3614336143

3614436144
// Set N0 and N1 to hold the inputs to the new wide operation.
36145-
N0 = N0->getOperand(0);
36145+
N0 = N0.getOperand(0);
3614636146
if (RHSTrunc)
36147-
N1 = N1->getOperand(0);
36147+
N1 = N1.getOperand(0);
3614836148
else
3614936149
N1 = DAG.getNode(ISD::ZERO_EXTEND, DL, VT, N1);
3615036150

@@ -39531,7 +39531,7 @@ static SDValue combineExtSetcc(SDNode *N, SelectionDAG &DAG,
3953139531
SDLoc dl(N);
3953239532

3953339533
// Only do this combine with AVX512 for vector extends.
39534-
if (!Subtarget.hasAVX512() || !VT.isVector() || N0->getOpcode() != ISD::SETCC)
39534+
if (!Subtarget.hasAVX512() || !VT.isVector() || N0.getOpcode() != ISD::SETCC)
3953539535
return SDValue();
3953639536

3953739537
// Only combine legal element types.
@@ -39547,7 +39547,7 @@ static SDValue combineExtSetcc(SDNode *N, SelectionDAG &DAG,
3954739547

3954839548
// Don't fold if the condition code can't be handled by PCMPEQ/PCMPGT since
3954939549
// that's the only integer compares with we have.
39550-
ISD::CondCode CC = cast<CondCodeSDNode>(N0->getOperand(2))->get();
39550+
ISD::CondCode CC = cast<CondCodeSDNode>(N0.getOperand(2))->get();
3955139551
if (ISD::isUnsignedIntSetCC(CC))
3955239552
return SDValue();
3955339553

0 commit comments

Comments
 (0)