Skip to content

Commit 309302e

Browse files
committed
Fixups
- Test <3 x float> case and fix unrolling - Fix langref nit - Remove redundant tests
1 parent 498a64b commit 309302e

File tree

4 files changed

+101
-718
lines changed

4 files changed

+101
-718
lines changed

llvm/docs/LangRef.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15914,9 +15914,9 @@ The '``llvm.sincos.*``' intrinsics returns the sine and cosine of the operand.
1591415914
Arguments:
1591515915
""""""""""
1591615916

15917-
The argument is a :ref:`floating-point <t_floating>` or :ref:`vector <t_vector>`
15918-
of floating-point values. Returns two values matching the argument type in a
15919-
struct.
15917+
The argument is a :ref:`floating-point <t_floating>` value or
15918+
:ref:`vector <t_vector>` of floating-point values. Returns two values matching
15919+
the argument type in a struct.
1592015920

1592115921
Semantics:
1592215922
""""""""""

llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12531,8 +12531,15 @@ SDValue SelectionDAG::UnrollVectorOp(SDNode *N, unsigned ResNE) {
1253112531
Scalars1.push_back(EltOp.getValue(1));
1253212532
}
1253312533

12534-
SDValue Vec0 = getBuildVector(VT, dl, Scalars0);
12535-
SDValue Vec1 = getBuildVector(VT1, dl, Scalars1);
12534+
for (; i < ResNE; ++i) {
12535+
Scalars0.push_back(getUNDEF(EltVT));
12536+
Scalars1.push_back(getUNDEF(EltVT1));
12537+
}
12538+
12539+
EVT VecVT = EVT::getVectorVT(*getContext(), EltVT, ResNE);
12540+
EVT VecVT1 = EVT::getVectorVT(*getContext(), EltVT1, ResNE);
12541+
SDValue Vec0 = getBuildVector(VecVT, dl, Scalars0);
12542+
SDValue Vec1 = getBuildVector(VecVT1, dl, Scalars1);
1253612543
return getMergeValues({Vec0, Vec1}, dl);
1253712544
}
1253812545

0 commit comments

Comments
 (0)