[llvm] [CodeGen] Avoid potential sideeffects from XOR (PR #67193)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 26 12:01:11 PDT 2023
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 feb7b1914d513c709b9e024dfed709bb889cc853 39a76d2db07f4c6eda9a0227da28d575553f7f6f -- llvm/include/llvm/CodeGen/TargetInstrInfo.h llvm/lib/Target/AArch64/AArch64InstrInfo.cpp llvm/lib/Target/AArch64/AArch64InstrInfo.h llvm/lib/Target/X86/X86InstrInfo.cpp llvm/lib/Target/X86/X86InstrInfo.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
index 1faf0d73f5aa..a5c3c27a1c0e 100644
--- a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+++ b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
@@ -9073,16 +9073,11 @@ void AArch64InstrInfo::buildClearRegister(Register Reg, MachineBasicBlock &MBB,
const AArch64RegisterInfo &TRI = *STI.getRegisterInfo();
if (TRI.isGeneralPurposeRegister(MF, Reg)) {
- BuildMI(MBB, Iter, DL, get(AArch64::MOVZXi), Reg)
- .addImm(0)
- .addImm(0);
+ BuildMI(MBB, Iter, DL, get(AArch64::MOVZXi), Reg).addImm(0).addImm(0);
} else if (STI.hasSVE()) {
- BuildMI(MBB, Iter, DL, get(AArch64::DUP_ZI_D), Reg)
- .addImm(0)
- .addImm(0);
+ BuildMI(MBB, Iter, DL, get(AArch64::DUP_ZI_D), Reg).addImm(0).addImm(0);
} else {
- BuildMI(MBB, Iter, DL, get(AArch64::MOVIv2d_ns), Reg)
- .addImm(0);
+ BuildMI(MBB, Iter, DL, get(AArch64::MOVIv2d_ns), Reg).addImm(0);
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/67193
More information about the llvm-commits
mailing list