[llvm] [X86] Resolve FIXME: Copy kill flag for eflags (PR #82411)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 21 16:23:34 PST 2024
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 640e781dc87bdb74e14a66c89e54417e60150904 f5fda254fae5b113e31d64ac554a18c702909ea0 -- llvm/lib/Target/X86/X86FlagsCopyLowering.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/X86/X86FlagsCopyLowering.cpp b/llvm/lib/Target/X86/X86FlagsCopyLowering.cpp
index 79ade7ae4c..a4780ebae0 100644
--- a/llvm/lib/Target/X86/X86FlagsCopyLowering.cpp
+++ b/llvm/lib/Target/X86/X86FlagsCopyLowering.cpp
@@ -467,7 +467,8 @@ bool X86FlagsCopyLoweringPass::runOnMachineFunction(MachineFunction &MF) {
llvm::reverse(llvm::make_range(Begin, End)), [&](MachineInstr &MI) {
// Flag any instruction (other than the copy we are
// currently rewriting) that defs EFLAGS.
- return &MI != CopyI && MI.findRegisterDefOperand(X86::EFLAGS, false, false, TRI);
+ return &MI != CopyI &&
+ MI.findRegisterDefOperand(X86::EFLAGS, false, false, TRI);
});
};
auto HasEFLAGSClobberPath = [&](MachineBasicBlock *BeginMBB,
@@ -587,7 +588,8 @@ bool X86FlagsCopyLoweringPass::runOnMachineFunction(MachineFunction &MF) {
break;
}
- MachineOperand *FlagUse = MI.findRegisterUseOperand(X86::EFLAGS, false, TRI);
+ MachineOperand *FlagUse =
+ MI.findRegisterUseOperand(X86::EFLAGS, false, TRI);
if (!FlagUse) {
if (MI.findRegisterDefOperand(X86::EFLAGS, false, false, TRI)) {
// If EFLAGS are defined, it's as-if they were killed. We can stop
``````````
</details>
https://github.com/llvm/llvm-project/pull/82411
More information about the llvm-commits
mailing list