Skip to content

Commit e7f73c0

Browse files
committed
[Attributor] Use getPointerAddressSpace to replace a cast followed by a getAddressSpace
1 parent 6c375ae commit e7f73c0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Transforms/IPO/AttributorAttributes.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12491,8 +12491,7 @@ struct AAAddressSpaceImpl : public AAAddressSpace {
1249112491
void initialize(Attributor &A) override {
1249212492
assert(getAssociatedType()->isPtrOrPtrVectorTy() &&
1249312493
"Associated value is not a pointer");
12494-
auto *PtrTy = cast<PointerType>(getAssociatedType());
12495-
if (PtrTy->getAddressSpace())
12494+
if (getAssociatedType()->getPointerAddressSpace())
1249612495
indicateOptimisticFixpoint();
1249712496
}
1249812497

0 commit comments

Comments
 (0)