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

            Bug ID: 22852
           Summary: Redundant mov generated for return value
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: AArch64
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

The following code:

unsigned long
baz (unsigned long a, unsigned long b)
{
  return (a & 0xffffffff) | (b & 0xffffffff00000000);
}

Produces:

baz:                                    // @baz
// BB#0:                                // %entry
    bfxil    x1, x0, #0, #32
    mov     x0, x1
    ret

The mov here is redundant; we can just emit "bfxil x0, x0, #0, #32".

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