[llvm] [IR] Add `llvm.sincos` intrinsic (PR #109825)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 28 03:11:45 PDT 2024
================
@@ -4429,6 +4435,22 @@ SDValue DAGTypeLegalizer::SplitVecOp_VECTOR_HISTOGRAM(SDNode *N) {
// Result Vector Widening
//===----------------------------------------------------------------------===//
+void DAGTypeLegalizer::ReplaceOtherWidenResult(SDNode *N, SDNode *WidenNode,
+ unsigned WidenResNo) {
+ assert(N->getNumValues() == 2 && "expected node with two results");
+ unsigned OtherNo = 1 - WidenResNo;
+ EVT OtherVT = N->getValueType(OtherNo);
+ if (getTypeAction(OtherVT) == TargetLowering::TypeWidenVector) {
+ SetWidenedVector(SDValue(N, OtherNo), SDValue(WidenNode, OtherNo));
+ } else {
----------------
MacDue wrote:
Every `_UnaryOpWithTwoResults` method currently assumes both results are vectors (of the same element count), which has to hold for both `FSINCOS` and `FREXPR`. I'm not sure it should be further generalized while there are no nodes with mismatched values. Maybe the name could be changed to make this assumption explicit?
https://github.com/llvm/llvm-project/pull/109825
More information about the llvm-commits
mailing list