[PATCH] D49535: [RegisterCoalescer] Fixed inconsistent followCopyChain with subreg
Tim Renouf via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 26 14:28:01 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL338070: [RegisterCoalescer] Fixed inconsistent followCopyChain with subreg (authored by tpr, committed by ).
Repository:
rL LLVM
https://reviews.llvm.org/D49535
Files:
llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp
Index: llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp
+++ llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp
@@ -2280,16 +2280,21 @@
LiveQueryResult LRQ = LI.Query(Def);
ValueIn = LRQ.valueIn();
} else {
- // Query subranges. Pick the first matching one.
+ // Query subranges. Ensure that all matching ones take us to the same def
+ // (allowing some of them to be undef).
ValueIn = nullptr;
for (const LiveInterval::SubRange &S : LI.subranges()) {
// Transform lanemask to a mask in the joined live interval.
LaneBitmask SMask = TRI->composeSubRegIndexLaneMask(SubIdx, S.LaneMask);
if ((SMask & LaneMask).none())
continue;
LiveQueryResult LRQ = S.Query(Def);
- ValueIn = LRQ.valueIn();
- break;
+ if (!ValueIn) {
+ ValueIn = LRQ.valueIn();
+ continue;
+ }
+ if (LRQ.valueIn() && ValueIn != LRQ.valueIn())
+ return std::make_pair(VNI, TrackReg);
}
}
if (ValueIn == nullptr) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49535.157574.patch
Type: text/x-patch
Size: 1159 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180726/7c07c511/attachment.bin>
More information about the llvm-commits
mailing list