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

           Summary: unnecessary mov
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Common Code Generator Code
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


We codegen

define void @zed(i8* %cx) nounwind uwtable ssp {
entry:
  tail call void @foo(i8* %cx) nounwind
  tail call void @bar(i8* %cx) nounwind
  ret void
}
declare void @foo(i8*)
declare void @bar(i8*)

into

    pushq    %rbx
    movq    %rdi, %rbx
    movq    %rbx, %rdi
    callq    __Z3fooPv
    movq    %rbx, %rdi
    popq    %rbx
    jmp    __Z3barPv

note the funny rdi -> rbx -> rdi moves.

-- 
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