[llvm] [AMDGPU] Emit b32 movs if (a)v_mov_b64_pseudo dest vgprs are misaligned (PR #160547)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 20 05:49:02 PST 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 origin/main HEAD --extensions cpp -- llvm/lib/Target/AMDGPU/SIInstrInfo.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/AMDGPU/SIInstrInfo.cpp b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
index f33c2365c..fbdb14ebe 100644
--- a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
@@ -2132,8 +2132,7 @@ bool SIInstrInfo::expandPostRAPseudo(MachineInstr &MI) const {
Register DstHi = RI.getSubReg(Dst, AMDGPU::sub1);
const MCInstrDesc &Mov64Desc = get(AMDGPU::V_MOV_B64_e32);
- const TargetRegisterClass *Mov64RC =
- getRegClass(Mov64Desc, /*OpNum=*/0);
+ const TargetRegisterClass *Mov64RC = getRegClass(Mov64Desc, /*OpNum=*/0);
const MachineOperand &SrcOp = MI.getOperand(1);
// FIXME: Will this work for 64-bit floating point immediates?
@@ -2149,8 +2148,7 @@ bool SIInstrInfo::expandPostRAPseudo(MachineInstr &MI) const {
APInt Lo(32, Imm.getLoBits(32).getZExtValue());
APInt Hi(32, Imm.getHiBits(32).getZExtValue());
const MCInstrDesc &PkMovDesc = get(AMDGPU::V_PK_MOV_B32);
- const TargetRegisterClass *PkMovRC =
- getRegClass(PkMovDesc, /*OpNum=*/0);
+ const TargetRegisterClass *PkMovRC = getRegClass(PkMovDesc, /*OpNum=*/0);
if (ST.hasPkMovB32() && Lo == Hi && isInlineConstant(Lo) &&
PkMovRC->contains(Dst)) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/160547
More information about the llvm-commits
mailing list