Skip to content

[PPCMergeStringPool] Global variables replaced with GEP instructions where not legal #88844

Closed
@nikic

Description

@nikic
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.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions