Skip to content

Commit

Permalink
Fixups
Browse files Browse the repository at this point in the history
- Test <3 x float> case and fix unrolling
- Fix langref nit
- Remove redundant tests
  • Loading branch information
MacDue committed Oct 18, 2024
1 parent 498a64b commit 309302e
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 718 deletions.
6 changes: 3 additions & 3 deletions llvm/docs/LangRef.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15914,9 +15914,9 @@ The '``llvm.sincos.*``' intrinsics returns the sine and cosine of the operand.
Arguments:
""""""""""

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

Semantics:
""""""""""
Expand Down
11 changes: 9 additions & 2 deletions llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12531,8 +12531,15 @@ SDValue SelectionDAG::UnrollVectorOp(SDNode *N, unsigned ResNE) {
Scalars1.push_back(EltOp.getValue(1));
}

SDValue Vec0 = getBuildVector(VT, dl, Scalars0);
SDValue Vec1 = getBuildVector(VT1, dl, Scalars1);
for (; i < ResNE; ++i) {
Scalars0.push_back(getUNDEF(EltVT));
Scalars1.push_back(getUNDEF(EltVT1));
}

EVT VecVT = EVT::getVectorVT(*getContext(), EltVT, ResNE);
EVT VecVT1 = EVT::getVectorVT(*getContext(), EltVT1, ResNE);
SDValue Vec0 = getBuildVector(VecVT, dl, Scalars0);
SDValue Vec1 = getBuildVector(VecVT1, dl, Scalars1);
return getMergeValues({Vec0, Vec1}, dl);
}

Expand Down
Loading

0 comments on commit 309302e

Please sign in to comment.