File: forwprop-27.c

package info (click to toggle)
gcc-riscv64-unknown-elf 8.3.0.2019.08%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 680,956 kB
  • sloc: ansic: 3,237,715; cpp: 896,882; ada: 772,854; f90: 144,254; asm: 68,788; makefile: 67,456; sh: 29,743; exp: 28,045; objc: 15,273; fortran: 11,885; python: 7,369; pascal: 5,375; awk: 3,725; perl: 2,872; yacc: 316; xml: 311; ml: 285; lex: 198; haskell: 122
file content (39 lines) | stat: -rw-r--r-- 749 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-forwprop1" } */

typedef int V __attribute__((vector_size(2*sizeof(int))));
typedef __complex__ int C;

void f (V *v1, V *v2){
  V w1 = *v1;
  V x1 = ~w1;
  *v1 = x1 + 1;
  V w2 = *v2;
  V x2 = ~w2;
  *v2 = x2 + w2;
}

void g (V *v1, V *v2){
  V c1 = { 5, -10 };
  V c2 = { 32, 13 };
  *v1 = (*v1|c1)&c2;
  *v2 = (*v2^c1)^c2;
}

void h (C *v1, C *v2){
  C w = *v2;
  C x = *v1 - w;
  *v1 = x + w;
}

void i (V *v1, V *v2){
  V c1 = { 5, -10 };
  V c2 = { 32, 13 };
  *v1 = (*v1-c1)+c2;
  *v2 = (c1-*v2)+c2;
}

/* { dg-final { scan-tree-dump-not "\\\+" "forwprop1"} } */
/* { dg-final { scan-tree-dump "{ 0, 4 }" "forwprop1"} } */
/* { dg-final { scan-tree-dump "{ 37, -5 }" "forwprop1"} } */