OLD | NEW |
(Empty) | |
| 1 /* Copyright 2012 Free Software Foundation, Inc. |
| 2 |
| 3 This file is part of GDB. |
| 4 |
| 5 This program is free software; you can redistribute it and/or modify |
| 6 it under the terms of the GNU General Public License as published by |
| 7 the Free Software Foundation; either version 3 of the License, or |
| 8 (at your option) any later version. |
| 9 |
| 10 This program is distributed in the hope that it will be useful, |
| 11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 GNU General Public License for more details. |
| 14 |
| 15 You should have received a copy of the GNU General Public License |
| 16 along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
| 17 |
| 18 typedef float V __attribute__((vector_size(16))); |
| 19 |
| 20 static V |
| 21 foo (V a, V b) |
| 22 { |
| 23 return a + b * a; |
| 24 } |
| 25 |
| 26 static __attribute__((noinline, noclone)) int |
| 27 f (void) |
| 28 { |
| 29 volatile V a = { 1, 2, 3, 4 }; |
| 30 volatile V b; |
| 31 |
| 32 b = foo (a, a); |
| 33 return b[0]; |
| 34 } |
| 35 |
| 36 static __attribute__((noinline, noclone)) int |
| 37 g0 (void) |
| 38 { |
| 39 return f (); |
| 40 } |
| 41 |
| 42 static __attribute__((noinline, noclone)) int |
| 43 g1 (int p1) |
| 44 { |
| 45 return f (); |
| 46 } |
| 47 |
| 48 static __attribute__((noinline, noclone)) int |
| 49 g2 (int p1, int p2) |
| 50 { |
| 51 return f (); |
| 52 } |
| 53 |
| 54 static __attribute__((noinline, noclone)) int |
| 55 g3 (int p1, int p2, int p3) |
| 56 { |
| 57 return f (); |
| 58 } |
| 59 |
| 60 static __attribute__((noinline, noclone)) int |
| 61 g4 (int p1, int p2, int p3, int p4) |
| 62 { |
| 63 return f (); |
| 64 } |
| 65 |
| 66 int |
| 67 main (void) |
| 68 { |
| 69 return g0 () + g1 (1) + g2 (1, 2) + g3 (1, 2, 3) + g4 (1, 2, 3, 4); |
| 70 } |
OLD | NEW |