Skip to content

Conversation

@Prabhuk
Copy link
Contributor

@Prabhuk Prabhuk commented May 2, 2025

Enable X86AvoidTrailingCallPass for UEFI X86_64 bit target.

Enable X86AvoidTrailingCallPass for UEFI X86_64 bit target.
@llvmbot
Copy link
Member

llvmbot commented May 2, 2025

@llvm/pr-subscribers-backend-x86

Author: Prabhu Rajasekaran (Prabhuk)

Changes

Enable X86AvoidTrailingCallPass for UEFI X86_64 bit target.


Full diff: https://github.com/llvm/llvm-project/pull/138363.diff

1 Files Affected:

  • (modified) llvm/lib/Target/X86/X86AvoidTrailingCall.cpp (+2-1)
diff --git a/llvm/lib/Target/X86/X86AvoidTrailingCall.cpp b/llvm/lib/Target/X86/X86AvoidTrailingCall.cpp
index 2ecf49382d29f..3aea3704c46ed 100644
--- a/llvm/lib/Target/X86/X86AvoidTrailingCall.cpp
+++ b/llvm/lib/Target/X86/X86AvoidTrailingCall.cpp
@@ -82,7 +82,8 @@ static bool isCallInstruction(const MachineInstr &MI) {
 bool X86AvoidTrailingCallPass::runOnMachineFunction(MachineFunction &MF) {
   const X86Subtarget &STI = MF.getSubtarget<X86Subtarget>();
   const X86InstrInfo &TII = *STI.getInstrInfo();
-  assert(STI.isTargetWin64() && "pass only runs on Win64");
+  assert((STI.isTargetWin64() || STI.isTargetUEFI64()) &&
+         "pass only runs on Win64 and UEFI64");
 
   // We don't need to worry about any of the invariants described above if there
   // is no unwind info (CFI).

@petrhosek
Copy link
Member

This change only updates the assertion, where is the part that enables the pass?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants