Skip to content

Commit 20c0280

Browse files
committed
[LiveIntervals] Repair subreg ranges in processTiedPairs
In TwoAddressInstructionPass::processTiedPairs, update subranges of the live interval for RegB as well as the main range. This is a small step towards switching TwoAddressInstructionPass over from LiveVariables to LiveIntervals. Currently this path is only tested if you explicitly enable -early-live-intervals. Differential Revision: https://reviews.llvm.org/D110526
1 parent b2b1a8b commit 20c0280

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

llvm/lib/CodeGen/TwoAddressInstructionPass.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1453,6 +1453,10 @@ TwoAddressInstructionPass::processTiedPairs(MachineInstr *MI,
14531453
SlotIndex endIdx =
14541454
LIS->getInstructionIndex(*MI).getRegSlot(IsEarlyClobber);
14551455
LI.addSegment(LiveInterval::Segment(LastCopyIdx, endIdx, VNI));
1456+
for (auto &S : LI.subranges()) {
1457+
VNI = S.getNextValue(LastCopyIdx, LIS->getVNInfoAllocator());
1458+
S.addSegment(LiveInterval::Segment(LastCopyIdx, endIdx, VNI));
1459+
}
14561460
}
14571461
}
14581462

llvm/test/CodeGen/Hexagon/swp-vect-dotprod.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
; RUN: llc -march=hexagon -mcpu=hexagonv5 -enable-pipeliner < %s -pipeliner-experimental-cg=true | FileCheck %s
22
; RUN: llc -march=hexagon -mcpu=hexagonv5 -O2 < %s -pipeliner-experimental-cg=true | FileCheck %s
33
; RUN: llc -march=hexagon -mcpu=hexagonv5 -O3 < %s -pipeliner-experimental-cg=true | FileCheck %s
4+
; RUN: llc -march=hexagon -mcpu=hexagonv5 -enable-pipeliner < %s -pipeliner-experimental-cg=true -early-live-intervals -verify-machineinstrs | FileCheck %s
45
;
56
; Check that we pipeline a vectorized dot product in a single packet.
67
;

llvm/test/CodeGen/SystemZ/subregliveness-01.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
; RUN: llc -mtriple=s390x-linux-gnu -mcpu=z13 -verify-machineinstrs -systemz-subreg-liveness < %s | FileCheck %s
2+
; RUN: llc -mtriple=s390x-linux-gnu -mcpu=z13 -verify-machineinstrs -systemz-subreg-liveness -early-live-intervals < %s | FileCheck %s
23

34
; Check for successful compilation.
45
; CHECK: lgfrl %r0, g_399

llvm/test/CodeGen/Thumb2/mve-multivec-spill.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
22
; RUN: llc -mtriple=thumbv8.1m.main-none-none-eabi -O3 -mattr=+mve %s -o - | FileCheck %s
3+
; RUN: llc -mtriple=thumbv8.1m.main-none-none-eabi -O3 -mattr=+mve -early-live-intervals -verify-machineinstrs %s -o - | FileCheck %s
34

45
declare void @external_function()
56

0 commit comments

Comments
 (0)