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.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [pr44507.c] - Diff between revs 298 and 338

Only display areas with differences | Details | Blame | View Log

Rev 298 Rev 338
/* { dg-require-effective-target vect_int } */
/* { dg-require-effective-target vect_int } */
 
 
#include <stdlib.h>
#include <stdlib.h>
#include "tree-vect.h"
#include "tree-vect.h"
 
 
int seeIf256ByteArrayIsConstant(
int seeIf256ByteArrayIsConstant(
  unsigned char *pArray)
  unsigned char *pArray)
{
{
  int index;
  int index;
  unsigned int curVal, orVal, andVal;
  unsigned int curVal, orVal, andVal;
  int bytesAreEqual = 0;
  int bytesAreEqual = 0;
 
 
  if (pArray != 0)
  if (pArray != 0)
    {
    {
      for (index = 0, orVal = 0, andVal = 0xFFFFFFFF;
      for (index = 0, orVal = 0, andVal = 0xFFFFFFFF;
           index < 64;
           index < 64;
           index += (int)sizeof(unsigned int))
           index += (int)sizeof(unsigned int))
        {
        {
          curVal = *((unsigned int *)(&pArray[index]));
          curVal = *((unsigned int *)(&pArray[index]));
          orVal = orVal | curVal;
          orVal = orVal | curVal;
          andVal = andVal & curVal;
          andVal = andVal & curVal;
        }
        }
 
 
      if (!((orVal == andVal)
      if (!((orVal == andVal)
            && ((orVal >> 8) == (andVal & 0x00FFFFFF))))
            && ((orVal >> 8) == (andVal & 0x00FFFFFF))))
        abort ();
        abort ();
    }
    }
 
 
  return 0;
  return 0;
}
}
 
 
 
 
int main(int argc, char** argv)
int main(int argc, char** argv)
{
{
  unsigned char array1[64] = {
  unsigned char array1[64] = {
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
    0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
  };
  };
 
 
  argv = argv;
  argv = argv;
  argc = argc;
  argc = argc;
 
 
  check_vect ();
  check_vect ();
 
 
  return seeIf256ByteArrayIsConstant(&array1[0]);
  return seeIf256ByteArrayIsConstant(&array1[0]);
}
}
 
 
/* { dg-final { cleanup-tree-dump "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
 
 
 
 

powered by: WebSVN 2.1.0

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