re PR target/43897 (IA-64 asm clobbers are ignored)

PR target/43897
	* config/ia64/ia64.c (rtx_needs_barrier): Handle asm CLOBBER
	as a store into that register.

	* gcc.target/ia64/pr43897.c: New test.

From-SVN: r167516
This commit is contained in:
Jakub Jelinek 2010-12-06 20:31:57 +01:00 committed by Jakub Jelinek
parent 1c8b9983c4
commit 628162eabe
4 changed files with 30 additions and 0 deletions

View File

@ -1,5 +1,9 @@
2010-12-06 Jakub Jelinek <jakub@redhat.com>
PR target/43897
* config/ia64/ia64.c (rtx_needs_barrier): Handle asm CLOBBER
as a store into that register.
PR tree-optimization/46528
PR debug/46338
* profile.c (branch_prob): Make sure last is never set to a debug

View File

@ -6320,6 +6320,17 @@ rtx_needs_barrier (rtx x, struct reg_flags flags, int pred)
break;
case CLOBBER:
if (REG_P (XEXP (pat, 0))
&& extract_asm_operands (x) != NULL_RTX
&& REGNO (XEXP (pat, 0)) != AR_UNAT_REGNUM)
{
new_flags.is_write = 1;
need_barrier |= rtx_needs_barrier (XEXP (pat, 0),
new_flags, pred);
new_flags = flags;
}
break;
case RETURN:
break;

View File

@ -1,5 +1,8 @@
2010-12-06 Jakub Jelinek <jakub@redhat.com>
PR target/43897
* gcc.target/ia64/pr43897.c: New test.
PR debug/46771
* gcc.dg/pr46771.c: New test.

View File

@ -0,0 +1,12 @@
/* PR target/43897 */
/* { dg-do assemble } */
/* { dg-options "-O2" } */
int
sub (int i)
{
float tmp;
if (i)
__asm__ __volatile__ ("frcpa.s0 %0,p1=f0,f0":"=f" (tmp)::"p1");
return i + 10;
}