Skip to content

Commit 1398b00

Browse files
committed
Rename local var.
1 parent ccc1d3c commit 1398b00

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

llvm/lib/Target/X86/X86ExpandPseudo.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,9 @@ bool X86ExpandPseudo::expandMI(MachineBasicBlock &MBB,
301301
X86FL->emitSPUpdate(MBB, MBBI, DL, Offset, /*InEpilogue=*/true);
302302
}
303303

304+
// Use this predicate to set REX prefix for X86_64 targets.
305+
bool IsX64 = STI->isTargetWin64() || STI->isTargetUEFI64();
304306
// Jump to label or value in register.
305-
bool IsWinOrUEFI64 = STI->isTargetWin64() || STI->isTargetUEFI64();
306307
if (Opcode == X86::TCRETURNdi || Opcode == X86::TCRETURNdicc ||
307308
Opcode == X86::TCRETURNdi64 || Opcode == X86::TCRETURNdi64cc) {
308309
unsigned Op;
@@ -339,17 +340,16 @@ bool X86ExpandPseudo::expandMI(MachineBasicBlock &MBB,
339340
}
340341

341342
} else if (Opcode == X86::TCRETURNmi || Opcode == X86::TCRETURNmi64) {
342-
unsigned Op =
343-
(Opcode == X86::TCRETURNmi)
344-
? X86::TAILJMPm
345-
: (IsWinOrUEFI64 ? X86::TAILJMPm64_REX : X86::TAILJMPm64);
343+
unsigned Op = (Opcode == X86::TCRETURNmi)
344+
? X86::TAILJMPm
345+
: (IsX64 ? X86::TAILJMPm64_REX : X86::TAILJMPm64);
346346
MachineInstrBuilder MIB = BuildMI(MBB, MBBI, DL, TII->get(Op));
347347
for (unsigned i = 0; i != X86::AddrNumOperands; ++i)
348348
MIB.add(MBBI->getOperand(i));
349349
} else if (Opcode == X86::TCRETURNri64) {
350350
JumpTarget.setIsKill();
351351
BuildMI(MBB, MBBI, DL,
352-
TII->get(IsWinOrUEFI64 ? X86::TAILJMPr64_REX : X86::TAILJMPr64))
352+
TII->get(IsX64 ? X86::TAILJMPr64_REX : X86::TAILJMPr64))
353353
.add(JumpTarget);
354354
} else {
355355
JumpTarget.setIsKill();

0 commit comments

Comments
 (0)