From 34efdaf078b01a7387007c4e6bde6db86384c4b7 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 2 May 2017 14:43:35 +0000 Subject: gcc-7.1.0 --- gcc/testsuite/gcc.dg/unroll-7.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/unroll-7.c (limited to 'gcc/testsuite/gcc.dg/unroll-7.c') diff --git a/gcc/testsuite/gcc.dg/unroll-7.c b/gcc/testsuite/gcc.dg/unroll-7.c new file mode 100644 index 0000000000..e76d4faf16 --- /dev/null +++ b/gcc/testsuite/gcc.dg/unroll-7.c @@ -0,0 +1,18 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-rtl-loop2_unroll -funroll-loops" } */ +/* { dg-require-effective-target int32plus } */ + +extern int *a; + +int t(void) +{ + int i; + for (i=0;i<1000000;i++) + a[i]++; +} +/* { dg-final { scan-rtl-dump "Unrolled loop" "loop2_unroll" } } */ +/* { dg-final { scan-rtl-dump "number of iterations: .const_int 999999" "loop2_unroll" } } */ +/* { dg-final { scan-rtl-dump "upper bound: 999999" "loop2_unroll" } } */ +/* { dg-final { scan-rtl-dump "realistic bound: 999999" "loop2_unroll" } } */ +/* { dg-final { scan-rtl-dump "Considering unrolling loop with constant number of iterations" "loop2_unroll" } } */ +/* { dg-final { scan-rtl-dump-not "Invalid sum" "loop2_unroll" } } */ -- cgit v1.2.1