annotate gcc/testsuite/g++.dg/tree-ssa/pr57380.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* { dg-do compile } */
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
2 /* { dg-options "-O2 -fdump-tree-phiopt2" } */
111
kono
parents:
diff changeset
3 /* { dg-add-options bind_pic_locally } */
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 struct my_array {
kono
parents:
diff changeset
6 int data[4];
kono
parents:
diff changeset
7 };
kono
parents:
diff changeset
8
kono
parents:
diff changeset
9 const int& my_max(const int& a, const int& b) {
kono
parents:
diff changeset
10 return a < b ? b : a;
kono
parents:
diff changeset
11 }
kono
parents:
diff changeset
12
kono
parents:
diff changeset
13 int f(my_array a, my_array b) {
kono
parents:
diff changeset
14 int res = 0;
kono
parents:
diff changeset
15 for (int i = 0; i < 4; ++i) {
kono
parents:
diff changeset
16 res += my_max(a.data[i], b.data[i]);
kono
parents:
diff changeset
17 }
kono
parents:
diff changeset
18 return res;
kono
parents:
diff changeset
19 }
kono
parents:
diff changeset
20
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
21 /* { dg-final { scan-tree-dump "MAX_EXPR" "phiopt2" } } */