[llvm-bugs] [Bug 38002] New: Missed opportunity for SETE for 2-cases switch

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jun 30 06:16:47 PDT 2018


            Bug ID: 38002
           Summary: Missed opportunity for SETE for 2-cases switch
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: david.bolvansky at gmail.com
                CC: llvm-bugs at lists.llvm.org


bool sw1(int x) {
    switch(x) {
        case 3:
        case 5:
            return true;

            return false;

Clang trunk -03/Os:
sw1(int): # @sw1(int)
  mov al, 1
  cmp edi, 3
  je .LBB0_3
  cmp edi, 5
  jne .LBB0_2        <----------- avoid jump, use "sete al"?
  xor eax, eax

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/20180630/097a9cd5/attachment.html>

More information about the llvm-bugs mailing list