Skip to content

llvm-reduce's ReduceOperandsToArgs transformation should try to replace load metadata with argument attribute equivalents #131825

@arsenm

Description

@arsenm

If we're reducing a case that looks like

 define void @foo(ptr %ptr) { %load = load i32, ptr %ptr, !range !{i32 0, i32 16}, !noundef !{} call void @bar(i32 %load) ret void } 

to

 define void @foo(ptr %ptr, i32 %load) { call void @bar(i32 %load) ret void } 

We're losing the annotations which are potentially relevant to optimization. In these cases, we can substitute the noundef and range attributes for the original metadata

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions