Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.target/s390/zvector/vec-search-string-cc-1.c @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | 1830386684a0 |
children |
line wrap: on
line source
/* { dg-do run } */ /* { dg-require-effective-target s390_vxe2 } */ /* { dg-options "-O3 -mzarch -march=arch13 -mzvector --save-temps" } */ #include <vecintrin.h> void __attribute__((noinline,noclone)) vstrs1 () { int cc; vector signed char haystack = { 'h', 'o', 'l', 'a', 'h', 'i', 'h', 'o', 'h', 'i', 'h', 'o' }; vector signed char needle = { 'h', 'i', 'h', 'o' }; vector unsigned char length = { 0 }; length[7] = 4; vector unsigned char result = vec_search_string_cc (haystack, needle, length, &cc); if (result[7] != 4) __builtin_abort (); /* CC2 indicates a full match. */ if (cc != 2) __builtin_abort (); } int main () { vstrs1 (); return 0; } /* { dg-final { scan-assembler-times "vstrsb\t" 1 } } */