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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [wrapv-vect-reduc-pattern-2c.c] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-require-effective-target vect_int } */
2
 
3
#include <stdarg.h>
4
#include "tree-vect.h"
5
 
6
#define N 16
7
signed char data_ch[N] =
8
  { 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28 };
9
#define SUM 210
10
 
11
__attribute__ ((noinline)) int
12
foo ()
13
{
14
  int i;
15
  signed short shortsum = 0;
16
 
17
  /* widenning sum: sum chars into short.  */
18
 
19
  for (i = 0; i < N; i++)
20
    {
21
      shortsum += data_ch[i];
22
    }
23
 
24
  /* check results:  */
25
  if (shortsum != SUM)
26
    abort ();
27
 
28
  return 0;
29
}
30
 
31
int
32
main (void)
33
{
34
  check_vect ();
35
  return foo ();
36
}
37
 
38
/* { dg-final { scan-tree-dump "vect_recog_widen_sum_pattern: detected" "vect" } } */
39
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_widen_sum_qi_to_hi } } } */
40
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { ! vect_widen_sum_qi_to_hi } } } } */
41
/* { 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.