[PATCH] D95142: [SLC] Simplify strcpy and friends with non-zero address spaces
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 21 08:12:02 PST 2021
arsenm added inline comments.
================
Comment at: llvm/lib/Analysis/TargetLibraryInfo.cpp:647-649
+ if (DL &&
+ PTy->getPointerAddressSpace() != DL->getDefaultGlobalsAddressSpace())
+ return false;
----------------
This wouldn't really be right for AMDGPU, but we have no library calls anyway. I also think it's not right to use GlobalsAddressSpace for this purpose. This has nothing to do with globals or creating new values
================
Comment at: llvm/lib/Analysis/TargetLibraryInfo.cpp:650
+ return false;
+ return PTy->getPointerElementType()->isIntegerTy(8);
+ }
----------------
Should never depend on pointee element type
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95142/new/
https://reviews.llvm.org/D95142
More information about the llvm-commits
mailing list