[PATCH] testsuite/gcc.dg/strcmpopt_6.c: Add space in array for terminator.

2020-02-18 Thread Jon Beniston
Hi, The patch adds space for the string terminator, as the function is called with test_strcpy_strcmp_abc ("abcd") ChangeLog gcc/testsuite 2020-02-18 Jon Beniston * gcc.dg/strcmpopt_6.c: Add space in array for terminator. diff --git a/gcc/testsuite/gcc.dg/strcmpopt

RE: [RFC, vectorizer] Allow half_type for left shift in vect_operation_fits_smaller_type?

2017-11-20 Thread Jon Beniston
es up on right shift operation or different new_type/use_type cases. Two test cases are added, one should be recognized as pattern and the other shouldn't. Bootstrap OK and no gcc/g++ regression on x86_64/AArch64. Does this look OK? 2017-11-20 Jon Beniston gcc/ * tre

[RFC, vectorizer] Allow half_type for left shift in vect_operation_fits_smaller_type?

2017-09-21 Thread Jon Beniston
ROMOTED b, c, d; b = (T_PROMOTED) a; c = b << 2; d = (T_ORIG) c; Performing the left shift on T_ORIG directly should be equal to performing it on T_PROMOTED then converting back to T_ORIG. x86-64/AArch64/PPC64 bootstrap OK (finished on gcc farms) and no regression

RE: [RFC, vectorizer] Allow single element vector types for vector reduction operations

2017-09-07 Thread Jon Beniston
Hi Bernd, >This seems to ring a bell. I think I submitted a patch for this here >- is this the same problem? >https://gcc.gnu.org/ml/gcc-patches/2010-12/msg01724.html Looks like it. Cheers, Jon

RE: [RFC, vectorizer] Allow single element vector types for vector reduction operations

2017-08-30 Thread Jon Beniston
nd there is no regression on gcc tests on my port. Meanwhile x86-64 bootstraps OK and no regression on gcc/g++ test. Does this look OK? gcc/ 2017-08-30 Jon Beniston Richard Biener diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c index cfdb72c..5ebeac2 100644 ---

RE: [RFC, vectorizer] Allow single element vector types for vector reduction operations

2017-08-30 Thread Jon Beniston
t a shift operation. Given TYPE_IN is returned from get_vectype_for_scalar_type, is it safe to simply pass optab_vector in vect_pattern_recog_1? I have verified the following middle-end fix also works for my port, it passed also x86-64 bootstrap and there is no regression in gcc/g++ regr

RE: [RFC, vectorizer] Allow single element vector types for vector reduction operations

2017-08-28 Thread Jon Beniston
Hi Richard, >- if (nunits < 1) /* Support V1SI. */ >+ if (nunits < 1 || (nunits == 1 && !reduct_p)) > return NULL_TREE; > >doesn't seem to be against trunk which has > > if (nunits <= 1) >return NULL_TREE; > >so what happens if you just change that to > > if (nunits < 1) >return N

[RFC, vectorizer] Allow single element vector types for vector reduction operations

2017-08-27 Thread Jon Beniston
lar result with wider types than the element type of input operands. I have tried to make the auto-vectorizer work for my V2HI dot product case, with the patch attached. Is this the correct approach? Cheers, Jon gcc/ 2017-08-27 Jon Beniston * tree-vectorizer.h (get_vectyp