Skip to content

Commit f1357d5

Browse files
sdesmalen-armnikic
andcommitted
Update llvm/lib/CodeGen/InitUndef.cpp
Co-authored-by: Nikita Popov <[email protected]>
1 parent e70e334 commit f1357d5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/lib/CodeGen/InitUndef.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,9 @@ bool InitUndef::handleSubReg(MachineFunction &MF, MachineInstr &MI,
167167
// It's not possible to create the INIT_UNDEF when there is no register
168168
// class associated for the subreg. This may happen for artificial subregs
169169
// that are not directly addressable.
170-
if (any_of(SubRegIndexNeedInsert,
171-
[&TRI = TRI, &TargetRegClass](unsigned ind) -> bool {
172-
return !TRI->getSubRegisterClass(TargetRegClass, ind);
173-
}))
170+
if (any_of(SubRegIndexNeedInsert, [&](unsigned Ind) -> bool {
171+
return !TRI->getSubRegisterClass(TargetRegClass, Ind);
172+
}))
174173
continue;
175174

176175
Register LatestReg = Reg;

0 commit comments

Comments
 (0)