[llvm] [RISCV] Strip W suffix from ADDIW, SRLIW, and SRAIW (PR #68425)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 6 08:44:52 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 ffdae1a11786b482104371defffe2e5772fbf0b1 0606f00b16c76c059e78dc8f57c01db40dbac621 -- llvm/lib/Target/RISCV/RISCVOptWInstrs.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/RISCV/RISCVOptWInstrs.cpp b/llvm/lib/Target/RISCV/RISCVOptWInstrs.cpp
index 3a756db97..73583419b 100644
--- a/llvm/lib/Target/RISCV/RISCVOptWInstrs.cpp
+++ b/llvm/lib/Target/RISCV/RISCVOptWInstrs.cpp
@@ -662,11 +662,17 @@ bool RISCVOptWInstrs::stripWSuffixes(MachineFunction &MF,
default:
continue;
case RISCV::ADDW: Opc = RISCV::ADD; break;
- case RISCV::ADDIW: Opc = RISCV::ADDI; break;
+ case RISCV::ADDIW:
+ Opc = RISCV::ADDI;
+ break;
case RISCV::MULW: Opc = RISCV::MUL; break;
case RISCV::SLLIW: Opc = RISCV::SLLI; break;
- case RISCV::SRLIW: Opc = RISCV::SRLI; break;
- case RISCV::SRAIW: Opc = RISCV::SRAI; break;
+ case RISCV::SRLIW:
+ Opc = RISCV::SRLI;
+ break;
+ case RISCV::SRAIW:
+ Opc = RISCV::SRAI;
+ break;
}
if (hasAllWUsers(MI, ST, MRI)) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/68425
More information about the llvm-commits
mailing list