[llvm] r372197 - [X86] Prevent assertion when calling a function that returns double with -mno-sse2 on x86-64.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 17 18:57:46 PDT 2019
Author: ctopper
Date: Tue Sep 17 18:57:46 2019
New Revision: 372197
URL: http://llvm.org/viewvc/llvm-project?rev=372197&view=rev
Log:
[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
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=372197&r1=372196&r2=372197&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Sep 17 18:57:46 2019
@@ -2900,6 +2900,10 @@ SDValue X86TargetLowering::LowerCallResu
((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
More information about the llvm-commits
mailing list