Commit 59730cc5 by Uros Bizjak Committed by Uros Bizjak

re PR target/88070 (ICE in create_pre_exit, at mode-switching.c:438)

	PR target/88070
	* mode-switching.c (create_pre_exit): After reload, always split the
	fallthrough edge to the exit block.

testsuite/ChangeLog:

	PR target/88070
	* gcc.target/i386/pr88070.c: New test.

From-SVN: r266326
parent 012b51cf
2018-11-20 Uros Bizjak <ubizjak@gmail.com>
PR target/88070
* mode-switching.c (create_pre_exit): After reload, always split the
fallthrough edge to the exit block.
2018-11-20 Jan Hubicka <hubicka@ucw.cz> 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
* ipa-devirt.c (add_type_duplicate): Do not ICE on incomplete enums. * ipa-devirt.c (add_type_duplicate): Do not ICE on incomplete enums.
...@@ -248,8 +248,22 @@ create_pre_exit (int n_entities, int *entity_map, const int *num_modes) ...@@ -248,8 +248,22 @@ create_pre_exit (int n_entities, int *entity_map, const int *num_modes)
gcc_assert (!pre_exit); gcc_assert (!pre_exit);
/* If this function returns a value at the end, we have to /* If this function returns a value at the end, we have to
insert the final mode switch before the return value copy insert the final mode switch before the return value copy
to its hard register. */ to its hard register.
if (EDGE_COUNT (EXIT_BLOCK_PTR_FOR_FN (cfun)->preds) == 1
x86 targets use mode-switching infrastructure to
conditionally insert vzeroupper instruction at the exit
from the function where there is no need to switch the
mode before the return value copy. The vzeroupper insertion
pass runs after reload, so use !reload_completed as a stand-in
for x86 to skip the search for the return value copy insn.
N.b.: the code below assumes that the return copy insn
immediately precedes its corresponding use insn. This
assumption does not hold after reload, since sched1 pass
can schedule the return copy insn away from its
corresponding use insn. */
if (!reload_completed
&& EDGE_COUNT (EXIT_BLOCK_PTR_FOR_FN (cfun)->preds) == 1
&& NONJUMP_INSN_P ((last_insn = BB_END (src_bb))) && NONJUMP_INSN_P ((last_insn = BB_END (src_bb)))
&& GET_CODE (PATTERN (last_insn)) == USE && GET_CODE (PATTERN (last_insn)) == USE
&& GET_CODE ((ret_reg = XEXP (PATTERN (last_insn), 0))) == REG) && GET_CODE ((ret_reg = XEXP (PATTERN (last_insn), 0))) == REG)
......
2018-11-20 Uros Bizjak <ubizjak@gmail.com>
PR target/88070
* gcc.target/i386/pr88070.c: New test.
2018-11-20 Andreas Krebbel <krebbel@linux.ibm.com> 2018-11-20 Andreas Krebbel <krebbel@linux.ibm.com>
* gcc.target/s390/flogr-1.c: New test. * gcc.target/s390/flogr-1.c: New test.
......
/* PR target/88070 */
/* { dg-do compile } */
/* { dg-options "-O -fexpensive-optimizations -fnon-call-exceptions -fschedule-insns -fno-dce -fno-dse -mavx" } */
typedef float vfloat2 __attribute__ ((__vector_size__ (2 * sizeof (float))));
vfloat2
test1float2 (float c)
{
vfloat2 v = { c, c };
return v;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment