Commit 71aca5a0 by Alan Modra Committed by Alan Modra

[RS6000] Fix ICE caused by rs6000_savres_strategy thinko

rev 235672 (git cffc0b35) changed the condition for SAVE_MULTIPLE/
STORE_MULTIPLE, wrongly allowing a single reg.

gcc/
	* config/rs6000/rs6000.c (rs6000_savres_strategy): Correct condition
	for SAVE_MULTIPLE/STORE_MULTIPLE.
gcc/testsuite/
	* gcc.target/powerpc/savres.c: Add func using a single gpr.

From-SVN: r235820
parent 2fd70ec1
2016-05-03 Alan Modra <amodra@gmail.com>
* config/rs6000/rs6000.c (rs6000_savres_strategy): Correct condition
for SAVE_MULTIPLE/STORE_MULTIPLE.
2016-05-03 Jakub Jelinek <jakub@redhat.com>
* config/i386/i386.md (*truncdfsf_mixed, *truncdfsf_i387,
......
......@@ -23425,7 +23425,7 @@ rs6000_savres_strategy (rs6000_stack_t *info,
if (TARGET_MULTIPLE
&& !TARGET_POWERPC64
&& !(TARGET_SPE_ABI && info->spe_64bit_regs_used)
&& info->first_gp_reg_save != 32)
&& info->first_gp_reg_save < 31)
{
/* Prefer store multiple for saves over out-of-line routines,
since the store-multiple instruction will always be smaller. */
2016-05-03 Alan Modra <amodra@gmail.com>
* gcc.target/powerpc/savres.c: Add func using a single gpr.
2016-05-03 Jakub Jelinek <jakub@redhat.com>
* gcc.target/i386/avx512f-cvt-1.c: New test.
......
......@@ -441,6 +441,16 @@ void s_r (void)
__asm __volatile ("#%0" : "=m" (a) : : "r30", "r31");
}
void s_r31 (void)
{
char a[33];
#ifndef NO_BODY
TRASH_GPR (r31);
__asm__ __volatile__ ("#%0" : : "r" (r31));
#endif
__asm __volatile ("#%0" : "=m" (a) : : "r31");
}
void s_c (void)
{
char a[33];
......@@ -1140,6 +1150,8 @@ int main (void)
VERIFY_REGS;
s_r ();
VERIFY_REGS;
s_r31 ();
VERIFY_REGS;
s_c ();
VERIFY_REGS;
s_0 ();
......
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