Skip to content

Commit d15163e

Browse files
committed
fix
1 parent 065046b commit d15163e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/Target/X86/X86InstrInfo.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,6 +1172,8 @@ bool X86InstrInfo::classifyLEAReg(MachineInstr &MI, const MachineOperand &Src,
11721172
unsigned SubReg = Src.getSubReg();
11731173
isKill = MI.killsRegister(SrcReg, /*TRI=*/nullptr);
11741174

1175+
NewSrcSubReg = X86::NoSubRegister;
1176+
11751177
// For both LEA64 and LEA32 the register already has essentially the right
11761178
// type (32-bit or 64-bit) we may just need to forbid SP.
11771179
if (Opc != X86::LEA64_32r) {
@@ -1199,6 +1201,7 @@ bool X86InstrInfo::classifyLEAReg(MachineInstr &MI, const MachineOperand &Src,
11991201
// Virtual register of the wrong class, we have to create a temporary 64-bit
12001202
// vreg to feed into the LEA.
12011203
NewSrc = MF.getRegInfo().createVirtualRegister(RC);
1204+
NewSrcSubReg = X86::NoSubRegister;
12021205
MachineInstr *Copy =
12031206
BuildMI(*MI.getParent(), MI, MI.getDebugLoc(), get(TargetOpcode::COPY))
12041207
.addReg(NewSrc, RegState::Define | RegState::Undef, X86::sub_32bit)

0 commit comments

Comments
 (0)