HomePhabricator

[X86] Slightly improve our attempted error recovery for 64-bit -mno-sse2 in…

Authored by craig.topper on Dec 30 2019, 11:41 PM.

Description

[X86] Slightly improve our attempted error recovery for 64-bit -mno-sse2 in LowerCallResult to use FP1 if there are two return values.

If the return value is a struct of 2 doubles we need two return
registers.

If SSE2 is disabled we can't return in XMM registers like the ABI says.
After logging an error we attempt to recover by using FP0 instead
of an XMM register. But if the return needs two registers, we may have
already used FP0. So if the register we were supposed to copy to is
XMM1, copy to FP1 in the recovery instead.

This seems to fix the assertion/crash in PR44413.

Details

Committed
craig.topperDec 31 2019, 12:16 AM
Parents
rG4a6413cd0a8d: [Utils][Fix] Minor test result change
Branches
Unknown
Tags
Unknown