Skip to content

scalarrepl doesn't promote alloca in 2008-03-24-BitField-And-Alloca.c #3662

@lattner

Description

@lattner
Bugzilla Link 3290
Resolution FIXED
Resolved on Jan 08, 2009 23:47
Version 1.0
OS All
Blocks #3604
Attachments testcase, another related testcase

Extended Description

This is split off from bug 3232, where we learned that diabling gcc's inliner caused a perf regression in 2008-03-24-BitField-And-Alloca.c because scalarrepl isn't promoting the allocas anymore.

This in turn is because of how the struct is being passed by value to a function: due to the ABI lowering stuff in the front-end, it is passed as an i64, so we get this code, which confuses scalarrepl:

%struct.Key = type { { i32, i32 } }

...
%iospec = alloca %struct.Key ; <%struct.Key*> [#uses=3]
...
%2 = bitcast %struct.Key* %iospec to i64* ; <i64*> [#uses=1]
store i64 %key_token2, i64* %2, align 8

Perhaps scalarrepl can handle this the same way it handles memcpy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzilla

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions