[all-commits] [llvm/llvm-project] 3a3aeb: [PPCMergeStringPool] Avoid replacing constant with...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Wed May 8 21:27:42 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3a3aeb8eba40e981d3a9ff92175f949c2f3d4434
https://github.com/llvm/llvm-project/commit/3a3aeb8eba40e981d3a9ff92175f949c2f3d4434
Author: Nikita Popov <npopov at redhat.com>
Date: 2024-05-09 (Thu, 09 May 2024)
Changed paths:
M llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp
M llvm/test/CodeGen/PowerPC/merge-string-used-by-metadata.mir
A llvm/test/CodeGen/PowerPC/mergeable-string-pool-exceptions.ll
M llvm/test/CodeGen/PowerPC/mergeable-string-pool-pass-only.mir
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.
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