Skip to content

Commit 3e7564b

Browse files
committed
Use existing isLE variable
1 parent fc2f59a commit 3e7564b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15495,8 +15495,7 @@ SDValue DAGCombiner::visitTRUNCATE(SDNode *N) {
1549515495
unsigned BuildVecNumElts = BuildVect.getNumOperands();
1549615496
unsigned TruncVecNumElts = VT.getVectorNumElements();
1549715497
unsigned TruncEltOffset = BuildVecNumElts / TruncVecNumElts;
15498-
unsigned FirstElt =
15499-
DAG.getDataLayout().isBigEndian() ? (TruncEltOffset - 1) : 0;
15498+
unsigned FirstElt = isLE ? 0 : (TruncEltOffset - 1);
1550015499

1550115500
assert((BuildVecNumElts % TruncVecNumElts) == 0 &&
1550215501
"Invalid number of elements");

0 commit comments

Comments
 (0)