[llvm] [IR] Add `llvm.sincos` intrinsic (PR #109825)

Benjamin Maxwell via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 28 06:07:04 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:

Added an assert at the top of the function :+1: 

https://github.com/llvm/llvm-project/pull/109825


More information about the llvm-commits mailing list