[LLVMbugs] [Bug 2387] New: setcc gets promoted from i1 to i32, but select remains i1 and triggers assert

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri May 30 14:00:12 PDT 2008


           Summary: setcc gets promoted from i1 to i32, but select remains
                    i1 and triggers assert
           Product: new-bugs
           Version: unspecified
          Platform: Macintosh
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: scooter.phd at gmail.com
                CC: llvmbugs at cs.uiuc.edu

Created an attachment (id=1683)
 --> (http://llvm.org/bugs/attachment.cgi?id=1683)
test case _addvsi3.ll

Always seems to be one more bug between me and a working CellSPU backend.
Today, the bug appears to be a setcc/select promotion problem. Here's the DAG
dump from inside gdb:

SelectionDAG has 25 nodes:
  0x1b04bc0: ch = EntryToken 
  0x1b04c20: i8 = Constant <1>
  0x1b04cc0: i32 = Constant <4294967295>
    0x1b04bc0: <multiple use>
    0x1b04df0: i32 = Register  #1025
  0x1b04e20: i32,ch = CopyFromReg 0x1b04bc0, 0x1b04df0
    0x1b04bc0: <multiple use>
    0x1b04e80: i32 = Register  #1026
  0x1b04eb0: i32,ch = CopyFromReg 0x1b04bc0, 0x1b04e80
    0x1b04eb0: <multiple use>
    0x1b04e20: <multiple use>
  0x1b04f80: i32 = add 0x1b04eb0, 0x1b04e20
  0x1b05030: ch = setgt 
  0x1b051e0: ch = setlt 
      0x1b04eb0: <multiple use>
      0x1b04cc0: <multiple use>
      0x1b05030: <multiple use>
    0x1b05610: i32 = setcc 0x1b04eb0, 0x1b04cc0, 0x1b05030
      0x1b04f80: <multiple use>
      0x1b04e20: <multiple use>
      0x1b051e0: <multiple use>
    0x1b055a0: i32 = setcc 0x1b04f80, 0x1b04e20, 0x1b051e0
      0x1b04f80: <multiple use>
      0x1b04e20: <multiple use>
      0x1b05030: <multiple use>
    0x1b04f10: i32 = setcc 0x1b04f80, 0x1b04e20, 0x1b05030
  0x1b056d0: i8 = select 0x1b05610, 0x1b055a0, 0x1b04f10
[truncated at this point because here's the bug]

The setcc's have all been promoted to i32, but the select didn't. This triggers
an assert much later on in SelectionDAG::ComputeMaskedBits because the bit
widths are the wrong size (clearly!)

Looking for advice on where to start debugging this bug...

To reproduce:

llvm-as -o - _addvsi3.ll | llc -march=cellspu -o -

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.

More information about the llvm-bugs mailing list