Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions llvm/lib/CodeGen/InitUndef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,6 @@ bool InitUndef::handleSubReg(MachineFunction &MF, MachineInstr &MI,
TRI->getCoveringSubRegIndexes(*MRI, TargetRegClass, NeedDef,
SubRegIndexNeedInsert);

// It's not possible to create the INIT_UNDEF when there is no register
// class associated for the subreg. This may happen for artificial subregs
// that are not directly addressable.
if (any_of(SubRegIndexNeedInsert, [&](unsigned Ind) -> bool {
return !TRI->getSubRegisterClass(TargetRegClass, Ind);
}))
continue;

Register LatestReg = Reg;
for (auto ind : SubRegIndexNeedInsert) {
Changed = true;
Expand Down
3 changes: 1 addition & 2 deletions llvm/test/CodeGen/AArch64/init-undef.mir
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5
# RUN: llc -mtriple=aarch64-- -aarch64-enable-subreg-liveness-tracking=false -run-pass=init-undef -o - %s | FileCheck %s
# RUN: llc -mtriple=aarch64-- -aarch64-enable-subreg-liveness-tracking=true -run-pass=init-undef -o - %s | FileCheck %s
# RUN: llc -mtriple=aarch64-- -run-pass=init-undef -o - %s | FileCheck %s

---
name: test_stxp_undef
Expand Down
Loading