From 46ce441df678c48d2708bb7cceb55fccba4f5884 Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Wed, 15 Aug 2018 16:07:47 +0000 Subject: [RegAlloc] Check that subreg liveness tracking applies to given virtual reg Subregister liveness applies selectively to register classes with certain properties. Make sure that when it's enabled, it applies to a given virtual register (in virtual register rewriter). llvm-svn: 339784 --- llvm/lib/CodeGen/VirtRegMap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/VirtRegMap.cpp') diff --git a/llvm/lib/CodeGen/VirtRegMap.cpp b/llvm/lib/CodeGen/VirtRegMap.cpp index 0ead2b8340a..ed7bef667e7 100644 --- a/llvm/lib/CodeGen/VirtRegMap.cpp +++ b/llvm/lib/CodeGen/VirtRegMap.cpp @@ -525,7 +525,7 @@ void VirtRegRewriter::rewrite() { // Preserve semantics of sub-register operands. unsigned SubReg = MO.getSubReg(); if (SubReg != 0) { - if (NoSubRegLiveness) { + if (NoSubRegLiveness || !MRI->shouldTrackSubRegLiveness(VirtReg)) { // A virtual register kill refers to the whole register, so we may // have to add implicit killed operands for the super-register. A // partial redef always kills and redefines the super-register. -- cgit v1.2.3