<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi,
<br>
<br>
I have an assert firing due to PickNodeToScheduleBottomUp():<br>
    1. having a CallResource in use pushing an interference of current SUnit.<br>
    2. having no more SUnits in the  AvailableQueue<br>
    3. The only interference being the SUnit that just failed due to a Call Resource.<br>
    4. An attempt to duplicate this node which has the 'Call Resource' as a physical register.<br>
Thus the call to getMinimalPhysRegClass() asserts - Call Resource is not in a class!<br>
..../lib/CodeGen/TargetRegisterInfo.cpp:120: const llvm::TargetRegisterClass* llvm::TargetRegisterInfo::getMinimalPhysRegClass(unsigned int, llvm::EVT) const: Assertion `BestRC && "Couldn't find the register class"' failed.<br>
<br>
<br>
The interesting thing about this failure is that the Predecessor/Successor of two nodes was changed by PrescheduleNodesWithMultipleUses().<br>
If they were not, the AvailableQueue would have had nodes, and all would have been fine.<br>
I am quite uneasy over how PrescheduleNodesWithMultipleUses() has changed the Predecessor/Successor.<br>
It seems to have changed the DAG into something impossible to schedule - I need to look more carefully to confirm this.<br>
<br>
<br>
I'm not sure if this is one problem or two - or a target problem passing something dangerous to the scheduler.<br>
Any help would be most welcome.<br>
<br>
<br>
I have attached the code to exercise the bug - the slightest of perturbation will make it compile fine  e.g. add an extra 'undef' argument to f2 viz:  double @f2(i32, double, double, double).<br>
This example only fails for xcore targets.<br>
<br>
Robert<br>
</div>
</body>
</html>