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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [20030807-10.c] - Rev 816

Compare with Previous | Blame | View Log

/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-vrp1" } */
 
 
extern const unsigned char mode_size[];
unsigned int
subreg_highpart_offset (outermode, innermode)
     int outermode, innermode;
{
  unsigned int offset = 0;
  int difference = (mode_size[innermode] - mode_size[outermode]);
  if (difference > 0)
    {
        offset += difference % (0 ? 8 : 4);
	offset += difference / 4 * 4;
    }
  return offset;
}
 
/* There should be one mask with the value 3.  */
/* { dg-final { scan-tree-dump-times " \& 3" 1 "vrp1"} } */
 
/* There should be one right shift by 2 places.  */
/* { dg-final { scan-tree-dump-times " >> 2" 1 "vrp1"} } */
 
/* { dg-final { cleanup-tree-dump "vrp1" } } */
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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