Skip to content

Commit b19ecb3

Browse files
committed
Fixups
1 parent 40ec43c commit b19ecb3

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23984,18 +23984,16 @@ static SDValue performSTORECombine(SDNode *N,
2398423984
return SDValue();
2398523985

2398623986
// Heuristic: If there are other users of integer scalars extracted from
23987-
// this vector that won't fold into the store -- abandon folding. This may
23988-
// extend the vector lifetime and disrupt paired stores.
23989-
for (auto Use = Vector->use_begin(), End = Vector->use_end(); Use != End;
23990-
++Use) {
23991-
if (Use->getResNo() != Vector.getResNo())
23987+
// this vector that won't fold into the store -- abandon folding. Applying
23988+
// this fold may extend the vector lifetime and disrupt paired stores.
23989+
for (const auto &Use : Vector->uses()) {
23990+
if (Use.getResNo() != Vector.getResNo())
2399223991
continue;
23993-
SDNode *User = Use->getUser();
23994-
if (User->getOpcode() == ISD::EXTRACT_VECTOR_ELT) {
23995-
if (!User->hasOneUse() ||
23996-
(*User->user_begin())->getOpcode() != ISD::STORE)
23997-
return SDValue();
23998-
}
23992+
const SDNode *User = Use.getUser();
23993+
if (User->getOpcode() == ISD::EXTRACT_VECTOR_ELT &&
23994+
(!User->hasOneUse() ||
23995+
(*User->user_begin())->getOpcode() != ISD::STORE))
23996+
return SDValue();
2399923997
}
2400023998

2400123999
EVT FPElemVT = EVT::getFloatingPointVT(ElemVT.getSizeInBits());

0 commit comments

Comments
 (0)