This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gomp4.1] Handle linear clause modifiers in declare simd
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Ilya Verbin <iverbin at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 14 Jul 2015 14:48:47 +0200
- Subject: Re: [gomp4.1] Handle linear clause modifiers in declare simd
- Authentication-results: sourceware.org; auth=none
- References: <20150701105538 dot GT10247 at tucnak dot redhat dot com> <20150714114034 dot GA901 at msticlxl57 dot ims dot intel dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Jul 14, 2015 at 02:41:04PM +0300, Ilya Verbin wrote:
> This caused:
>
> gcc/tree-vect-stmts.c: In function âbool vectorizable_simd_clone_call(gimple, gimple_stmt_iterator*, gimple_statement_base**, slp_tree)â:
> gcc/tree-vect-stmts.c:2810:13: error: enumeration value âSIMD_CLONE_ARG_TYPE_LINEAR_REF_CONSTANT_STEPâ not handled in switch [-Werror=switch]
> switch (n->simdclone->args[i].arg_type)
> ^
> gcc/tree-vect-stmts.c:2810:13: error: enumeration value âSIMD_CLONE_ARG_TYPE_LINEAR_UVAL_CONSTANT_STEPâ not handled in switch [-Werror=switch]
> gcc/tree-vect-stmts.c:2810:13: error: enumeration value âSIMD_CLONE_ARG_TYPE_LINEAR_VAL_CONSTANT_STEPâ not handled in switch [-Werror=switch]
> cc1plus: all warnings being treated as errors
> make[4]: *** [tree-vect-stmts.o] Error 1
Oops, missed that warning (and haven't bootstrapped the branch
for a while now).
Fixed thusly, to handle VAL/UVAL better we'll need to find the last
store into the memory and determine if the stored value is linear.
Something deferred for later.
2015-07-14 Jakub Jelinek <jakub@redhat.com>
* tree-vect-stmts.c (vectorizable_simd_clone_call): Handle
SIMD_CLONE_ARG_TYPE_LINEAR_{REF,VAL,UVAL}_CONSTANT_STEP.
--- gcc/tree-vect-stmts.c.jj 2015-07-14 14:30:06.000000000 +0200
+++ gcc/tree-vect-stmts.c 2015-07-14 14:45:08.032376586 +0200
@@ -2825,6 +2825,7 @@ vectorizable_simd_clone_call (gimple stm
i = -1;
break;
case SIMD_CLONE_ARG_TYPE_LINEAR_CONSTANT_STEP:
+ case SIMD_CLONE_ARG_TYPE_LINEAR_REF_CONSTANT_STEP:
if (arginfo[i].dt == vect_constant_def
|| arginfo[i].dt == vect_external_def
|| (arginfo[i].linear_step
@@ -2832,6 +2833,8 @@ vectorizable_simd_clone_call (gimple stm
i = -1;
break;
case SIMD_CLONE_ARG_TYPE_LINEAR_VARIABLE_STEP:
+ case SIMD_CLONE_ARG_TYPE_LINEAR_VAL_CONSTANT_STEP:
+ case SIMD_CLONE_ARG_TYPE_LINEAR_UVAL_CONSTANT_STEP:
/* FORNOW */
i = -1;
break;
Jakub