[llvm] [LFI][AArch64] Refactor LFI rewriter to use MCInstBuilder (PR #219890)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 30 23:20:09 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/Target/AArch64/MCTargetDesc/AArch64MCLFIRewriter.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/AArch64/MCTargetDesc/AArch64MCLFIRewriter.cpp b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCLFIRewriter.cpp
index f5eb2eb98..86c48a5dc 100644
--- a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCLFIRewriter.cpp
+++ b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCLFIRewriter.cpp
@@ -421,11 +421,8 @@ void AArch64MCLFIRewriter::emitAddRegExtend(MCRegister Dest, MCRegister Src1,
unsigned Opcode = ExtType == AArch64_AM::SXTX || ExtType == AArch64_AM::UXTX
? AArch64::ADDXrx64
: AArch64::ADDXrx;
- emitInst(MCInstBuilder(Opcode)
- .addReg(Dest)
- .addReg(Src1)
- .addReg(Src2)
- .addImm(AArch64_AM::getArithExtendImm(ExtType, Shift)),
+ emitInst(MCInstBuilder(Opcode).addReg(Dest).addReg(Src1).addReg(Src2).addImm(
+ AArch64_AM::getArithExtendImm(ExtType, Shift)),
Out, STI);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/219890
More information about the llvm-commits
mailing list