<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}
p
        {margin-top:0;
        margin-bottom:0}
p
        {margin-top:0;
        margin-bottom:0}
-->
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>
At the moment the same test is being ran twice - same output so pointless!<br>
I believe this may not be what was intended.<br>
The change below runs the virtual register test the second time on the Predecessor SUnit.<br>
<br>
Robert<br>
<br>
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp<br>
index f5fe168..6e888da<br>
--- a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp<br>
+++ b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp<br>
@@ -2850,7 +2850,7 @@ void RegReductionPQBase::PrescheduleNodesWithMultipleUses() {<br>
       continue;<br>
     // Avoid prescheduling to copies from virtual registers, which don't behave<br>
     // like other nodes from the perspective of scheduling heuristics.<br>
-    if (SDNode *N = SU->getNode())<br>
+    if (SDNode *N = PredSU->getNode())<br>
       if (N->getOpcode() == ISD::CopyFromReg &&<br>
           TargetRegisterInfo::isVirtualRegister<br>
             (cast<RegisterSDNode>(N->getOperand(1))->getReg()))<br>
~<br>
</div>
</body>
</html>