[LLVMbugs] [Bug 1016] NEW: Codegen wrong for: ptrtoint X* %y to bool

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Nov 27 16:55:09 PST 2006


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

           Summary: Codegen wrong for: ptrtoint X* %y to bool
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Common Code Generator Code
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: rspencer at x10sys.com


For this code:
bb122:
  %tmp124 = ptrtoint %struct.TypHeader* %hdR to bool
  %i.3.in.in = select bool %tmp124, %struct.TypHeader* %hdR, %struct.TypHeader* %hdL
  %hdR_addr.0 = select bool %tmp124, %struct.TypHeader* %hdL, %struct.TypHeader*
%hdR

llc is generating:
.BB1_3: #bb122
        movl %eax, %ebx
        # TRUNCATE movb %bl, %bl
        testb %bl, %bl
        movl %eax, %edi
        cmovne %esi, %edi
        testb %bl, %bl
        cmovne %eax, %esi

It looks like the recent DAGCombiner changes missed a case for the select
instruction.

Test cases will be attached.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the llvm-bugs mailing list