re PR rtl-optimization/60663 (Errors out on valid inline asm)

PR rtl-optimization/60663
	* cse.c (cse_insn): Set src_volatile on ASM_OPERANDS in
	PARALLEL.

	* gcc.target/arm/pr60663.c: New test.

From-SVN: r209293
This commit is contained in:
Jakub Jelinek 2014-04-11 12:11:01 +02:00 committed by Jakub Jelinek
parent f8e6f6bad7
commit d8d6ea53a7
4 changed files with 29 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2014-04-11 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/60663
* cse.c (cse_insn): Set src_volatile on ASM_OPERANDS in
PARALLEL.
2014-04-10 Jan Hubicka <hubicka@ucw.cz> 2014-04-10 Jan Hubicka <hubicka@ucw.cz>
Jakub Jelinek <jakub@redhat.com> Jakub Jelinek <jakub@redhat.com>

View File

@ -4642,6 +4642,13 @@ cse_insn (rtx insn)
&& REGNO (dest) >= FIRST_PSEUDO_REGISTER) && REGNO (dest) >= FIRST_PSEUDO_REGISTER)
sets[i].src_volatile = 1; sets[i].src_volatile = 1;
/* Also do not record result of a non-volatile inline asm with
more than one result or with clobbers, we do not want CSE to
break the inline asm apart. */
else if (GET_CODE (src) == ASM_OPERANDS
&& GET_CODE (x) == PARALLEL)
sets[i].src_volatile = 1;
#if 0 #if 0
/* It is no longer clear why we used to do this, but it doesn't /* It is no longer clear why we used to do this, but it doesn't
appear to still be needed. So let's try without it since this appear to still be needed. So let's try without it since this

View File

@ -1,3 +1,8 @@
2014-04-11 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/60663
* gcc.target/arm/pr60663.c: New test.
2014-04-10 Jason Merrill <jason@redhat.com> 2014-04-10 Jason Merrill <jason@redhat.com>
* g++.dg/dso/dlclose1.C: Disable for 4.9. * g++.dg/dso/dlclose1.C: Disable for 4.9.

View File

@ -0,0 +1,11 @@
/* PR rtl-optimization/60663 */
/* { dg-do compile } */
/* { dg-options "-O2 -march=armv7-a" } */
int
foo (void)
{
unsigned i, j;
asm ("%0 %1" : "=r" (i), "=r" (j));
return i;
}