Skip to content

Commit ecaaebf

Browse files
authored
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.
1 parent 3c2c9d5 commit ecaaebf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33034,12 +33034,13 @@ static SDValue LowerFSINCOS(SDValue Op, const X86Subtarget &Subtarget,
3303433034
DAG.getExternalSymbol(LibcallName, TLI.getPointerTy(DAG.getDataLayout()));
3303533035

3303633036
Type *RetTy = isF64 ? (Type *)StructType::get(ArgTy, ArgTy)
33037-
: (Type *)FixedVectorType::get(ArgTy, 4);
33037+
: (Type *)FixedVectorType::get(ArgTy, 2);
3303833038

3303933039
TargetLowering::CallLoweringInfo CLI(DAG);
3304033040
CLI.setDebugLoc(dl)
3304133041
.setChain(DAG.getEntryNode())
33042-
.setLibCallee(CallingConv::C, RetTy, Callee, std::move(Args));
33042+
.setLibCallee(CallingConv::C, RetTy, Callee, std::move(Args))
33043+
.setIsPostTypeLegalization();
3304333044

3304433045
std::pair<SDValue, SDValue> CallResult = TLI.LowerCallTo(CLI);
3304533046

0 commit comments

Comments
 (0)