Skip to content

Commit 9532454

Browse files
committed
- Fix use of llvm::find_if
1 parent 2a18fbe commit 9532454

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,11 +474,11 @@ hasHazard(StateT InitialState,
474474
StateIdx = StateHash2Idx[StateHash];
475475
if (LLVM_UNLIKELY(!StateT::isEqual(State, States[StateIdx]))) {
476476
// Hash collision
477-
auto *Collision = llvm::find_if(Collisions, [&](auto &C) {
477+
auto Collision = llvm::find_if(Collisions, [&](auto &C) {
478478
return C.first == StateHash &&
479479
StateT::isEqual(State, States[C.second]);
480480
});
481-
if (Collision) {
481+
if (Collision != Collisions.end()) {
482482
StateIdx = Collision->second;
483483
} else {
484484
StateIdx = States.size();

0 commit comments

Comments
 (0)