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

           Summary: use of uninitialized variables in
                    SimpleRegisterCoalescing.cpp
           Product: libraries
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Common Code Generator Code
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [email protected]


SimpleRegisterCoalescing.cpp at line 1937 calls TargetInstrInfo::isMoveInstr
to get the source and destination registers of a move without checking
the result value to see if the instruction was actually a move. It looks like
it should be, but currently there are cases where this assumption doesn't
hold. When it doesn't the following code ends up referencing the
variables uninitialized.

For example, when compiling
test/CodeGen/Generic/2003-07-08-BadCastToBool.ll
on x86 the code at line 1073 inserts a non-move instruction into
JoinedCopies.

The attached patch demonstrates the problem by using an assert.


-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to