[llvm] [IR] Add `llvm.sincos` intrinsic (PR #109825)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 28 04:17:01 PDT 2024
================
@@ -4448,6 +4470,8 @@ void DAGTypeLegalizer::WidenVectorResult(SDNode *N, unsigned ResNo) {
if (!TLI.isOperationLegalOrCustomOrPromote(N->getOpcode(), WideVecVT) &&
TLI.isOperationExpand(N->getOpcode(), VT.getScalarType())) {
Res = DAG.UnrollVectorOp(N, WideVecVT.getVectorNumElements());
+ if (N->getNumValues() == 2)
----------------
sdesmalen-arm wrote:
That seems like an artificial restriction in `UnrollVectorOp`, which may need to be changed in the future. For the code you've written here though, is there any downside to writing `ReplaceOtherWidenResult` more generically? The logic used for each other result would be no different.
I still think this condition should test `> 1`, such that either the code in `ReplaceOtherWidenResult` asserts that the number of values should be 2 because it doesn't handle more result values, or it just handles more than 2 result values.
https://github.com/llvm/llvm-project/pull/109825
More information about the llvm-commits
mailing list