[LLVMbugs] [Bug 1975] New: dag isel emitter isels wrong flag result

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Feb 2 19:33:19 PST 2008


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

           Summary: dag isel emitter isels wrong flag result
           Product: tools
           Version: 2.2
          Platform: PC
        OS/Version: All
            Status: NEW
          Keywords: compile-fail
          Severity: normal
          Priority: P2
         Component: TableGen
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: sabre at nondot.org
                CC: evan.cheng at apple.com, llvmbugs at cs.uiuc.edu


The dag isel emitter is generating code that uses RAUW on a the flag result of
the wrong node in some cases.  For example, in the X86 r/m/w pattern for
"adde", the adde node generates a flag.  However, the selector code (generated
by tblgen) looks like this:

  ReplaceUses(SDOperand(N10.Val, 1), SDOperand(ResNode, 0));
  ReplaceUses(SDOperand(N.Val, 1), InFlag);  <---
  ReplaceUses(SDOperand(N.Val, 0), SDOperand(Chain10.Val, Chain10.ResNo));
  return ResNode;

That is replacing the "flag of the store" with the input flag.  This is
incorrect, as the store doesn't have a flag!  I'm committing a patch soon with
a horrible hack that works around this, but this really needs to be fixed.

-Chris


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