-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
Description
| Bugzilla Link | 2226 |
| Resolution | FIXED |
| Resolved on | Apr 16, 2008 15:12 |
| Version | trunk |
| OS | All |
| Attachments | this patch makes the problem more visible |
Extended Description
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.