Commit 4298c66b by Jan Hubicka Committed by Jan Hubicka

i386-cadd.c: New test.

	* gcc.dg/i386-cadd.c: New test.
	* gcc.dg/i386-cmov4.c: Likewise.

From-SVN: r61039
parent 7b52eede
Wed Jan 8 11:41:47 CET 2003 Jan Hubicka <jh@suse.cz>
* gcc.dg/i386-cadd.c: New test.
* gcc.dg/i386-cmov4.c: Likewise.
2003-01-06 Mark Mitchell <mark@codesourcery.com>
PR c++/9165
......
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 -march=athlon" } */
/* { dg-final { scan-assembler "sbb" } } */
/* Conditional increment is best done using sbb $-1, val. */
int t[]={0,0,0,0,1,1,1,1,1,1};
q()
{
int sum=0;
int i;
for (i=0;i<10;i++)
if (t[i])
sum++;
if (sum != 6)
abort ();
}
main()
{
int i;
for (i=0;i<10000000;i++)
q();
}
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 -march=athlon" } */
/* { dg-final { scan-assembler "cmov" } } */
/* Verify that if conversion happends for memory references. */
int ARCHnodes;
int *nodekind;
float *nodekindf;
t()
{
int i;
/* Redefine nodekind to be 1 for all surface nodes */
for (i = 0; i < ARCHnodes; i++) {
nodekind[i] = (int) nodekindf[i];
if (nodekind[i] == 3)
nodekind[i] = 1;
}
}
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