summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RenameIndependentSubregs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/RenameIndependentSubregs.cpp')
-rw-r--r--llvm/lib/CodeGen/RenameIndependentSubregs.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/RenameIndependentSubregs.cpp b/llvm/lib/CodeGen/RenameIndependentSubregs.cpp
index bd5a60836b7..9c189f90199 100644
--- a/llvm/lib/CodeGen/RenameIndependentSubregs.cpp
+++ b/llvm/lib/CodeGen/RenameIndependentSubregs.cpp
@@ -353,6 +353,11 @@ void RenameIndependentSubregs::computeMainRangesFixFlags(
if (I == 0)
LI.clear();
LIS->constructMainRangeFromSubranges(LI);
+ // A def of a subregister may be a use of other register lanes. Replacing
+ // such a def with a def of a different register will eliminate the use,
+ // and may cause the recorded live range to be larger than the actual
+ // liveness in the program IR.
+ LIS->shrinkToUses(&LI);
}
}
OpenPOWER on IntegriCloud