[LLVMbugs] [Bug 22473] New: LLVM not using cmpb for unsigned char comparison

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Feb 5 01:10:29 PST 2015


            Bug ID: 22473
           Summary: LLVM not using cmpb for unsigned char comparison
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: djasper at google.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Small reproduction:
  bool f(unsigned char* a, unsigned char b) { return a[0] == b; }

LLVM translates this to
        movzbl        (%rdi), %eax
        cmpl        %esi, %eax

GCC instead does
          cmpb    %dil, (%rsi)

Which according to IACA is better.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150205/76ffc007/attachment.html>

More information about the llvm-bugs mailing list