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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc4/] [gcc/] [testsuite/] [gcc.target/] [mips/] [truncate-6.c] - Rev 519

Compare with Previous | Blame | View Log

/* setup_incoming_promotions should detect x to be already sign-extended due
   to PROMOTE_MODE.  Thus the truncation should be removed by combine.  Based
   on gcc.c-torture/execute/pr34070-2.c.  */
/* { dg-options "-O -mgp64" } */
/* { dg-final { scan-assembler-not "\tsll\t\[^\n\]*,0" } } */
 
NOMIPS16 int f(unsigned int x, int n, int *p)
{
  if (p)
    *p = 1;
  return ((int)x) / (1 << n);
}
 

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.