[llvm] [PPCMergeStringPool] Avoid replacing constant with instruction (PR #88846)
Chen Zheng via llvm-commits
llvm-commits at lists.llvm.org
Wed May 8 20:24:40 PDT 2024
================
@@ -117,9 +118,16 @@ class PPCMergeStringPool : public ModulePass {
// sure that they can be replaced.
static bool hasReplaceableUsers(GlobalVariable &GV) {
for (User *CurrentUser : GV.users()) {
- // Instruction users are always valid.
- if (isa<Instruction>(CurrentUser))
+ if (isa<Instruction>(CurrentUser)) {
+ if (auto *II = dyn_cast<IntrinsicInst>(CurrentUser)) {
+ // Some intrinsics require a plain global.
+ if (II->getIntrinsicID() == Intrinsic::eh_typeid_for)
+ return false;
+ }
+
----------------
chenzheng1030 wrote:
Fair enough.
https://github.com/llvm/llvm-project/pull/88846
More information about the llvm-commits
mailing list