[clang] [llvm] [win][x64] Fix import call optimization for calls to dllimports and global function pointers (PR #160604)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 12 09:47:57 PST 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- clang/test/CodeGenCXX/microsoft-abi-eh-ip2state.cpp llvm/lib/Target/X86/X86ExpandPseudo.cpp llvm/lib/Target/X86/X86FastISel.cpp llvm/lib/Target/X86/X86MCInstLower.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/X86/X86MCInstLower.cpp b/llvm/lib/Target/X86/X86MCInstLower.cpp
index bb4790f57..614703810 100644
--- a/llvm/lib/Target/X86/X86MCInstLower.cpp
+++ b/llvm/lib/Target/X86/X86MCInstLower.cpp
@@ -2591,11 +2591,11 @@ void X86AsmPrinter::emitInstruction(const MachineInstr *MI) {
emitCallInstruction(TmpInst);
// MSVC Linker is *very* picky about the exact nop to use.
EmitAndCountInstruction(MCInstBuilder(X86::NOOPL)
- .addReg(X86::RAX)
- .addImm(1)
- .addReg(X86::RAX)
- .addImm(0)
- .addReg(0));
+ .addReg(X86::RAX)
+ .addImm(1)
+ .addReg(X86::RAX)
+ .addImm(0)
+ .addReg(0));
maybeEmitNopAfterCallForWindowsEH(MI);
return;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/160604
More information about the llvm-commits
mailing list