[llvm] [SystemZ] Implement basic `isCopyInstrImpl` (PR #132903)

via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 25 02:29:17 PDT 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 64779455b8f4875c7de690dd4c3e324dbbcb3029 b993e8928cd07c22b90d24dc071d00e47690fe40 --extensions h,cpp -- llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp llvm/lib/Target/SystemZ/SystemZInstrInfo.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp b/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
index ae9bd4b79b..1485233d80 100644
--- a/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
@@ -2317,7 +2317,8 @@ bool SystemZInstrInfo::getConstValDefinedInReg(const MachineInstr &MI,
   return false;
 }
 
-std::optional<DestSourcePair> SystemZInstrInfo::isCopyInstrImpl(const MachineInstr &MI) const {
+std::optional<DestSourcePair>
+SystemZInstrInfo::isCopyInstrImpl(const MachineInstr &MI) const {
   // if MI is a simple single-register copy operation, return operand pair
   if (MI.isMoveReg())
     return DestSourcePair(MI.getOperand(0), MI.getOperand(1));
diff --git a/llvm/lib/Target/SystemZ/SystemZInstrInfo.h b/llvm/lib/Target/SystemZ/SystemZInstrInfo.h
index bfbfcc24d9..de607743b3 100644
--- a/llvm/lib/Target/SystemZ/SystemZInstrInfo.h
+++ b/llvm/lib/Target/SystemZ/SystemZInstrInfo.h
@@ -387,7 +387,8 @@ public:
   bool getConstValDefinedInReg(const MachineInstr &MI, const Register Reg,
                                int64_t &ImmVal) const override;
 
-  std::optional<DestSourcePair> isCopyInstrImpl(const MachineInstr &MI) const override;
+  std::optional<DestSourcePair>
+  isCopyInstrImpl(const MachineInstr &MI) const override;
 };
 
 } // end namespace llvm

``````````

</details>


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


More information about the llvm-commits mailing list