Skip to content

Commit b2a86b1

Browse files
authored
[AMD] Use DenseMap in CanonicalizePointers FatPtrAttrs (#5889)
This PR fixes an assert thrown in `DenseMap::copyFrom` that looks like this: ``` ... Assertion `getNumBuckets() == other.getNumBuckets()' failed. ``` The call to `copyFrom` is via `SmallDenseMap`s copy ctor which fires in our code in the default ctor of `CanonicalizePointers::FatPointers::FatPtrAttrs` since `FatPtrAttrs` wraps a `llvm::SmallDenseMap<StringRef, Attribute> attributes`. I have locally verified the fix resolves the issue .
1 parent 420c290 commit b2a86b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

third_party/amd/lib/TritonAMDGPUTransforms/CanonicalizePointers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ struct FatPointers {
296296
return !(lhs == rhs);
297297
}
298298

299-
llvm::SmallDenseMap<StringRef, Attribute> attributes;
299+
llvm::DenseMap<StringRef, Attribute> attributes;
300300
bool canNarrow = false;
301301
};
302302

0 commit comments

Comments
 (0)