Skip to content

ipsccp -> llvm.lifetime.start/end can only be used on alloca or poison #153013

@bjope

Description

@bjope

Running ipsccp pass on IR like this

define void @foo() {
  %g = alloca [4 x i16], align 1
  %.not1 = icmp eq ptr %g, inttoptr (i16 -1 to ptr)
  br i1 %.not1, label %for.end35.us.lr.ph, label %for.cond5

for.end35.us.lr.ph:                               ; preds = %entry
  br label %for.end35.us

for.end35.us:                                     ; preds = %for.end35.us, %for.end35.us.lr.ph
  call void @llvm.lifetime.start.p0(ptr %g)
  br label %for.end35.us

for.cond5:                                        ; preds = %entry
  ret void
}

results in

lvm.lifetime.start/end can only be used on alloca or poison
  call void @llvm.lifetime.start.p0(ptr inttoptr (i16 -1 to ptr))
LLVM ERROR: Broken module found, compilation aborted!

See https://godbolt.org/z/jo9zqrP1x

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions