Skip to content

Commit 8de3fb6

Browse files
committed
more reverts
Created using spr 1.3.4
1 parent 55e8d6a commit 8de3fb6

File tree

4 files changed

+1
-70
lines changed

4 files changed

+1
-70
lines changed

llvm/lib/CodeGen/InitUndef.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -164,14 +164,6 @@ bool InitUndef::handleSubReg(MachineFunction &MF, MachineInstr &MI,
164164
TRI->getCoveringSubRegIndexes(*MRI, TargetRegClass, NeedDef,
165165
SubRegIndexNeedInsert);
166166

167-
// It's not possible to create the INIT_UNDEF when there is no register
168-
// class associated for the subreg. This may happen for artificial subregs
169-
// that are not directly addressable.
170-
if (any_of(SubRegIndexNeedInsert, [&](unsigned Ind) -> bool {
171-
return !TRI->getSubRegisterClass(TargetRegClass, Ind);
172-
}))
173-
continue;
174-
175167
Register LatestReg = Reg;
176168
for (auto ind : SubRegIndexNeedInsert) {
177169
Changed = true;

llvm/lib/CodeGen/RegisterCoalescer.cpp

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,27 +1374,6 @@ bool RegisterCoalescer::reMaterializeTrivialDef(const CoalescerPair &CP,
13741374
MachineInstr &NewMI = *std::prev(MII);
13751375
NewMI.setDebugLoc(DL);
13761376

1377-
// In a situation like the following:
1378-
//
1379-
// undef %2.subreg:reg = INST %1:reg ; DefMI (rematerializable),
1380-
// ; DefSubIdx = subreg
1381-
// %3:reg = COPY %2 ; SrcIdx = DstIdx = 0
1382-
// .... = SOMEINSTR %3:reg
1383-
//
1384-
// there are no subranges for %3 so after rematerialization we need
1385-
// to explicitly create them. Undefined subranges are removed later on.
1386-
if (DstReg.isVirtual() && DefSubIdx && !CP.getSrcIdx() && !CP.getDstIdx() &&
1387-
MRI->shouldTrackSubRegLiveness(DstReg)) {
1388-
LiveInterval &DstInt = LIS->getInterval(DstReg);
1389-
if (!DstInt.hasSubRanges()) {
1390-
LaneBitmask FullMask = MRI->getMaxLaneMaskForVReg(DstReg);
1391-
LaneBitmask UsedLanes = TRI->getSubRegIndexLaneMask(DefSubIdx);
1392-
LaneBitmask UnusedLanes = FullMask & ~UsedLanes;
1393-
DstInt.createSubRangeFrom(LIS->getVNInfoAllocator(), UsedLanes, DstInt);
1394-
DstInt.createSubRangeFrom(LIS->getVNInfoAllocator(), UnusedLanes, DstInt);
1395-
}
1396-
}
1397-
13981377
// In a situation like the following:
13991378
// %0:subreg = instr ; DefMI, subreg = DstIdx
14001379
// %1 = copy %0:subreg ; CopyMI, SrcIdx = 0
@@ -1507,7 +1486,6 @@ bool RegisterCoalescer::reMaterializeTrivialDef(const CoalescerPair &CP,
15071486
NewRC = TRI->getCommonSubClass(NewRC, DefRC);
15081487
assert(NewRC && "subreg chosen for remat incompatible with instruction");
15091488
}
1510-
15111489
// Remap subranges to new lanemask and change register class.
15121490
LiveInterval &DstInt = LIS->getInterval(DstReg);
15131491
for (LiveInterval::SubRange &SR : DstInt.subranges()) {

llvm/test/CodeGen/AArch64/init-undef.mir

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5
2-
# RUN: llc -mtriple=aarch64-- -aarch64-enable-subreg-liveness-tracking=false -run-pass=init-undef -o - %s | FileCheck %s
3-
# RUN: llc -mtriple=aarch64-- -aarch64-enable-subreg-liveness-tracking=true -run-pass=init-undef -o - %s | FileCheck %s
2+
# RUN: llc -mtriple=aarch64-- -run-pass=init-undef -o - %s | FileCheck %s
43

54
---
65
name: test_stxp_undef

llvm/test/CodeGen/AArch64/register-coalesce-update-subranges-remat.mir

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)