https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88070
Uroš Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2018-11-18
Target Milestone|--- |7.4
Ever confirmed|0 |1
--- Comment #1 from Uroš Bizjak <ubizjak at gmail dot com> ---
This is the case of scheduler splitting return copy pair:
(insn 19 18 16 2 (set (reg:V2SF 21 xmm0)
(mem/c:V2SF (plus:DI (reg/f:DI 7 sp)
(const_int -72 [0xffffffffffffffb8])) [0 S8 A64]))
"pr88070.c":8 1157 {*movv2sf_internal}
(nil))
(insn 16 19 20 2 (set (reg:V2SF 0 ax [orig:91 <retval> ] [91])
(reg:V2SF 0 ax [89])) "pr88070.c":8 1157 {*movv2sf_internal}
(nil))
(insn 20 16 21 2 (unspec_volatile [
(const_int 0 [0])
] UNSPECV_BLOCKAGE) "pr88070.c":8 710 {blockage}
(nil))
(insn 21 20 23 2 (use (reg:V2SF 21 xmm0)) "pr88070.c":8 -1
(nil))
Please note how (insn 16) interferes with (insn 19)-(insn 21) pair.
I think that the assert is too restrictive for post-reload vzeroupper
insertion. There will be no end of problems, similar to the one above (mainly
due to pre-reload scheduler, or the RA itself), so I guess the following patch,
that relaxes the assert is justified:
--cut here--
Index: mode-switching.c
===================================================================
--- mode-switching.c (revision 266250)
+++ mode-switching.c (working copy)
@@ -431,11 +431,12 @@
}
while (nregs);
- /* If we didn't see a full return value copy, verify that there
- is a plausible reason for this. If some, but not all of the
- return register is likely spilled, we can expect that there
- is a copy for the likely spilled part. */
- gcc_assert (!nregs
+ /* Before reload, if we didn't see a full return value copy,
+ verify that there is a plausible reason for this. If some,
+ but not all of the return register is likely spilled, we can
+ expect that there is a copy for the likely spilled part. */
+ gcc_assert (reload_completed
+ || !nregs
|| forced_late_switch
|| short_block
|| !(targetm.class_likely_spilled_p
--cut here--