OSDN Git Service

[X86] Break the loop in LowerReturn into 2 loops. NFCI
authorCraig Topper <craig.topper@intel.com>
Fri, 24 Jan 2020 22:35:15 +0000 (14:35 -0800)
committerCraig Topper <craig.topper@intel.com>
Fri, 24 Jan 2020 22:44:38 +0000 (14:44 -0800)
commit2c1decc040db57ef05ff2e02f9f96131632edf79
treec33e3f978383aeb5ef9b533d035558f24919bf92
parent70cbf8c71c510077baadcad305fea6f62e830b06
[X86] Break the loop in LowerReturn into 2 loops. NFCI

I believe for STRICT_FP I need to use a STRICT_FP_EXTEND for the extending to f80 for returning f32/f64 in 32-bit mode when SSE is enabled. The STRICT_FP_EXTEND node requires a Chain. I need to get that node onto the chain before any CopyToRegs are emitted. This is because all the CopyToRegs are glued and chained together. So I can't put a STRICT_FP_EXTEND on the chain between the glued nodes without also glueing the STRICT_ FP_EXTEND.

This patch moves all the extend creation to a first pass and then creates the copytoregs and fills out RetOps in a second pass.

Differential Revision: https://reviews.llvm.org/D72665
llvm/lib/Target/X86/X86ISelLowering.cpp