[all-commits] [llvm/llvm-project] 1184a9: [PPCMergeStringPool] Avoid replacing constant with...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Mon May 13 18:03:41 PDT 2024
Branch: refs/heads/release/18.x
Home: https://github.com/llvm/llvm-project
Commit: 1184a9cb30e6a12c883b918867f2f06bc3096fc0
https://github.com/llvm/llvm-project/commit/1184a9cb30e6a12c883b918867f2f06bc3096fc0
Author: Nikita Popov <npopov at redhat.com>
Date: 2024-05-13 (Mon, 13 May 2024)
Changed paths:
M llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp
A llvm/test/CodeGen/PowerPC/mergeable-string-pool-exceptions.ll
M llvm/test/CodeGen/PowerPC/mergeable-string-pool-large.ll
M llvm/test/CodeGen/PowerPC/mergeable-string-pool-pass-only.mir
M llvm/test/CodeGen/PowerPC/mergeable-string-pool.ll
Log Message:
-----------
[PPCMergeStringPool] Avoid replacing constant with instruction (#88846)
String pool merging currently, for a reason that's not entirely clear to
me, tries to create GEP instructions instead of GEP constant expressions
when replacing constant references. It only uses constant expressions in
cases where this is required. However, it does not catch all cases where
such a requirement exists. For example, the landingpad catch clause has
to be a constant.
Fix this by always using the constant expression variant, which also
makes the implementation simpler.
Additionally, there are some edge cases where even replacement with a
constant GEP is not legal. The one I am aware of is the
llvm.eh.typeid.for intrinsic, so add a special case to forbid
replacements for it.
Fixes https://github.com/llvm/llvm-project/issues/88844.
(cherry picked from commit 3a3aeb8eba40e981d3a9ff92175f949c2f3d4434)
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list