<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/88844>88844</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[PPCMergeStringPool] Global variables replaced with GEP instructions where not legal
</td>
</tr>
<tr>
<th>Labels</th>
<td>
backend:PowerPC,
llvm:crash
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
nikic
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
nikic
</td>
</tr>
</table>
<pre>
```llvm
target datalayout = "e-m:e-Fn32-i64:64-n32:64-S128-v256:256:256-v512:512:512"
target triple = "ppc64le-redhat-linux-gnu"
@id = private unnamed_addr constant [4 x i8] c"@id\00", align 1
; Higher-aligned dummy to make sure it is first in the string pool.
@dummy = private unnamed_addr constant [1 x i32] [i32 42], align 4
define ptr @test() personality ptr @__gnu_objc_personality_v0 {
invoke void @foo(ptr @dummy)
to label %cont unwind label %unwind
cont:
unreachable
unwind:
%lp = landingpad { ptr, i32 }
catch ptr @id
%id = tail call i32 @llvm.eh.typeid.for(ptr @id)
resume { ptr, i32 } %lp
}
declare i32 @__gnu_objc_personality_v0(...)
declare i32 @llvm.eh.typeid.for(ptr)
declare void @foo()
```
PPC string pool merging replaces the `@id` uses with string pool references. Both of these (in catch and in llvm.eh.typeid.for) are illegal as they are required to be constants.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMVN2O6ygMfhp6YyVKCWnTi1zMtNuzNytVOg9QEXATzhDIAumcvv0Kkv6MdEZaqaIx-MPfZxtz71VnEBtSvRNKjfpQglBKqsOKT6G3rklbq9bKW0M2xfzT-jqQ4kCKt8BdhwEkD1zzm50CkPIAhFLMBlK-YXY0Jc3UhpHybcMyU9L54-ea1tmVVhtSvj3W7Fqt4_lzpfRLmODUqPEeYhzFhmnMHMqeh0wrM_3OOjM9UMvKCiUTZnTqygPCZAwfUJ65lA6ENT5wE4BU7wx-g6pJdYCUhAgk1b4ookH3wLXqDKy_XF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