[llvm] [X86][CodeGen] Preserve XMM liveness across VZEROUPPER and check reg clobbers in RemoveLoadsIntoFakeUses (#214068) (PR #218873)

via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 26 03:03:53 PDT 2026


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 -- llvm/lib/CodeGen/RemoveLoadsIntoFakeUses.cpp llvm/lib/Target/X86/X86InsertVZeroUpper.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/X86InsertVZeroUpper.cpp b/llvm/lib/Target/X86/X86InsertVZeroUpper.cpp
index 87496f867..f81f7fbaf 100644
--- a/llvm/lib/Target/X86/X86InsertVZeroUpper.cpp
+++ b/llvm/lib/Target/X86/X86InsertVZeroUpper.cpp
@@ -170,8 +170,7 @@ static bool callHasRegMask(MachineInstr &MI) {
 
 /// Insert a vzeroupper instruction before I.
 static bool insertVZeroUpper(MachineBasicBlock::iterator I,
-                             MachineBasicBlock &MBB,
-                             const TargetInstrInfo *TII,
+                             MachineBasicBlock &MBB, const TargetInstrInfo *TII,
                              const TargetRegisterInfo *TRI) {
   MachineInstrBuilder MIB =
       BuildMI(MBB, I, I->getDebugLoc(), TII->get(X86::VZEROUPPER));
@@ -334,7 +333,7 @@ static bool insertVZeroUpper(MachineFunction &MF) {
   // DirtySuccessors list.
   for (MachineBasicBlock &MBB : MF)
     EverMadeChange |= processBasicBlock(MBB, BlockStates, DirtySuccessors,
-                                          IsX86INTR, TII, TRI);
+                                        IsX86INTR, TII, TRI);
 
   // If any YMM/ZMM regs are live-in to this function, add the entry block to
   // the DirtySuccessors list

``````````

</details>


https://github.com/llvm/llvm-project/pull/218873


More information about the llvm-commits mailing list