Skip to content

Commit 0440773

Browse files
committed
[llvm][X86] AvoidTrailingCallPass for UEFI
Enable X86AvoidTrailingCallPass for UEFI X86_64 bit target.
1 parent 123758b commit 0440773

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Target/X86/X86AvoidTrailingCall.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ static bool isCallInstruction(const MachineInstr &MI) {
8282
bool X86AvoidTrailingCallPass::runOnMachineFunction(MachineFunction &MF) {
8383
const X86Subtarget &STI = MF.getSubtarget<X86Subtarget>();
8484
const X86InstrInfo &TII = *STI.getInstrInfo();
85-
assert(STI.isTargetWin64() && "pass only runs on Win64");
85+
assert((STI.isTargetWin64() || STI.isTargetUEFI64()) &&
86+
"pass only runs on Win64 and UEFI64");
8687

8788
// We don't need to worry about any of the invariants described above if there
8889
// is no unwind info (CFI).

0 commit comments

Comments
 (0)