OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [sparc/] [combined-2.c] - Blame information for rev 326

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 326 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -mcpu=ultrasparc -mvis" } */
3
typedef unsigned char pixel __attribute__((vector_size(4)));
4
typedef unsigned char vec8 __attribute__((vector_size(8)));
5
typedef short vec16 __attribute__((vector_size(8)));
6
 
7
vec16 foo (pixel a, pixel b) {
8
  vec8 c = __builtin_vis_fpmerge (a, b);
9
  vec16 d = { -1, -1, -1, -1 };
10
  vec16 e = __builtin_vis_fmul8x16 (a, d);
11
 
12
  return e;
13
}
14
 
15
vec16 bar (pixel a) {
16
  vec16 d = { 0, 0, 0, 0 };
17
  vec16 e = __builtin_vis_fmul8x16 (a, d);  /* Mulitplication by 0 = 0.  */
18
 
19
  return e;
20
}
21
 
22
/* { dg-final { scan-assembler "fmul8x16" } } */
23
/* { dg-final { scan-assembler "fzero" } } */

powered by: WebSVN 2.1.0

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