[llvm] [RISCV] Use vcompress in deinterleave2 intrinsic lowering (PR #118325)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 2 09:25:54 PST 2024
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 c6f2d35c4d698deff781366cea46e273ff508693 d1b44a11484f2ef1e8e11c970893a74b8b74f415 --extensions cpp -- llvm/lib/Target/RISCV/RISCVISelLowering.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index 9229ca64a1..3b5402514e 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -10756,7 +10756,6 @@ SDValue RISCVTargetLowering::lowerVECTOR_DEINTERLEAVE(SDValue Op,
SDValue Concat = DAG.getNode(ISD::CONCAT_VECTORS, DL, ConcatVT,
Op.getOperand(0), Op.getOperand(1));
-
// We can deinterleave through vnsrl.wi if the element type is smaller than
// ELEN
if (VecVT.getScalarSizeInBits() < Subtarget.getELen()) {
@@ -10775,12 +10774,12 @@ SDValue RISCVTargetLowering::lowerVECTOR_DEINTERLEAVE(SDValue Op,
MVT IdxVT = ConcatVT.changeVectorElementTypeToInteger();
SDValue StepVec = DAG.getStepVector(DL, IdxVT);
// 0, 1, 0, 1, 0, 1
- SDValue ZeroOnes = DAG.getNode(ISD::AND, DL, IdxVT, StepVec,
- DAG.getConstant(1, DL, IdxVT));
+ SDValue ZeroOnes =
+ DAG.getNode(ISD::AND, DL, IdxVT, StepVec, DAG.getConstant(1, DL, IdxVT));
MVT MaskVT = ConcatVT.changeVectorElementType(MVT::i1);
- SDValue EvenMask = DAG.getSetCC(DL, MaskVT, ZeroOnes,
- DAG.getConstant(0, DL, IdxVT),
- ISD::CondCode::SETEQ);
+ SDValue EvenMask =
+ DAG.getSetCC(DL, MaskVT, ZeroOnes, DAG.getConstant(0, DL, IdxVT),
+ ISD::CondCode::SETEQ);
// Have the later be the not of the former to minimize the live range of
// the index vector since that might be large.
SDValue OddMask = DAG.getLogicalNOT(DL, EvenMask, MaskVT);
@@ -10789,7 +10788,7 @@ SDValue RISCVTargetLowering::lowerVECTOR_DEINTERLEAVE(SDValue Op,
SDValue EvenWide = DAG.getNode(ISD::VECTOR_COMPRESS, DL, ConcatVT, Concat,
EvenMask, DAG.getUNDEF(ConcatVT));
SDValue OddWide = DAG.getNode(ISD::VECTOR_COMPRESS, DL, ConcatVT, Concat,
- OddMask, DAG.getUNDEF(ConcatVT));
+ OddMask, DAG.getUNDEF(ConcatVT));
// Extract the result half of the gather for even and odd
SDValue Even = DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, VecVT, EvenWide,
``````````
</details>
https://github.com/llvm/llvm-project/pull/118325
More information about the llvm-commits
mailing list