Skip to content

opt -passes="function-simplification<O1>" leaves debug info that the LLParser complains about #106042

Closed
@mikaelholmen

Description

@mikaelholmen

llvm commit: 7e6b150
Reproduce with:

opt -passes="function-simplification<O1>" bbi-98372.ll -S -o - | opt -o /dev/null

Result:

opt: <stdin>:8:20: error: base element of getelementptr must be sized
    #dbg_value(ptr getelementptr inbounds ([1 x %union.anon], ptr @d, i32 0, i32 3), !7, !DIExpression(), !14)

The problem is that the output from function-simplification contains

#dbg_value(ptr getelementptr inbounds ([1 x %union.anon], ptr @d, i32 0, i32 3), !7, !DIExpression(), !14)

but there is no definition left of the type %union.anon. That type exists in the bbi-98372.ll input but I suppose it was removed in the output since there is no non-debug info use left. But this then makes other users of the output (e.g. opt or llc) error out.

bbi-98372.ll.gz

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions