1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00

[X86] Prevent assertion when calling a function that returns double with -mno-sse2 on x86-64.

As seen in the most recent updates to PR10498

llvm-svn: 372197
This commit is contained in:
Craig Topper 2019-09-18 01:57:46 +00:00
parent e75b4debb9
commit 2ad85d1f47

View File

@ -2900,6 +2900,10 @@ SDValue X86TargetLowering::LowerCallResult(
((Is64Bit || Ins[InsIndex].Flags.isInReg()) && !Subtarget.hasSSE1())) {
errorUnsupported(DAG, dl, "SSE register return with SSE disabled");
VA.convertToReg(X86::FP0); // Set reg to FP0, avoid hitting asserts.
} else if (CopyVT == MVT::f64 &&
(Is64Bit && !Subtarget.hasSSE2())) {
errorUnsupported(DAG, dl, "SSE2 register return with SSE2 disabled");
VA.convertToReg(X86::FP0); // Set reg to FP0, avoid hitting asserts.
}
// If we prefer to use the value in xmm registers, copy it out as f80 and