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

            Bug ID: 16057
           Summary: less efficient comparison of global addresses
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Given

extern int x;
_Bool f(int *y) {
  return &x == y;
}

gcc produces

f:
    cmpq    $x, %rdi
    sete    %al
    ret

clang produces

f:
    movl    $x, %eax
    cmpq    %rax, %rdi
    sete    %al
    ret

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