Skip to content

Commit 558bc3e

Browse files
committed
Use ternary for Addend
1 parent 8af5019 commit 558bc3e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1627,11 +1627,9 @@ void DAGTypeLegalizer::SplitVecRes_LOOP_DEPENDENCE_MASK(SDNode *N, SDValue &Lo,
16271627
Lo = DAG.getNode(N->getOpcode(), DL, LoVT, PtrA, PtrB, N->getOperand(2));
16281628

16291629
unsigned Offset = EltSize * HiVT.getVectorMinNumElements();
1630-
SDValue Addend;
1631-
if (HiVT.isScalableVT())
1632-
Addend = DAG.getVScale(DL, MVT::i64, APInt(64, Offset));
1633-
else
1634-
Addend = DAG.getConstant(Offset, DL, MVT::i64);
1630+
SDValue Addend = HiVT.isScalableVT()
1631+
? DAG.getVScale(DL, MVT::i64, APInt(64, Offset))
1632+
: DAG.getConstant(Offset, DL, MVT::i64);
16351633

16361634
PtrA = DAG.getNode(ISD::ADD, DL, MVT::i64, PtrA, Addend);
16371635
PtrB = DAG.getNode(ISD::ADD, DL, MVT::i64, PtrB, Addend);

0 commit comments

Comments
 (0)