http://llvm.org/bugs/show_bug.cgi?id=3290

           Summary: scalarrepl doesn't promote alloca in 2008-03-24-
                    BitField-And-Alloca.c
           Product: libraries
           Version: 1.0
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Scalar Optimizations
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


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.


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to