[PATCH] D81943: [SROA] Teach SROA to perform no-op pointer conversion.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 22 13:59:47 PDT 2020
efriedma added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/SROA.cpp:1709
+ return OldAS == NewAS ||
+ DL.getPointerSize(OldAS) == DL.getPointerSize(NewAS);
}
----------------
Do you need to check isNonIntegralPointerType()?
================
Comment at: llvm/lib/Transforms/Scalar/SROA.cpp:1782
+ // checked convertible, i.e. they have the same pointer size), use a pair
+ // of no-op `ptrtoint`/`inttoptr` casts through an integer.
+ if (OldAS != NewAS) {
----------------
Probably this comment should be clarified to explain why this isn't an addrspacecast.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81943/new/
https://reviews.llvm.org/D81943
More information about the llvm-commits
mailing list