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

           Summary: Small example where gcc produces better code
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


>From the Felix von Leitner talk:

int bar(int a,int b) {
  return (a<0) == (b<0);
}

gcc-4.4 gives (x86-64):

        movl    %edi, %eax
        notl    %eax
        xorl    %esi, %eax
        shrl    $31, %eax
        ret

llvm-gcc gives:

        testl   %edi, %edi
        setns   %al
        testl   %esi, %esi
        sets    %cl
        xorb    %al, %cl
        movzbl  %cl, %eax
        ret


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