https://bugs.llvm.org/show_bug.cgi?id=48979

            Bug ID: 48979
           Summary: Failure to optimize some 64-bit constants in -Oz
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]

int64_t f()
{
    return 0x1234567800000000;
}

With -Os, GCC emits this:

f():
  mov eax, 38177487
  sal rax, 35
  ret

Clang -Oz emits this:

f():
  movabs rax, 1311768464867721216
  ret

GCC saves 1 byte over LLVM here.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to