diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg')
47 files changed, 572 insertions, 135 deletions
diff --git a/gcc/testsuite/gcc.dg/Warray-bounds-35.c b/gcc/testsuite/gcc.dg/Warray-bounds-35.c new file mode 100644 index 00000000000..b3ad3625206 --- /dev/null +++ b/gcc/testsuite/gcc.dg/Warray-bounds-35.c @@ -0,0 +1,15 @@ +/* PR tree-optimization/87072 - g++6.2.0 false warning: array subscript + is above array bounds, with misleading line number + { dg-do compile } + { dg-options "-O3 -Wall" } */ + +int a[10]; + +void f (unsigned n) +{ + for (unsigned j = 0; j < n; j++) { + for (unsigned k = 0; k < j; k++) + a[j] += k; /* { dg-bogus "\\\[-Warray-bounds]" } */ + a[j] += j; + } +} diff --git a/gcc/testsuite/gcc.dg/asan/pr86962.c b/gcc/testsuite/gcc.dg/asan/pr86962.c new file mode 100644 index 00000000000..7a8cfa98f0e --- /dev/null +++ b/gcc/testsuite/gcc.dg/asan/pr86962.c @@ -0,0 +1,13 @@ +/* PR sanitizer/86962 */ +/* { dg-do compile } */ + +extern int dummy (int *); + +void foo(int i) +{ + int j=i; + + void bar() { int x=j, y=i; } + + dummy(&i); +} diff --git a/gcc/testsuite/gcc.dg/empty.h b/gcc/testsuite/gcc.dg/empty.h new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/gcc/testsuite/gcc.dg/empty.h diff --git a/gcc/testsuite/gcc.dg/fixits-pr84852-1.c b/gcc/testsuite/gcc.dg/fixits-pr84852-1.c index 98087abd929..346626b4eb9 100644 --- a/gcc/testsuite/gcc.dg/fixits-pr84852-1.c +++ b/gcc/testsuite/gcc.dg/fixits-pr84852-1.c @@ -13,13 +13,10 @@ int foo (void) { return strlen(""); } /* { dg-warning "incompatible implicit declaration of built-in function 'strlen'" "" { target *-*-* } -812156810 } */ -/* { dg-message "include '<string.h>' or provide a declaration of 'strlen'" "" { target *-*-* } -812156810 } */ +/* { dg-message "include '<string.h>' or provide a declaration of 'strlen'" "" { target *-*-* } 1 } */ #if 0 { dg-begin-multiline-output "" } +#include <string.h> /* This is padding (to avoid the output containing DejaGnu directives). */ { dg-end-multiline-output "" } #endif - -/* We need this, to consume a stray line marker for the bogus line. */ -/* { dg-regexp ".*fixits-pr84852-1.c:-812156810:25:" } */ diff --git a/gcc/testsuite/gcc.dg/fixits-pr84852-2.c b/gcc/testsuite/gcc.dg/fixits-pr84852-2.c index 0674ef54689..9bc70f59b59 100644 --- a/gcc/testsuite/gcc.dg/fixits-pr84852-2.c +++ b/gcc/testsuite/gcc.dg/fixits-pr84852-2.c @@ -13,13 +13,10 @@ int foo (void) { return strlen(""); } /* { dg-warning "incompatible implicit declaration of built-in function 'strlen'" "" { target *-*-* } -812156810 } */ -/* { dg-message "include '<string.h>' or provide a declaration of 'strlen'" "" { target *-*-* } -812156810 } */ +/* { dg-message "include '<string.h>' or provide a declaration of 'strlen'" "" { target *-*-* } 1 } */ #if 0 { dg-begin-multiline-output "" } +#include <string.h> /* This is padding (to avoid the output containing DejaGnu directives). */ { dg-end-multiline-output "" } #endif - -/* We need this, to consume a stray line marker for the bogus line. */ -/* { dg-regexp ".*fixits-pr84852-2.c:-812156810:25:" } */ diff --git a/gcc/testsuite/gcc.dg/lvalue-5.c b/gcc/testsuite/gcc.dg/lvalue-5.c index 514f35ed802..ff3598ae8a7 100644 --- a/gcc/testsuite/gcc.dg/lvalue-5.c +++ b/gcc/testsuite/gcc.dg/lvalue-5.c @@ -1,7 +1,7 @@ /* Test assignment to elements of a string literal is a warning, not an error. PR 27676. */ /* { dg-do compile } */ -/* { dg-options "-pedantic-errors" } */ +/* { dg-options "-O -pedantic-errors" } */ void f (void) diff --git a/gcc/testsuite/gcc.dg/missing-header-fixit-3.c b/gcc/testsuite/gcc.dg/missing-header-fixit-3.c index 8f2fb5b044a..a692b4d21b3 100644 --- a/gcc/testsuite/gcc.dg/missing-header-fixit-3.c +++ b/gcc/testsuite/gcc.dg/missing-header-fixit-3.c @@ -7,21 +7,15 @@ void test (int i, int j) { printf ("%i of %i\n", i, j); /* { dg-warning "implicit declaration" } */ - /* { dg-message "include '<stdio.h>' or provide a declaration of 'printf'" "" { target *-*-* } .-1 } */ + /* { dg-message "include '<stdio.h>' or provide a declaration of 'printf'" "" { target *-*-* } 1 } */ #if 0 /* { dg-begin-multiline-output "" } 9 | printf ("%i of %i\n", i, j); | ^~~~~~ { dg-end-multiline-output "" } */ -/* { dg-regexp ".*missing-header-fixit-3.c:1:1:" } */ /* { dg-begin-multiline-output "" } + |+#include <stdio.h> 1 | /* Example of a fix-it hint that adds a #include directive, { dg-end-multiline-output "" } */ -/* { dg-regexp ".*missing-header-fixit-3.c:9:3:" } */ -/* { dg-begin-multiline-output "" } -9 | printf ("%i of %i\n", i, j); - | ^~~~~~ - { dg-end-multiline-output "" } */ #endif } diff --git a/gcc/testsuite/gcc.dg/missing-header-fixit-4.c b/gcc/testsuite/gcc.dg/missing-header-fixit-4.c new file mode 100644 index 00000000000..0ed3e2c2922 --- /dev/null +++ b/gcc/testsuite/gcc.dg/missing-header-fixit-4.c @@ -0,0 +1,23 @@ +/* Example of a fix-it hint that adds a #include directive, + adding them after a pre-existing #include directive. */ +#include "empty.h" +int the_next_line; + +/* { dg-options "-fdiagnostics-show-caret -fdiagnostics-show-line-numbers" } */ + +void test (int i, int j) +{ + printf ("%i of %i\n", i, j); /* { dg-line printf } */ + /* { dg-warning "implicit declaration of function" "" { target *-*-* } printf } */ + /* { dg-warning "incompatible implicit declaration" "" { target *-*-* } printf } */ + /* { dg-begin-multiline-output "" } +10 | printf ("%i of %i\n", i, j); + | ^~~~~~ + { dg-end-multiline-output "" } */ + /* { dg-message "include '<stdio.h>' or provide a declaration of 'printf'" "" { target *-*-* } 4 } */ + /* { dg-begin-multiline-output "" } +3 | #include "empty.h" ++ |+#include <stdio.h> +4 | int the_next_line; + { dg-end-multiline-output "" } */ +} diff --git a/gcc/testsuite/gcc.dg/plugin/diagnostic-test-show-locus-bw-line-numbers.c b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-show-locus-bw-line-numbers.c index f2bbc5854dc..63e585528fa 100644 --- a/gcc/testsuite/gcc.dg/plugin/diagnostic-test-show-locus-bw-line-numbers.c +++ b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-show-locus-bw-line-numbers.c @@ -111,6 +111,7 @@ void test_fixit_insert_newline (void) x = b; } /* { dg-begin-multiline-output "" } +109 | x = a; +++ |+ break; 110 | case 'b': | ^~~~~~~~ diff --git a/gcc/testsuite/gcc.dg/plugin/diagnostic-test-show-locus-bw.c b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-show-locus-bw.c index bdfa420d849..be6f103ba6a 100644 --- a/gcc/testsuite/gcc.dg/plugin/diagnostic-test-show-locus-bw.c +++ b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-show-locus-bw.c @@ -332,6 +332,7 @@ void test_fixit_insert_newline (void) x = b; } /* { dg-begin-multiline-output "" } + x = a; + break; case 'b': ^~~~~~~~ diff --git a/gcc/testsuite/gcc.dg/plugin/diagnostic-test-show-locus-color.c b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-show-locus-color.c index 094bc6535d5..7ae38019ffd 100644 --- a/gcc/testsuite/gcc.dg/plugin/diagnostic-test-show-locus-color.c +++ b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-show-locus-color.c @@ -217,6 +217,7 @@ void test_fixit_insert_newline (void) x = b; } /* { dg-begin-multiline-output "" } + x = a; +[32m[K break;[m[K [01;35m[Kcase 'b'[m[K: [01;35m[K^~~~~~~~[m[K diff --git a/gcc/testsuite/gcc.dg/plugin/diagnostic_plugin_test_show_locus.c b/gcc/testsuite/gcc.dg/plugin/diagnostic_plugin_test_show_locus.c index 3d7853813ae..a55efafddff 100644 --- a/gcc/testsuite/gcc.dg/plugin/diagnostic_plugin_test_show_locus.c +++ b/gcc/testsuite/gcc.dg/plugin/diagnostic_plugin_test_show_locus.c @@ -145,9 +145,11 @@ custom_diagnostic_finalizer (diagnostic_context *context, static void add_range (rich_location *richloc, location_t start, location_t finish, - bool show_caret_p, const range_label *label = NULL) + enum range_display_kind range_display_kind + = SHOW_RANGE_WITHOUT_CARET, + const range_label *label = NULL) { - richloc->add_range (make_location (start, start, finish), show_caret_p, + richloc->add_range (make_location (start, start, finish), range_display_kind, label); } @@ -176,8 +178,8 @@ test_show_locus (function *fun) { const int line = fnstart_line + 2; rich_location richloc (line_table, get_loc (line, 15)); - add_range (&richloc, get_loc (line, 10), get_loc (line, 14), false); - add_range (&richloc, get_loc (line, 16), get_loc (line, 16), false); + add_range (&richloc, get_loc (line, 10), get_loc (line, 14)); + add_range (&richloc, get_loc (line, 16), get_loc (line, 16)); warning_at (&richloc, 0, "test"); } @@ -185,8 +187,8 @@ test_show_locus (function *fun) { const int line = fnstart_line + 2; rich_location richloc (line_table, get_loc (line, 24)); - add_range (&richloc, get_loc (line, 6), get_loc (line, 22), false); - add_range (&richloc, get_loc (line, 26), get_loc (line, 43), false); + add_range (&richloc, get_loc (line, 6), get_loc (line, 22)); + add_range (&richloc, get_loc (line, 26), get_loc (line, 43)); warning_at (&richloc, 0, "test"); } @@ -195,9 +197,8 @@ test_show_locus (function *fun) const int line = fnstart_line + 2; text_range_label label ("label"); rich_location richloc (line_table, get_loc (line + 1, 7), &label); - add_range (&richloc, get_loc (line, 7), get_loc (line, 23), false); - add_range (&richloc, get_loc (line + 1, 9), get_loc (line + 1, 26), - false); + add_range (&richloc, get_loc (line, 7), get_loc (line, 23)); + add_range (&richloc, get_loc (line + 1, 9), get_loc (line + 1, 26)); warning_at (&richloc, 0, "test"); } @@ -208,10 +209,10 @@ test_show_locus (function *fun) text_range_label label1 ("label 1"); text_range_label label2 ("label 2"); rich_location richloc (line_table, get_loc (line + 5, 7), &label0); - add_range (&richloc, get_loc (line, 7), get_loc (line + 4, 65), false, - &label1); + add_range (&richloc, get_loc (line, 7), get_loc (line + 4, 65), + SHOW_RANGE_WITHOUT_CARET, &label1); add_range (&richloc, get_loc (line + 5, 9), get_loc (line + 10, 61), - false, &label2); + SHOW_RANGE_WITHOUT_CARET, &label2); warning_at (&richloc, 0, "test"); } @@ -250,7 +251,8 @@ test_show_locus (function *fun) get_loc (line, 90), get_loc (line, 98)), &label0); - richloc.add_range (get_loc (line, 35), false, &label1); + richloc.add_range (get_loc (line, 35), SHOW_RANGE_WITHOUT_CARET, + &label1); richloc.add_fixit_replace ("bar * foo"); warning_at (&richloc, 0, "test"); global_dc->show_ruler_p = false; @@ -270,7 +272,8 @@ test_show_locus (function *fun) get_loc (line, 98)), &label0); richloc.add_fixit_replace ("bar * foo"); - richloc.add_range (get_loc (line, 34), false, &label1); + richloc.add_range (get_loc (line, 34), SHOW_RANGE_WITHOUT_CARET, + &label1); warning_at (&richloc, 0, "test"); global_dc->show_ruler_p = false; } @@ -282,7 +285,7 @@ test_show_locus (function *fun) location_t caret_a = get_loc (line, 7); location_t caret_b = get_loc (line, 11); rich_location richloc (line_table, caret_a); - add_range (&richloc, caret_b, caret_b, true); + add_range (&richloc, caret_b, caret_b, SHOW_RANGE_WITH_CARET); global_dc->caret_chars[0] = 'A'; global_dc->caret_chars[1] = 'B'; warning_at (&richloc, 0, "test"); @@ -400,7 +403,7 @@ test_show_locus (function *fun) location_t caret_a = get_loc (line, 5); location_t caret_b = get_loc (line - 1, 19); rich_location richloc (line_table, caret_a); - richloc.add_range (caret_b, true); + richloc.add_range (caret_b, SHOW_RANGE_WITH_CARET); global_dc->caret_chars[0] = '1'; global_dc->caret_chars[1] = '2'; warning_at (&richloc, 0, "test"); @@ -449,7 +452,7 @@ test_show_locus (function *fun) location_t word = make_location (start_of_word, start_of_word, end_of_word); - richloc.add_range (word, true, &label); + richloc.add_range (word, SHOW_RANGE_WITH_CARET, &label); /* Add a fixit, converting to upper case. */ char_span word_span = content.subspan (start_idx, idx - start_idx); diff --git a/gcc/testsuite/gcc.dg/pr79342.c b/gcc/testsuite/gcc.dg/pr79342.c new file mode 100644 index 00000000000..958de55d09b --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr79342.c @@ -0,0 +1,18 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -gsplit-dwarf -g3" } */ +/* { dg-additional-options "-march=skylake -mrtm -mabm" { target x86_64-*-* i?86-*-* } } */ + +int a; +void b(void); + +void e(int *); +int f(void); + +void +c(void) +{ + int d; + e(&d); + if (f()) + b(); +} diff --git a/gcc/testsuite/gcc.dg/pr83666.c b/gcc/testsuite/gcc.dg/pr83666.c index 7bd1ed3ceb2..1c43c438544 100644 --- a/gcc/testsuite/gcc.dg/pr83666.c +++ b/gcc/testsuite/gcc.dg/pr83666.c @@ -1,6 +1,6 @@ /* PR debug/83666 */ /* { dg-do compile } */ -/* { dg-options "-O2 -g --param=sccvn-max-scc-size=10 -Wno-psabi" } */ +/* { dg-options "-O2 -g -Wno-psabi" } */ /* { dg-additional-options "-fno-common" { target hppa*-*-hpux* } } */ typedef int __attribute__ ((vector_size (64))) V; diff --git a/gcc/testsuite/gcc.dg/pr85195.c b/gcc/testsuite/gcc.dg/pr85195.c index 0cc696ba6ee..fb21ee97c5c 100644 --- a/gcc/testsuite/gcc.dg/pr85195.c +++ b/gcc/testsuite/gcc.dg/pr85195.c @@ -1,6 +1,6 @@ /* PR middle-end/85195 */ /* { dg-do compile { target int128 } } */ -/* { dg-options "-Wno-psabi -O -fno-tree-ccp --param=sccvn-max-scc-size=10" } */ +/* { dg-options "-Wno-psabi -O -fno-tree-ccp" } */ typedef __int128 V __attribute__ ((vector_size (16))); diff --git a/gcc/testsuite/gcc.dg/pr85467.c b/gcc/testsuite/gcc.dg/pr85467.c index 4895e37d0f9..fad94fcd83e 100644 --- a/gcc/testsuite/gcc.dg/pr85467.c +++ b/gcc/testsuite/gcc.dg/pr85467.c @@ -1,6 +1,6 @@ /* PR tree-optimization/85467 */ /* { dg-do compile } */ -/* { dg-options "-O2 -fno-tree-ccp --param=sccvn-max-scc-size=10" } */ +/* { dg-options "-O2 -fno-tree-ccp" } */ #define TEST(N, T) \ typedef T V##N __attribute__ ((__vector_size__ (sizeof (T)))); \ diff --git a/gcc/testsuite/gcc.dg/pr87009.c b/gcc/testsuite/gcc.dg/pr87009.c new file mode 100644 index 00000000000..eb8a4ecd920 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr87009.c @@ -0,0 +1,23 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fdump-tree-original" } */ +/* { dg-final { scan-tree-dump-times "return s \\^ x;" 4 "original" } } */ + +int f1 (int x, int s) +{ + return ~(~(x|s)|x)|~(~(x|s)|s); +} + +int f2 (int x, int s) +{ + return ~(~(~x&s)&~(x&~s)); +} + +int f3 (int x, int s) +{ + return ~((x|~s)&(~x|s)); +} + +int f4 (int x, int s) +{ + return (x|~s)^(~x|s); +} diff --git a/gcc/testsuite/gcc.dg/pr87024.c b/gcc/testsuite/gcc.dg/pr87024.c new file mode 100644 index 00000000000..a8a58aafc26 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr87024.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fno-tree-dce" } */ + +static inline void __attribute__((always_inline)) +mp () +{ + (void) __builtin_va_arg_pack_len (); +} + +void +ui (void) +{ + mp (); +} diff --git a/gcc/testsuite/gcc.dg/pr87092.c b/gcc/testsuite/gcc.dg/pr87092.c new file mode 100644 index 00000000000..4a6faebbd93 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr87092.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fwrapv" } */ + +int a, b; + +void +c(void) { + if (b) + b = a / b; +} diff --git a/gcc/testsuite/gcc.dg/pr87099.c b/gcc/testsuite/gcc.dg/pr87099.c new file mode 100644 index 00000000000..599d721da31 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr87099.c @@ -0,0 +1,21 @@ +/* PR middle-end/87099 */ +/* { dg-do compile } */ +/* { dg-options "-Wstringop-overflow" } */ + +void bar (char *); + +int +foo (int n) +{ + char v[n]; + bar (v); + return __builtin_strncmp (&v[1], "aaa", 3); +} + +int +baz (int n, char *s) +{ + char v[n]; + bar (v); + return __builtin_strncmp (&v[1], s, 3); +} diff --git a/gcc/testsuite/gcc.dg/pr87112.c b/gcc/testsuite/gcc.dg/pr87112.c new file mode 100644 index 00000000000..7510956be4e --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr87112.c @@ -0,0 +1,31 @@ +/* PR tree-optimization/87112 - ICE due to strnlen mixing integer types + { dg-do compile } + { dg-options "-Os -Wall" } */ + +typedef __SIZE_TYPE__ size_t; + +extern size_t strnlen (const char*, size_t); + +size_t fi (int i) +{ + int n = i & 3; + return strnlen ("int", n); +} + +size_t fui (unsigned i) +{ + unsigned n = i & 3; + return strnlen ("unsigned", n); +} + +size_t fl (long i) +{ + long n = i & 3; + return strnlen ("long", n); +} + +size_t fsz (size_t i) +{ + size_t n = i & 3; + return strnlen ("size_t", n); +} diff --git a/gcc/testsuite/gcc.dg/pr87117-1.c b/gcc/testsuite/gcc.dg/pr87117-1.c new file mode 100644 index 00000000000..06d700871be --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr87117-1.c @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fno-inline -fno-tree-dce" } */ + +int a, b, c; +long *d; +void fn1() +{ + for (; 0 < a;) + a++; +} +void fn3() +{ + for (; c; c++) + d[c] = 0; +} +void fn2() +{ + if (b) + fn3(); + fn1(); +} diff --git a/gcc/testsuite/gcc.dg/pr87117-2.c b/gcc/testsuite/gcc.dg/pr87117-2.c new file mode 100644 index 00000000000..aefa813918b --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr87117-2.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fcode-hoisting" } */ + +void e(); + +void a(int c, char **d) +{ + char b; + if (1 < c) + b = (char)(__INTPTR_TYPE__)d[0]; + if (1 < c && b) + e(); + while (1 < c) + ; +} diff --git a/gcc/testsuite/gcc.dg/strcmpopt_6.c b/gcc/testsuite/gcc.dg/strcmpopt_6.c deleted file mode 100644 index 4c6de02824f..00000000000 --- a/gcc/testsuite/gcc.dg/strcmpopt_6.c +++ /dev/null @@ -1,36 +0,0 @@ -/* When the specified length exceeds one of the arguments of the call to memcmp, - the call to memcmp should NOT be inlined. */ -/* { dg-do compile } */ -/* { dg-options "-O2 -Wno-stringop-overflow" } */ - -typedef struct { char s[8]; int x; } S; - -__attribute__ ((noinline)) int -f1 (S * s) -{ - int result = 0; - result += __builtin_memcmp (s->s, "a", 3); - return result; -} - -__attribute__ ((noinline)) int -f2 (char *p) -{ - int result = 0; - result += __builtin_memcmp (p, "a", 3); - return result; -} - -int main (void) -{ - S ss = {{'a','b','c'}, 2}; - char *s = "abcd"; - - if (f1 (&ss) < 0 || f2 (s) < 0) - __builtin_abort (); - - return 0; - -} - -/* { dg-final { scan-assembler-times "memcmp" 2 } } */ diff --git a/gcc/testsuite/gcc.dg/strlenopt-57.c b/gcc/testsuite/gcc.dg/strlenopt-57.c new file mode 100644 index 00000000000..49dc8cd6fbb --- /dev/null +++ b/gcc/testsuite/gcc.dg/strlenopt-57.c @@ -0,0 +1,49 @@ +/* PR tree-optimization/86914 - wrong code with strlen() of poor-man's + flexible array member plus offset + { dg-do compile } + { dg-options "-O2 -Wall -fdump-tree-optimized" } */ + +#include "strlenopt.h" + +struct A0 { char i, a[0]; }; +struct A1 { char i, a[1]; }; +struct A9 { char i, a[9]; }; +struct Ax { char i, a[]; }; + +extern int a[]; + +extern struct A0 a0; +extern struct A1 a1; +extern struct A9 a9; +extern struct Ax ax; + +void test_var_flexarray_cst_off (void) +{ + /* Use arbitrary constants greater than 16 in case GCC ever starts + unrolling strlen() calls with small array arguments. */ + a[0] = 17 < strlen (a0.a + 1); + a[1] = 19 < strlen (a1.a + 1); + a[2] = 23 < strlen (a9.a + 9); + a[3] = 29 < strlen (ax.a + 3); +} + +void test_ptr_flexarray_cst_off (struct A0 *p0, struct A1 *p1, + struct A9 *p9, struct Ax *px) +{ + a[0] = 17 < strlen (p0->a + 1); + a[1] = 19 < strlen (p1->a + 1); + a[2] = 23 < strlen (p9->a + 9); + a[3] = 29 < strlen (px->a + 3); +} + +void test_ptr_flexarray_var_off (struct A0 *p0, struct A1 *p1, + struct A9 *p9, struct Ax *px, + int i) +{ + a[0] = 17 < strlen (p0->a + i); + a[1] = 19 < strlen (p1->a + i); + a[2] = 23 < strlen (p9->a + i); + a[3] = 29 < strlen (px->a + i); +} + +/* { dg-final { scan-tree-dump-times "strlen" 12 "optimized" } } */ diff --git a/gcc/testsuite/gcc.dg/strlenopt-58.c b/gcc/testsuite/gcc.dg/strlenopt-58.c new file mode 100644 index 00000000000..e0e80680936 --- /dev/null +++ b/gcc/testsuite/gcc.dg/strlenopt-58.c @@ -0,0 +1,93 @@ +/* PR tree-optimization/86711 - wrong folding of memchr + + Verify that calls to memchr() with constant arrays initialized + with wide string literals are folded. + + { dg-do compile } + { dg-options "-O1 -Wall -fdump-tree-optimized" } */ + +#include "strlenopt.h" + +typedef __WCHAR_TYPE__ wchar_t; + +extern void* memchr (const void*, int, size_t); + +#define CONCAT(x, y) x ## y +#define CAT(x, y) CONCAT (x, y) +#define FAILNAME(name) CAT (call_ ## name ##_on_line_, __LINE__) + +#define FAIL(name) do { \ + extern void FAILNAME (name) (void); \ + FAILNAME (name)(); \ + } while (0) + +/* Macro to emit a call to funcation named + call_in_true_branch_not_eliminated_on_line_NNN() + for each call that's expected to be eliminated. The dg-final + scan-tree-dump-time directive at the bottom of the test verifies + that no such call appears in output. */ +#define ELIM(expr) \ + if (!(expr)) FAIL (in_true_branch_not_eliminated); else (void)0 + +#define T(s, n) ELIM (strlen (s) == n) + + +static const wchar_t wc = L'1'; +static const wchar_t ws1[] = L"1"; +static const wchar_t wsx[] = L"\x12345678"; +static const wchar_t ws4[] = L"\x00123456\x12005678\x12340078\x12345600"; + +void test_wide (void) +{ + int i0 = 0; + int i1 = i0 + 1; + int i2 = i1 + 1; + int i3 = i2 + 1; + int i4 = i3 + 1; + + ELIM (memchr (L"" + 1, 0, 0) == 0); + ELIM (memchr (&wc + 1, 0, 0) == 0); + ELIM (memchr (L"\x12345678", 0, sizeof (wchar_t)) == 0); + + const size_t nb = sizeof ws4; + const size_t nwb = sizeof (wchar_t); + + const char *pws1 = (const char*)ws1; + const char *pws4 = (const char*)ws4; + const char *pwsx = (const char*)wsx; + +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ + ELIM (memchr (ws1, 0, sizeof ws1) == pws1 + 1); + ELIM (memchr (wsx, 0, sizeof wsx) == pwsx + sizeof *wsx); + + ELIM (memchr (&ws4[0], 0, nb) == pws4 + 3); + ELIM (memchr (&ws4[1], 0, nb - 1 * nwb) == pws4 + 1 * nwb + 2); + ELIM (memchr (&ws4[2], 0, nb - 2 * nwb) == pws4 + 2 * nwb + 1); + ELIM (memchr (&ws4[3], 0, nb - 3 * nwb) == pws4 + 3 * nwb + 0); + ELIM (memchr (&ws4[4], 0, nb - 4 * nwb) == pws4 + 4 * nwb + 0); + + ELIM (memchr (&ws4[i0], 0, nb) == pws4 + 3); + ELIM (memchr (&ws4[i1], 0, nb - 1 * nwb) == pws4 + 1 * nwb + 2); + ELIM (memchr (&ws4[i2], 0, nb - 2 * nwb) == pws4 + 2 * nwb + 1); + ELIM (memchr (&ws4[i3], 0, nb - 3 * nwb) == pws4 + 3 * nwb + 0); + ELIM (memchr (&ws4[i4], 0, nb - 4 * nwb) == pws4 + 4 * nwb + 0); +#else + ELIM (memchr (ws1, 0, sizeof ws1) == pws1 + 0); + ELIM (memchr (wsx, 0, sizeof wsx) == pwsx + sizeof *wsx); + + ELIM (memchr (&ws4[0], 0, nb) == pws4 + 0); + ELIM (memchr (&ws4[1], 0, nb - 1 * nwb) == pws4 + 1 * nwb + 1); + ELIM (memchr (&ws4[2], 0, nb - 2 * nwb) == pws4 + 2 * nwb + 2); + ELIM (memchr (&ws4[3], 0, nb - 3 * nwb) == pws4 + 3 * nwb + 3); + ELIM (memchr (&ws4[4], 0, nb - 4 * nwb) == pws4 + 4 * nwb + 0); + + ELIM (memchr (&ws4[i0], 0, nb) == pws4 + 0); + ELIM (memchr (&ws4[i1], 0, nb - 1 * nwb) == pws4 + 1 * nwb + 1); + ELIM (memchr (&ws4[i2], 0, nb - 2 * nwb) == pws4 + 2 * nwb + 2); + ELIM (memchr (&ws4[i3], 0, nb - 3 * nwb) == pws4 + 3 * nwb + 3); + ELIM (memchr (&ws4[i4], 0, nb - 4 * nwb) == pws4 + 4 * nwb + 0); +#endif +} + +/* { dg-final { scan-tree-dump-times "memchr" 0 "optimized" } } + { dg-final { scan-tree-dump-times "call_in_true_branch_not_eliminated" 0 "optimized" } } */ diff --git a/gcc/testsuite/gcc.dg/torture/pr81790.c b/gcc/testsuite/gcc.dg/torture/pr81790.c index b5e02f6c1dd..b69946f9d10 100644 --- a/gcc/testsuite/gcc.dg/torture/pr81790.c +++ b/gcc/testsuite/gcc.dg/torture/pr81790.c @@ -1,5 +1,4 @@ /* { dg-do compile } */ -/* { dg-additional-options "--param sccvn-max-scc-size=10" } */ typedef int a __attribute__ ((__vector_size__ (16))); typedef struct diff --git a/gcc/testsuite/gcc.dg/torture/pr87132.c b/gcc/testsuite/gcc.dg/torture/pr87132.c new file mode 100644 index 00000000000..48b8673bba3 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr87132.c @@ -0,0 +1,18 @@ +/* { dg-do run } */ + +extern void abort (void); +int c, d; +int main() +{ + int e[] = {4, 4, 4, 4, 4, 4, 4, 4, 4}; + d = 8; + for (; d; d--) + for (int a = 0; a <= 8; a++) + { + c = e[1]; + e[d] = 0; + } + if (c != 0) + abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/torture/pr87147.c b/gcc/testsuite/gcc.dg/torture/pr87147.c new file mode 100644 index 00000000000..385cfce7201 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr87147.c @@ -0,0 +1,22 @@ +/* { dg-do run } */ + +short a; +long b; +int c, d, g; +char e, h; +long f[] = {0}; +int main() +{ + int i = 1; + for (; a <= 3; a++) { + c = 0; + for (; c <= 2; c++) { + b = 0; + for (; b <= 3; b++) { + h = i && f[d]; + e = g && i; + i = 0; + } + } + } +} diff --git a/gcc/testsuite/gcc.dg/tree-prof/val-prof-10.c b/gcc/testsuite/gcc.dg/tree-prof/val-prof-10.c new file mode 100644 index 00000000000..57854b5911b --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-prof/val-prof-10.c @@ -0,0 +1,31 @@ +/* { dg-options "-O2 -fdump-rtl-expand -mtune=core2" } */ +/* { dg-skip-if "" { ! { i?86-*-* x86_64-*-* } } } */ + +long buffer1[128], buffer2[128]; +char *x; + +void foo(long *r) +{ + x = (char *)r; + asm volatile("" ::: "memory"); +} + +void +__attribute__((noinline)) +compute() +{ + volatile int n = 24; + __builtin_memcpy (buffer1, buffer2, n); + foo (&buffer1[0]); +} + +int +main() +{ + for (unsigned i = 0; i < 10000; i++) + compute (); + + return 0; +} + +/* { dg-final-use-not-autofdo { scan-rtl-dump "Selected stringop expansion strategy: rep_byte" "expand" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr87126.c b/gcc/testsuite/gcc.dg/tree-ssa/pr87126.c new file mode 100644 index 00000000000..37232ba3a0a --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr87126.c @@ -0,0 +1,25 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-fre1" } */ + +int a, *b; + +void f () +{ + int d = 0, e = d; + while (a++) + ; + if (e) + goto L2; +L1: + d = e; + b = &d; +L2: + if (d) + goto L1; +} + +/* The load of d could be eliminated if we'd value-number the + irreducible region in RPO of the reducible result. Likewise + a redundant store could be removed. */ +/* { dg-final { scan-tree-dump-times "d = 0;" 1 "fre1" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump-not " = d;" "fre1" { xfail *-*-* } } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-14.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-14.c index 3955bddcf59..65e2d5a664b 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-14.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-14.c @@ -1,8 +1,5 @@ -/* PR tree-optimization/29738. We used not to realize that "i" can never - become nonzero. */ - /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-optimized" } */ +/* { dg-options "-O2 -fdump-tree-fre1 -fdump-tree-optimized" } */ int i; @@ -16,5 +13,7 @@ void bar (void) foo (); } -/* Everything except for the "i = 0" assignment should get removed. */ -/* { dg-final { scan-tree-dump-times "if" 0 "optimized" { xfail *-*-* } } } */ +/* Everything except for the "i = 0" assignment should get removed. Value + numbering already figures out the if in the loop is never true. */ +/* { dg-final { scan-tree-dump-times "foo" 0 "fre1" } } */ +/* { dg-final { scan-tree-dump-times "if" 0 "optimized" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-46.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-46.c index d6e63518e9f..8d6eaa3ada0 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-46.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-46.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O -fdump-tree-fre1-details" } */ +/* { dg-options "-O2 -fdump-tree-fre1-details" } */ int x[1024]; int foo (int a, int s, unsigned int k) diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-67.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-67.c new file mode 100644 index 00000000000..fab1e599b81 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-67.c @@ -0,0 +1,16 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fno-tree-ccp -fdump-tree-fre1-stats" } */ + +int foo() +{ + int i = 0; + do + { + i++; + } + while (i != 1); + return i; +} + +/* { dg-final { scan-tree-dump "RPO iteration over 3 blocks visited 3 blocks" "fre1" } } */ +/* { dg-final { scan-tree-dump "return 1;" "fre1" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/switch-2.c b/gcc/testsuite/gcc.dg/tree-ssa/switch-2.c new file mode 100644 index 00000000000..710825dc257 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/switch-2.c @@ -0,0 +1,25 @@ +/* { dg-do compile { target { { x86_64-*-* aarch64-*-* ia64-*-* powerpc64-*-* } && lp64 } } } */ +/* { dg-options "-O2 -fdump-tree-switchlower1" } */ + +int global; + +int foo (int x) +{ + switch (x) { + case 0: + case 10: + return 1; + case 20: + case 30: + case 62: + return 2; + case 1000: + case 1010: + case 1025 ... 1030: + return 1; + default: + return 0; + } +} + +/* { dg-final { scan-tree-dump ";; GIMPLE switch case clusters: BT:0-62 BT:1000-1030" "switchlower1" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/switch-3.c b/gcc/testsuite/gcc.dg/tree-ssa/switch-3.c new file mode 100644 index 00000000000..44981e1d186 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/switch-3.c @@ -0,0 +1,20 @@ +/* { dg-options "-O2 -fdump-tree-switchlower1" } */ + +int cipher_to_alg(int cipher) +{ + switch (cipher) + { + case 8: return 2; + case 16: return 3; + case 32: return 4; + case 64: return 6; + case 256: return 9; + case 512: return 10; + case 2048: return 11; + case 4096: return 12; + case 8192: return 13; + } + return 0; +} + +/* { dg-final { scan-tree-dump-times "if \\(cipher\[^\n ]*" 12 "switchlower1" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp105.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp105.c deleted file mode 100644 index 7cdd4dd8f3a..00000000000 --- a/gcc/testsuite/gcc.dg/tree-ssa/vrp105.c +++ /dev/null @@ -1,37 +0,0 @@ -/* PR tree-optimization/18046 */ -/* { dg-options "-O2 -fdump-tree-vrp2-details" } */ -/* { dg-final { scan-tree-dump-times "Threaded jump" 1 "vrp2" } } */ -/* In the 2nd VRP pass (after PRE) we expect to thread the default label of the - 1st switch straight to that of the 2nd switch. */ - -extern void foo (void); -extern void bar (void); - -extern int i; -void -test (void) -{ - switch (i) - { - case 0: - foo (); - break; - case 1: - bar (); - break; - default: - break; - } - - switch (i) - { - case 0: - foo (); - break; - case 1: - bar (); - break; - default: - break; - } -} diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp92.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp92.c index 213aa47609a..5a2dbf0108a 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/vrp92.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp92.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdisable-tree-evrp -fdump-tree-vrp1-details -fdisable-tree-ethread" } */ +/* { dg-options "-O2 -fdisable-tree-evrp -fno-tree-fre -fdump-tree-vrp1-details -fdisable-tree-ethread" } */ void bar (void); int foo (int i, int j) diff --git a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-2.c b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-2.c index acad8fc0332..1880d1edb32 100644 --- a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-2.c +++ b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-2.c @@ -51,7 +51,4 @@ int main (void) } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" {xfail { vect_no_align && { ! vect_hw_misalign } } } } } */ -/* Requires reverse for variable-length SVE, which is implemented for - by a later patch. Until then we report it twice, once for SVE and - once for 128-bit Advanced SIMD. */ -/* { dg-final { scan-tree-dump-times "dependence distance negative" 1 "vect" { xfail { aarch64_sve && vect_variable_length } } } } */ +/* { dg-final { scan-tree-dump-times "dependence distance negative" 1 "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-3.c b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-3.c index 1ccfc1edacc..e5914d970e3 100644 --- a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-3.c +++ b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-3.c @@ -183,7 +183,4 @@ int main () } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 4 "vect" {xfail { vect_no_align && { ! vect_hw_misalign } } } } } */ -/* f4 requires reverse for SVE, which is implemented by a later patch. - Until then we report it twice, once for SVE and once for 128-bit - Advanced SIMD. */ -/* { dg-final { scan-tree-dump-times "dependence distance negative" 4 "vect" { xfail { aarch64_sve && vect_variable_length } } } } */ +/* { dg-final { scan-tree-dump-times "dependence distance negative" 4 "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/pr65947-13.c b/gcc/testsuite/gcc.dg/vect/pr65947-13.c index ce290459c50..e1d3ff52f5c 100644 --- a/gcc/testsuite/gcc.dg/vect/pr65947-13.c +++ b/gcc/testsuite/gcc.dg/vect/pr65947-13.c @@ -41,4 +41,5 @@ main (void) } /* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 2 "vect" } } */ -/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 4 "vect" } } */ +/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 4 "vect" { xfail vect_fold_extract_last } } } */ +/* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 4 "vect" { target vect_fold_extract_last } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/pr80631-2.c b/gcc/testsuite/gcc.dg/vect/pr80631-2.c index 6bf239adac5..b334ca2345b 100644 --- a/gcc/testsuite/gcc.dg/vect/pr80631-2.c +++ b/gcc/testsuite/gcc.dg/vect/pr80631-2.c @@ -72,4 +72,5 @@ main () } /* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 5 "vect" { target vect_condition } } } */ -/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 10 "vect" { target vect_condition } } } */ +/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 10 "vect" { target vect_condition xfail vect_fold_extract_last } } } */ +/* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 10 "vect" { target vect_fold_extract_last } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/pr86927.c b/gcc/testsuite/gcc.dg/vect/pr86927.c new file mode 100644 index 00000000000..794092bc4e4 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/pr86927.c @@ -0,0 +1,15 @@ +#include "tree-vect.h" + +int a[28]; +int main() +{ + check_vect (); + a[4] = 1; + int c = 1; + for (int b = 0; b < 8; b++) + if (a[b]) + c = 0; + if (c) + abort(); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/vect/slp-23.c b/gcc/testsuite/gcc.dg/vect/slp-23.c index 3cda497db0c..7d330c787d1 100644 --- a/gcc/testsuite/gcc.dg/vect/slp-23.c +++ b/gcc/testsuite/gcc.dg/vect/slp-23.c @@ -107,8 +107,8 @@ int main (void) /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target { vect_strided8 && { ! { vect_no_align} } } } } } */ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { ! { vect_strided8 || vect_no_align } } } } } */ -/* We fail to vectorize the second loop with variable-length SVE but - fall back to 128-bit vectors, which does use SLP. */ /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target { ! vect_perm } } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { target vect_perm } } } */ +/* SLP fails for the second loop with variable-length SVE because + the load size is greater than the minimum vector size. */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { target vect_perm xfail { aarch64_sve && vect_variable_length } } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/slp-37.c b/gcc/testsuite/gcc.dg/vect/slp-37.c index 54a5e18c51f..a765cd70a09 100644 --- a/gcc/testsuite/gcc.dg/vect/slp-37.c +++ b/gcc/testsuite/gcc.dg/vect/slp-37.c @@ -58,5 +58,5 @@ int main (void) return 0; } -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_hw_misalign } } } */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_hw_misalign } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/slp-perm-10.c b/gcc/testsuite/gcc.dg/vect/slp-perm-10.c index 1c2a8580d3c..678152ba416 100644 --- a/gcc/testsuite/gcc.dg/vect/slp-perm-10.c +++ b/gcc/testsuite/gcc.dg/vect/slp-perm-10.c @@ -50,4 +50,6 @@ int main () } /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_perm } } } */ -/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_perm } } } */ +/* SLP fails for variable-length SVE because the load size is greater + than the minimum vector size. */ +/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_perm xfail { aarch64_sve && vect_variable_length } } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/slp-perm-9.c b/gcc/testsuite/gcc.dg/vect/slp-perm-9.c index b01d493b6e7..c54420abd9d 100644 --- a/gcc/testsuite/gcc.dg/vect/slp-perm-9.c +++ b/gcc/testsuite/gcc.dg/vect/slp-perm-9.c @@ -59,7 +59,9 @@ int main (int argc, const char* argv[]) /* { dg-final { scan-tree-dump-times "vectorized 0 loops" 2 "vect" { target { ! { vect_perm_short || vect_load_lanes } } } } } */ /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_perm_short || vect_load_lanes } } } } */ -/* { dg-final { scan-tree-dump-times "permutation requires at least three vectors" 1 "vect" { target { vect_perm_short && { ! vect_perm3_short } } } } } */ +/* We don't try permutes with a group size of 3 for variable-length + vectors. */ +/* { dg-final { scan-tree-dump-times "permutation requires at least three vectors" 1 "vect" { target { vect_perm_short && { ! vect_perm3_short } } xfail vect_variable_length } } } */ /* { dg-final { scan-tree-dump-not "permutation requires at least three vectors" "vect" { target vect_perm3_short } } } */ /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" { target { { ! vect_perm3_short } || vect_load_lanes } } } } */ /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target { vect_perm3_short && { ! vect_load_lanes } } } } } */ |