X86: Correct IR type used for sincos_stret return value (#166240)
Match the IR type that clang uses here: https://godbolt.org/z/KzbodEcxh
This was manually selecting the IR legal type. Instead just set the
flag to ensure legal types.
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 2970cf4..b97b508 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -33034,12 +33034,13 @@
DAG.getExternalSymbol(LibcallName, TLI.getPointerTy(DAG.getDataLayout()));
Type *RetTy = isF64 ? (Type *)StructType::get(ArgTy, ArgTy)
- : (Type *)FixedVectorType::get(ArgTy, 4);
+ : (Type *)FixedVectorType::get(ArgTy, 2);
TargetLowering::CallLoweringInfo CLI(DAG);
CLI.setDebugLoc(dl)
.setChain(DAG.getEntryNode())
- .setLibCallee(CallingConv::C, RetTy, Callee, std::move(Args));
+ .setLibCallee(CallingConv::C, RetTy, Callee, std::move(Args))
+ .setIsPostTypeLegalization();
std::pair<SDValue, SDValue> CallResult = TLI.LowerCallTo(CLI);