[llvm] [PowerPC] extend smaller splats into bigger splats (PR #141282)
via llvm-commits
llvm-commits at lists.llvm.org
Fri May 23 12:03:18 PDT 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 HEAD~1 HEAD --extensions cpp -- llvm/lib/Target/PowerPC/PPCISelLowering.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
index 5bc2ea0cf..11fe836af 100644
--- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -9673,8 +9673,8 @@ SDValue PPCTargetLowering::LowerBUILD_VECTOR(SDValue Op,
SextVal = SignExtend32(SplatBits, SplatBitSize);
} else if (SplatBitSize == 64) {
int64_t Splat64Val = APSplatBits.getSExtValue();
- SplatBits = (uint64_t) Splat64Val;
- SextVal = (int32_t) SplatBits;
+ SplatBits = (uint64_t)Splat64Val;
+ SextVal = (int32_t)SplatBits;
bool P9Vector = Subtarget.hasP9Vector();
int32_t Hi = P9Vector ? 127 : 15;
int32_t Lo = P9Vector ? -128 : -16;
@@ -9814,7 +9814,7 @@ SDValue PPCTargetLowering::LowerBUILD_VECTOR(SDValue Op,
// Two instruction sequences.
if (Subtarget.hasP9Vector() && SextVal >= -128 && SextVal <= 127) {
- SDValue C = DAG.getConstant((unsigned char) SextVal, dl, MVT::i32);
+ SDValue C = DAG.getConstant((unsigned char)SextVal, dl, MVT::i32);
SmallVector<SDValue, 16> Ops(16, C);
SDValue BV = DAG.getBuildVector(MVT::v16i8, dl, Ops);
assert((SplatSize == 2 || SplatSize == 4 || SplatSize == 8) &&
``````````
</details>
https://github.com/llvm/llvm-project/pull/141282
More information about the llvm-commits
mailing list