[llvm] [RISCV][P-ext] Use pli.b when only the lower 2 bytes are used. (PR #192400)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 15 23:28:19 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/RISCV/RISCVISelDAGToDAG.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/RISCV/RISCVISelDAGToDAG.cpp b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
index acdb05ae5..e42876981 100644
--- a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
@@ -1153,8 +1153,8 @@ void RISCVDAGToDAGISel::Select(SDNode *Node) {
if (VT == MVT::i64 && Subtarget->hasStdExtP() && isApplicableToPLI(Imm) &&
hasAllWUsers(Node)) {
- // If it's 4 packed 8-bit integers or 2 packed signed 16-bit integers, we
- // can simply copy lower 32 bits to higher 32 bits to make it able to
+ // If it's 4 packed 8-bit integers or 2 packed signed 16-bit integers,
+ // we can simply copy lower 32 bits to higher 32 bits to make it able to
// rematerialize to PLI_B or PLI_H
Imm = ((uint64_t)Imm << 32) | (Imm & 0xFFFFFFFF);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/192400
More information about the llvm-commits
mailing list