[PATCH] D22420: Fix check for prescheduling to copies from virtual registers
Elliot Colp via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 15 12:26:59 PDT 2016
colpell created this revision.
colpell added a reviewer: bogner.
colpell added a subscriber: llvm-commits.
Herald added a subscriber: MatzeB.
Currently, this check on line 2834 is an exact copy of a check on line 2810, which SU should have already passed. Given the context and comment above the check ("Avoid prescheduling *to* copies" vs. "Avoid prescheduling copies"), it seems like the intention was to check PredSU instead.
https://reviews.llvm.org/D22420
Files:
lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
Index: lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
===================================================================
--- lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
+++ lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
@@ -2831,7 +2831,7 @@
continue;
// Avoid prescheduling to copies from virtual registers, which don't behave
// like other nodes from the perspective of scheduling heuristics.
- if (SDNode *N = SU.getNode())
+ if (SDNode *N = PredSU->getNode())
if (N->getOpcode() == ISD::CopyFromReg &&
TargetRegisterInfo::isVirtualRegister
(cast<RegisterSDNode>(N->getOperand(1))->getReg()))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22420.64179.patch
Type: text/x-patch
Size: 654 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160715/a5bc909f/attachment.bin>
More information about the llvm-commits
mailing list