Skip to content

Commit 7d1aace

Browse files
Avoid duplicate computation
1 parent 8c0577a commit 7d1aace

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

llvm/lib/CodeGen/MachineVerifier.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1939,27 +1939,20 @@ void MachineVerifier::visitMachineInstrBefore(const MachineInstr *MI) {
19391939
// and physical register.
19401940
TypeSize SrcSize = TRI->getRegSizeInBits(SrcReg, *MRI);
19411941
TypeSize DstSize = TRI->getRegSizeInBits(DstReg, *MRI);
1942-
19431942
if (SrcReg.isPhysical() && DstTy.isValid()) {
19441943
const TargetRegisterClass *SrcRC =
19451944
TRI->getMinimalPhysRegClassLLT(SrcReg, DstTy);
19461945
if (SrcRC)
19471946
SrcSize = TRI->getRegSizeInBits(*SrcRC);
19481947
}
19491948

1950-
if (SrcSize.isZero())
1951-
SrcSize = TRI->getRegSizeInBits(SrcReg, *MRI);
1952-
19531949
if (DstReg.isPhysical() && SrcTy.isValid()) {
19541950
const TargetRegisterClass *DstRC =
19551951
TRI->getMinimalPhysRegClassLLT(DstReg, SrcTy);
19561952
if (DstRC)
19571953
DstSize = TRI->getRegSizeInBits(*DstRC);
19581954
}
19591955

1960-
if (DstSize.isZero())
1961-
DstSize = TRI->getRegSizeInBits(DstReg, *MRI);
1962-
19631956
// If the Dst is scalable and the Src is fixed, then the Dst can only hold
19641957
// the Src if the minimum size Dst can hold is at least as big as Src.
19651958
if (DstSize.isScalable() && !SrcSize.isScalable() &&

0 commit comments

Comments
 (0)