[clang] [RISCV] Convert all floating point vector type operands to integer vector type (PR #69559)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 18 21:19:46 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 817519058a986794e6acc06e4386fa183c4472a0 c61f6fb37e5d8ad0b7dfa68803f5a0161d542867 -- clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/xsfvcp-xv-rv64.c clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/xsfvcp-xv.c clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/xsfvcp-xvv-rv64.c clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/xsfvcp-xvv.c clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated/non-policy/non-overloaded/xsfvcp-xvw.c 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 9b3c1502b..bb25ed9f5 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -7992,22 +7992,25 @@ static SDValue lowerGetVectorLength(SDNode *N, SelectionDAG &DAG,
return DAG.getNode(ISD::INTRINSIC_WO_CHAIN, DL, XLenVT, ID, AVL, Sew, LMul);
}
-static void getVCIXOperands(SDValue &Op, SelectionDAG &DAG, SmallVector<SDValue> &Ops) {
+static void getVCIXOperands(SDValue &Op, SelectionDAG &DAG,
+ SmallVector<SDValue> &Ops) {
SDLoc DL(Op);
- const RISCVSubtarget &Subtarget = DAG.getMachineFunction().getSubtarget<RISCVSubtarget>();
+ const RISCVSubtarget &Subtarget =
+ DAG.getMachineFunction().getSubtarget<RISCVSubtarget>();
for (const SDValue &V : Op->op_values()) {
EVT ValType = V.getValueType();
if (ValType.isFixedLengthVector()) {
- MVT OpContainerVT =
- getContainerForFixedLengthVector(DAG, V.getSimpleValueType(), Subtarget);
+ MVT OpContainerVT = getContainerForFixedLengthVector(
+ DAG, V.getSimpleValueType(), Subtarget);
Ops.push_back(convertToScalableVector(OpContainerVT, V, DAG, Subtarget));
continue;
}
if (ValType.isScalableVector() && ValType.isFloatingPoint()) {
- MVT InterimIVT = MVT::getVectorVT(MVT::getIntegerVT(ValType.getScalarSizeInBits()),
- ValType.getVectorElementCount());
+ MVT InterimIVT =
+ MVT::getVectorVT(MVT::getIntegerVT(ValType.getScalarSizeInBits()),
+ ValType.getVectorElementCount());
Ops.push_back(DAG.getNode(ISD::BITCAST, DL, InterimIVT, V));
} else
Ops.push_back(V);
@@ -8207,8 +8210,7 @@ SDValue RISCVTargetLowering::LowerINTRINSIC_WO_CHAIN(SDValue Op,
if (VT.isFixedLengthVector())
RetVT = getContainerForFixedLengthVector(VT);
- SDValue NewNode =
- DAG.getNode(ISD::INTRINSIC_WO_CHAIN, DL, RetVT, Ops);
+ SDValue NewNode = DAG.getNode(ISD::INTRINSIC_WO_CHAIN, DL, RetVT, Ops);
if (VT.isFixedLengthVector())
NewNode = convertFromScalableVector(VT, NewNode, DAG, Subtarget);
@@ -8521,7 +8523,8 @@ SDValue RISCVTargetLowering::LowerINTRINSIC_VOID(SDValue Op,
SmallVector<SDValue> Ops;
getVCIXOperands(Op, DAG, Ops);
- SDValue NewNode = DAG.getNode(ISD::INTRINSIC_VOID, SDLoc(Op), Op->getVTList(), Ops);
+ SDValue NewNode =
+ DAG.getNode(ISD::INTRINSIC_VOID, SDLoc(Op), Op->getVTList(), Ops);
if (Op == NewNode)
break;
``````````
</details>
https://github.com/llvm/llvm-project/pull/69559
More information about the cfe-commits
mailing list