Skip to content

Commit 5a1da25

Browse files
committed
Fixups
- Test <3 x float> case and fix unrolling - Fix langref nit - Remove redundant tests
1 parent d44e4d9 commit 5a1da25

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
@@ -12534,8 +12534,15 @@ SDValue SelectionDAG::UnrollVectorOp(SDNode *N, unsigned ResNE) {
1253412534
Scalars1.push_back(EltOp.getValue(1));
1253512535
}
1253612536

12537-
SDValue Vec0 = getBuildVector(VT, dl, Scalars0);
12538-
SDValue Vec1 = getBuildVector(VT1, dl, Scalars1);
12537+
for (; i < ResNE; ++i) {
12538+
Scalars0.push_back(getUNDEF(EltVT));
12539+
Scalars1.push_back(getUNDEF(EltVT1));
12540+
}
12541+
12542+
EVT VecVT = EVT::getVectorVT(*getContext(), EltVT, ResNE);
12543+
EVT VecVT1 = EVT::getVectorVT(*getContext(), EltVT1, ResNE);
12544+
SDValue Vec0 = getBuildVector(VecVT, dl, Scalars0);
12545+
SDValue Vec1 = getBuildVector(VecVT1, dl, Scalars1);
1253912546
return getMergeValues({Vec0, Vec1}, dl);
1254012547
}
1254112548

0 commit comments

Comments
 (0)