https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72866
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Thu Sep 1 11:46:57 2016 New Revision: 239931 URL: https://gcc.gnu.org/viewcvs?rev=239931&root=gcc&view=rev Log: Backported from mainline 2016-08-30 Jakub Jelinek <ja...@redhat.com> PR tree-optimization/72866 * tree-vect-patterns.c (search_type_for_mask): Turn into a small wrapper, move all code to ... (search_type_for_mask_1): ... this new function. Add caching and adjust recursive calls. * gcc.dg/vect/pr72866.c: New test. Added: branches/gcc-6-branch/gcc/testsuite/gcc.dg/vect/pr72866.c Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/testsuite/ChangeLog branches/gcc-6-branch/gcc/tree-vect-patterns.c