OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [scev-cast.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* A test for various conversions of chrecs.  */
2
 
3
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
4
/* { dg-options "-O2 -fdump-tree-optimized" } */
5
 
6
void blas (signed char xxx);
7
void blau (unsigned char xxx);
8
 
9
void tst(void)
10
{
11
  unsigned i;
12
 
13
  for (i = 0; i < 129; i++) /* This truncation to char has to be preserved.  */
14
    blas ((signed char) i);
15
  for (i = 0; i < 128; i++) /* This one is not necessary, VRP eliminates it.  */
16
    blas ((signed char) i);
17
  for (i = 0; i < 127; i++) /* This one is not necessary, IVOPTS eliminates it.  */
18
    blas ((signed char) i);
19
  for (i = 0; i < 256; i++) /* This one is not necessary, VRP eliminates it.  */
20
    blau ((unsigned char) i);
21
  for (i = 0; i < 257; i++) /* This one is necessary.  */
22
    blau ((unsigned char) i);
23
}
24
 
25
/* { dg-final { scan-tree-dump-times "& 255" 1 "optimized" } } */
26
/* { dg-final { scan-tree-dump-times "= \\(signed char\\)" 1 "optimized" } } */
27
 
28
/* { dg-final { cleanup-tree-dump "optimized" } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.