Skip to content

Failure to hoist loop invariant #23587

@Bigcheese

Description

@Bigcheese
Bugzilla Link 23213
Version trunk
OS All
Attachments Original C++ Code, Unoptimized IR
CC @Bigcheese,@chandlerc,@hfinkel

Extended Description

LLVM fails to properly optimize the attached code from Mike Acton's talk "How to Write Code the Compiler Can Actually Optimize".

The issue is that Foo::Bar is inlined into Foo::Baz before Foo::Bar has been optimized, and LICM/SCEV can't handle the resulting double loop.

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