-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Description
| Bugzilla Link | 1306 |
| Resolution | FIXED |
| Resolved on | Mar 06, 2010 13:59 |
| Version | unspecified |
| OS | All |
| Reporter | LLVM Bugzilla Contributor |
| CC | @lattner,@sunfishcode |
Extended Description
Here is the beginning of the BB dump.
entry (0x8503c80, LLVM BB @0x8501af0, ID#0):
Live Ins: %R0 %R1
%reg1024 = ORI %R0, 0
%reg1025 = ORI %R1, 0
V4R0 is getting killed because handleLiveInRegister() is called on
all results of getAliasSet() for each of the liveins (this is in
LiveIntervals::computeIntervals() ).
handleRegisterDef() does a similar thing where calls
handlePhysicalRegisterDef() on all members of getAliasSet() returned
for the def, which also triggers this problem.
This is a pretty serious bug. LiveVariables::KillsRegister should not kill aliases that are "larger". The
correct way to fix this is to explicitly list registers that are defined, used, and killed. So your example
should look like:
entry (0x8503c80, LLVM BB @0x8501af0, ID#0):
Live Ins: %R0 %R1
%reg1024 = ORI %R0, 0, %V4R0
%reg1025 = ORI %R1, 0, %V4R0<imp-use,kill>
KillsRegister should check for exact match rather than regsOverlap. There are probably other similar
bugs in LiveVariables.