public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/64024] New: gcc.dg/vect/vect-simd-clone-6.c ICEs
@ 2014-11-22 11:58 ubizjak at gmail dot com
  2014-11-22 17:36 ` [Bug tree-optimization/64024] [5 Regression] " hjl.tools at gmail dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: ubizjak at gmail dot com @ 2014-11-22 11:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64024

            Bug ID: 64024
           Summary: gcc.dg/vect/vect-simd-clone-6.c ICEs
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ubizjak at gmail dot com

Created attachment 34074
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34074&action=edit
Preprocessed source

./cc1 -quiet -ftree-vectorize -fno-vect-cost-model -O2 -fopenmp-simd -mavx -m32
vect-simd-clone-6.i
/home/uros/gcc-svn/trunk/gcc/testsuite/gcc.dg/vect/vect-simd-clone-6.c: In
function ‘bar’:
/home/uros/gcc-svn/trunk/gcc/testsuite/gcc.dg/vect/vect-simd-clone-6.c:24:1:
internal compiler error: Segmentation fault
 bar (int x)
 ^
0xd18076 crash_signal
        /home/uros/gcc-svn/trunk/gcc/toplev.c:359
0x9ca6cf is_gimple_variable
        /home/uros/gcc-svn/trunk/gcc/gimple-expr.h:83
0x9cd0e5 is_gimple_val(tree_node*)
        /home/uros/gcc-svn/trunk/gcc/gimple-expr.c:820
0xa8c59e force_gimple_operand_1(tree_node*, gimple_statement_base**, bool
(*)(tree_node*), tree_node*)
        /home/uros/gcc-svn/trunk/gcc/gimplify-me.c:70
0xa8c79b force_gimple_operand(tree_node*, gimple_statement_base**, bool,
tree_node*)
        /home/uros/gcc-svn/trunk/gcc/gimplify-me.c:113
0xf9b87e vectorizable_simd_clone_call
        /home/uros/gcc-svn/trunk/gcc/tree-vect-stmts.c:2987
0xfa9017 vect_transform_stmt(gimple_statement_base*, gimple_stmt_iterator*,
bool*, _slp_tree*, _slp_instance*)
        /home/uros/gcc-svn/trunk/gcc/tree-vect-stmts.c:7260
0xfbd7fc vect_transform_loop(_loop_vec_info*)
        /home/uros/gcc-svn/trunk/gcc/tree-vect-loop.c:6131
0xfd2c01 vectorize_loops()
        /home/uros/gcc-svn/trunk/gcc/tree-vectorizer.c:491
0xecd257 execute
        /home/uros/gcc-svn/trunk/gcc/tree-ssa-loop.c:289
Please submit a full bug report,
>From gcc-bugs-return-468057-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Nov 22 12:00:17 2014
Return-Path: <gcc-bugs-return-468057-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 15976 invoked by alias); 22 Nov 2014 12:00:16 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 15918 invoked by uid 48); 22 Nov 2014 12:00:13 -0000
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/64024] gcc.dg/vect/vect-simd-clone-6.c ICEs
Date: Sat, 22 Nov 2014 12:00:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ubizjak at gmail dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-64024-4-V4FFfL6jYN@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-64024-4@http.gcc.gnu.org/bugzilla/>
References: <bug-64024-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-11/txt/msg02529.txt.bz2
Content-length: 3668

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64024

--- Comment #1 from Uroš Bizjak <ubizjak at gmail dot com> ---
gdb says:

Program received signal SIGSEGV, Segmentation fault.
0x00000000009ca6cf in is_gimple_variable (t=0x0) at
/home/uros/gcc-svn/trunk/gcc/gimple-expr.h:83
83        return (TREE_CODE (t) == VAR_DECL
(gdb) list
78      /* Return true if T is a variable.  */
79
80      static inline bool
81      is_gimple_variable (tree t)
82      {
83        return (TREE_CODE (t) == VAR_DECL
84                || TREE_CODE (t) == PARM_DECL
85                || TREE_CODE (t) == RESULT_DECL
86                || TREE_CODE (t) == SSA_NAME);
87      }
(gdb) bt
#0  0x00000000009ca6cf in is_gimple_variable (t=0x0) at
/home/uros/gcc-svn/trunk/gcc/gimple-expr.h:83
#1  0x00000000009cd0e6 in is_gimple_val (t=0x0) at
/home/uros/gcc-svn/trunk/gcc/gimple-expr.c:820
#2  0x0000000000a8c59f in force_gimple_operand_1 (expr=0x0,
stmts=0x7fffffffd348, gimple_test_f=0x9cd0ce <is_gimple_val(tree_node*)>,
var=0x0)
    at /home/uros/gcc-svn/trunk/gcc/gimplify-me.c:70
#3  0x0000000000a8c79c in force_gimple_operand (expr=0x0, stmts=0x7fffffffd348,
simple=true, var=0x0) at /home/uros/gcc-svn/trunk/gcc/gimplify-me.c:113
#4  0x0000000000f9b87f in vectorizable_simd_clone_call (stmt=0x7ffff1a3a8e8,
gsi=0x7fffffffd700, vec_stmt=0x7fffffffd660, slp_node=0x0)
    at /home/uros/gcc-svn/trunk/gcc/tree-vect-stmts.c:2987
#5  0x0000000000fa9018 in vect_transform_stmt (stmt=0x7ffff1a3a8e8,
gsi=0x7fffffffd700, grouped_store=0x7fffffffd763, slp_node=0x0,
slp_node_instance=0x0)
    at /home/uros/gcc-svn/trunk/gcc/tree-vect-stmts.c:7260
#6  0x0000000000fbd7fd in vect_transform_loop (loop_vinfo=0x21bd660) at
/home/uros/gcc-svn/trunk/gcc/tree-vect-loop.c:6131
#7  0x0000000000fd2c02 in vectorize_loops () at
/home/uros/gcc-svn/trunk/gcc/tree-vectorizer.c:491
#8  0x0000000000ecd258 in (anonymous namespace)::pass_vectorize::execute
(this=0x212f9b0, fun=0x7ffff1a42a80) at
/home/uros/gcc-svn/trunk/gcc/tree-ssa-loop.c:289
#9  0x0000000000c1914d in execute_one_pass (pass=0x212f9b0) at
/home/uros/gcc-svn/trunk/gcc/passes.c:2311
#10 0x0000000000c19387 in execute_pass_list_1 (pass=0x212f9b0) at
/home/uros/gcc-svn/trunk/gcc/passes.c:2363
#11 0x0000000000c193b8 in execute_pass_list_1 (pass=0x212f230) at
/home/uros/gcc-svn/trunk/gcc/passes.c:2364
#12 0x0000000000c193b8 in execute_pass_list_1 (pass=0x212e0f0) at
/home/uros/gcc-svn/trunk/gcc/passes.c:2364
#13 0x0000000000c193f5 in execute_pass_list (fn=0x7ffff1a42a80, pass=0x212e030)
at /home/uros/gcc-svn/trunk/gcc/passes.c:2374
#14 0x000000000083a838 in cgraph_node::expand (this=0x7ffff1a45188) at
/home/uros/gcc-svn/trunk/gcc/cgraphunit.c:1773
#15 0x000000000083ae69 in expand_all_functions () at
/home/uros/gcc-svn/trunk/gcc/cgraphunit.c:1909
#16 0x000000000083b973 in symbol_table::compile (this=0x7ffff18a8000) at
/home/uros/gcc-svn/trunk/gcc/cgraphunit.c:2263
#17 0x000000000083bb1e in symbol_table::finalize_compilation_unit
(this=0x7ffff18a8000) at /home/uros/gcc-svn/trunk/gcc/cgraphunit.c:2340
#18 0x000000000068ad19 in c_write_global_declarations () at
/home/uros/gcc-svn/trunk/gcc/c/c-decl.c:10777
#19 0x0000000000d1893a in compile_file () at
/home/uros/gcc-svn/trunk/gcc/toplev.c:584
#20 0x0000000000d1ad4e in do_compile () at
/home/uros/gcc-svn/trunk/gcc/toplev.c:2041
#21 0x0000000000d1af58 in toplev::main (this=0x7fffffffdd4f, argc=9,
argv=0x7fffffffde48) at /home/uros/gcc-svn/trunk/gcc/toplev.c:2138
#22 0x00000000016608f2 in main (argc=9, argv=0x7fffffffde48) at
/home/uros/gcc-svn/trunk/gcc/main.c:38
>From gcc-bugs-return-468058-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Nov 22 12:11:07 2014
Return-Path: <gcc-bugs-return-468058-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 22620 invoked by alias); 22 Nov 2014 12:11:06 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 22595 invoked by uid 48); 22 Nov 2014 12:11:03 -0000
From: "bernd.edlinger at hotmail dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/63917] [5 Regression] r217646 caused many failures
Date: Sat, 22 Nov 2014 12:11:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: rtl-optimization
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords: wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: bernd.edlinger at hotmail dot de
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P1
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-63917-4-1vQHXTyh15@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-63917-4@http.gcc.gnu.org/bugzilla/>
References: <bug-63917-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-11/txt/msg02530.txt.bz2
Content-length: 464

https://gcc.gnu.org/bugzilla/show_bug.cgi?idc917

Bernd Edlinger <bernd.edlinger at hotmail dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bernd.edlinger at hotmail dot de

--- Comment #7 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
also gmp-4.3.2/mpz/n_pow_ui.c is miscompiled because of this.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/64024] [5 Regression] gcc.dg/vect/vect-simd-clone-6.c ICEs
  2014-11-22 11:58 [Bug tree-optimization/64024] New: gcc.dg/vect/vect-simd-clone-6.c ICEs ubizjak at gmail dot com
@ 2014-11-22 17:36 ` hjl.tools at gmail dot com
  2014-11-24 11:26 ` rguenth at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: hjl.tools at gmail dot com @ 2014-11-22 17:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64024

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-11-22
                 CC|                            |hubicka at ucw dot cz
   Target Milestone|---                         |5.0
            Summary|gcc.dg/vect/vect-simd-clone |[5 Regression]
                   |-6.c ICEs                   |gcc.dg/vect/vect-simd-clone
                   |                            |-6.c ICEs
     Ever confirmed|0                           |1

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
It was caused by r211599.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/64024] [5 Regression] gcc.dg/vect/vect-simd-clone-6.c ICEs
  2014-11-22 11:58 [Bug tree-optimization/64024] New: gcc.dg/vect/vect-simd-clone-6.c ICEs ubizjak at gmail dot com
  2014-11-22 17:36 ` [Bug tree-optimization/64024] [5 Regression] " hjl.tools at gmail dot com
@ 2014-11-24 11:26 ` rguenth at gcc dot gnu.org
  2014-11-24 15:15 ` jakub at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-11-24 11:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64024

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/64024] [5 Regression] gcc.dg/vect/vect-simd-clone-6.c ICEs
  2014-11-22 11:58 [Bug tree-optimization/64024] New: gcc.dg/vect/vect-simd-clone-6.c ICEs ubizjak at gmail dot com
  2014-11-22 17:36 ` [Bug tree-optimization/64024] [5 Regression] " hjl.tools at gmail dot com
  2014-11-24 11:26 ` rguenth at gcc dot gnu.org
@ 2014-11-24 15:15 ` jakub at gcc dot gnu.org
  2014-11-24 15:56 ` jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-11-24 15:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64024

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So, the problem is that we have during vector analysis:

<bb 9>:
# i_33 = PHI <0(8), i_25(11)>
# ivtmp_27 = PHI <1024(8), ivtmp_26(11)>
_17 = (unsigned short) i_33;
_18 = _17 * 3;
_20 = (int) _18;
_22 = a[i_33];
_23 = foo (_22, pretmp_38, _20);
c[i_33] = _23;
i_25 = i_33 + 1;

and simple_iv returns true for _20, despite the (unsigned short) cast in there,
as 0 * 3 nor 1023 * 3 overflows.  But during vector transform phase the bb is
already:

<bb 9>:
# i_33 = PHI <i_46(28), i_25(11)>
# ivtmp_27 = PHI <ivtmp_49(28), ivtmp_26(11)>
# vect_vec_iv_.213_89 = PHI <vect_cst_.211_87(28), vect_vec_iv_.213_90(11)>
# vectp_a.219_100 = PHI <vectp_a.220_98(28), vectp_a.219_101(11)>
vect_vec_iv_.213_90 = vect_vec_iv_.213_89 + vect_cst_.212_88;
vect_vec_iv_.213_92 = vect_vec_iv_.213_89 + vect_cst_.214_91;
vect__17.215_93 = VEC_PACK_TRUNC_EXPR <vect_vec_iv_.213_89,
vect_vec_iv_.213_92>;
_17 = (unsigned short) i_33;
vect__18.216_95 = vect__17.215_93 * vect_cst_.217_94;
_18 = _17 * 3;
vect__20.218_96 = [vec_unpack_lo_expr] vect__18.216_95;
vect__20.218_97 = [vec_unpack_hi_expr] vect__18.216_95;
_20 = (int) _18;
vect__22.221_102 = MEM[(int *)vectp_a.219_100];
vectp_a.219_103 = vectp_a.219_100 + 16;
vect__22.222_104 = MEM[(int *)vectp_a.219_103];
_22 = a[i_33];
_23 = foo (_22, pretmp_38, _20);
c[i_33] = _23;
i_25 = i_33 + 1;

and in that case a) not sure if SCEV knows that the loop max bound is still
1024 b) as the initial value for i is an SSA_NAME, not constant, it also
doesn't know it behaves as proper linear variable.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/64024] [5 Regression] gcc.dg/vect/vect-simd-clone-6.c ICEs
  2014-11-22 11:58 [Bug tree-optimization/64024] New: gcc.dg/vect/vect-simd-clone-6.c ICEs ubizjak at gmail dot com
                   ` (2 preceding siblings ...)
  2014-11-24 15:15 ` jakub at gcc dot gnu.org
@ 2014-11-24 15:56 ` jakub at gcc dot gnu.org
  2014-11-24 16:06 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-11-24 15:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64024

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Perhaps for the linear arguments we could remember the {initial_val,
linear_step} pair from the analysis phase (somewhere in the stmt_info) and if
simple_iv would fail during the transform phase, use that (after adjusting
initial_val, to add number of scalar iteratorions before the vectorized loop;
Richard, where can that be read from?).


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/64024] [5 Regression] gcc.dg/vect/vect-simd-clone-6.c ICEs
  2014-11-22 11:58 [Bug tree-optimization/64024] New: gcc.dg/vect/vect-simd-clone-6.c ICEs ubizjak at gmail dot com
                   ` (3 preceding siblings ...)
  2014-11-24 15:56 ` jakub at gcc dot gnu.org
@ 2014-11-24 16:06 ` rguenth at gcc dot gnu.org
  2014-11-24 16:16 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-11-24 16:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64024

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Generally calling SCEV analysis again during the transform phase asks for
trouble
(though it may work in most cases).  This means that the simple_iv calls (which
are mostly useless as computed stuff isn't actually used in most cases) should
be avoided at transform time.

Didn't look into this specific case but can do so (just assign the bug to me
then).


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/64024] [5 Regression] gcc.dg/vect/vect-simd-clone-6.c ICEs
  2014-11-22 11:58 [Bug tree-optimization/64024] New: gcc.dg/vect/vect-simd-clone-6.c ICEs ubizjak at gmail dot com
                   ` (4 preceding siblings ...)
  2014-11-24 16:06 ` rguenth at gcc dot gnu.org
@ 2014-11-24 16:16 ` jakub at gcc dot gnu.org
  2014-11-24 16:29 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-11-24 16:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64024

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #5)
> Generally calling SCEV analysis again during the transform phase asks for
> trouble
> (though it may work in most cases).  This means that the simple_iv calls
> (which
> are mostly useless as computed stuff isn't actually used in most cases)
> should
> be avoided at transform time.
> 
> Didn't look into this specific case but can do so (just assign the bug to me
> then).

I can handle the storing of the op/linear_step combo somewhere, just don't know
how to adjust it.  Shall vect_update_inits_of_drs update those, or can it e.g.
stick the tree somewhere in the LOOP_VINFO (or its caller) and
vect_simd_clone_call use it?


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/64024] [5 Regression] gcc.dg/vect/vect-simd-clone-6.c ICEs
  2014-11-22 11:58 [Bug tree-optimization/64024] New: gcc.dg/vect/vect-simd-clone-6.c ICEs ubizjak at gmail dot com
                   ` (5 preceding siblings ...)
  2014-11-24 16:16 ` jakub at gcc dot gnu.org
@ 2014-11-24 16:29 ` rguenth at gcc dot gnu.org
  2014-11-24 16:31 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-11-24 16:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64024

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #6)
> (In reply to Richard Biener from comment #5)
> > Generally calling SCEV analysis again during the transform phase asks for
> > trouble
> > (though it may work in most cases).  This means that the simple_iv calls
> > (which
> > are mostly useless as computed stuff isn't actually used in most cases)
> > should
> > be avoided at transform time.
> > 
> > Didn't look into this specific case but can do so (just assign the bug to me
> > then).
> 
> I can handle the storing of the op/linear_step combo somewhere, just don't
> know how to adjust it.  Shall vect_update_inits_of_drs update those, or can
> it e.g. stick the tree somewhere in the LOOP_VINFO (or its caller) and
> vect_simd_clone_call use it?

Not sure, but "linear_step" sounds like sth available already via
STMT_VINFO_LOOP_PHI_EVOLUTION_PART?  That is, you could store it there
(on the IV def stmt vinfo).  Possibly adding a new access macro that doesn't
have "PHI" in its name (and adjusting the comment before the stmt vinfo
field).


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/64024] [5 Regression] gcc.dg/vect/vect-simd-clone-6.c ICEs
  2014-11-22 11:58 [Bug tree-optimization/64024] New: gcc.dg/vect/vect-simd-clone-6.c ICEs ubizjak at gmail dot com
                   ` (6 preceding siblings ...)
  2014-11-24 16:29 ` rguenth at gcc dot gnu.org
@ 2014-11-24 16:31 ` rguenth at gcc dot gnu.org
  2014-11-26 14:54 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-11-24 16:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64024

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
Usually it is only that which is hard to recompute, the base is pretty much
stable.  But of course you never know.  You could also simply add
a vec<simd_call_arg_info> to the stmt vinfo struct ...


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/64024] [5 Regression] gcc.dg/vect/vect-simd-clone-6.c ICEs
  2014-11-22 11:58 [Bug tree-optimization/64024] New: gcc.dg/vect/vect-simd-clone-6.c ICEs ubizjak at gmail dot com
                   ` (7 preceding siblings ...)
  2014-11-24 16:31 ` rguenth at gcc dot gnu.org
@ 2014-11-26 14:54 ` jakub at gcc dot gnu.org
  2014-11-27 11:03 ` jakub at gcc dot gnu.org
  2014-11-28  9:31 ` jakub at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-11-26 14:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64024

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 34125
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34125&action=edit
gcc5-pr64024.patch

Untested fix (well, passed
make check-gcc
RUNTESTFLAGS='--target_board=unix\{-m32,-m32/-fcommon,-m64,-m64/-fcommon\}
vect.exp=vect-simd*'
).


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/64024] [5 Regression] gcc.dg/vect/vect-simd-clone-6.c ICEs
  2014-11-22 11:58 [Bug tree-optimization/64024] New: gcc.dg/vect/vect-simd-clone-6.c ICEs ubizjak at gmail dot com
                   ` (8 preceding siblings ...)
  2014-11-26 14:54 ` jakub at gcc dot gnu.org
@ 2014-11-27 11:03 ` jakub at gcc dot gnu.org
  2014-11-28  9:31 ` jakub at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-11-27 11:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64024

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Thu Nov 27 11:03:12 2014
New Revision: 218120

URL: https://gcc.gnu.org/viewcvs?rev=218120&root=gcc&view=rev
Log:
    PR tree-optimization/64024
    * tree-vectorizer.h (struct _stmt_vec_info): Remove simd_clone_fndecl
    field.  Add simd_clone_info field.
    (STMT_VINFO_SIMD_CLONE_FNDECL): Remove.
    (STMT_VINFO_SIMD_CLONE_INFO): Define.
    * tree-vect-stmts.c (vectorizable_simd_clone_call): Adjust for
    STMT_VINFO_SIMD_CLONE_FNDECL becoming first element of
    STMT_VINFO_SIMD_CLONE_INFO vector.  For linear arguments, remember
    base and linear_step from analysis phase and use it during transform
    phase, biased by the difference between LOOP_VINFO_NITERS{_UNCHANGED,}
    multiplied by linear_step.
    (free_stmt_vec_info): Release STMT_VINFO_SIMD_CLONE_INFO.

    * gcc.dg/vect/vect-simd-clone-13.c: New test.
    * gcc.dg/vect/vect-simd-clone-14.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/vect/vect-simd-clone-13.c
    trunk/gcc/testsuite/gcc.dg/vect/vect-simd-clone-14.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-vect-stmts.c
    trunk/gcc/tree-vectorizer.h


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug tree-optimization/64024] [5 Regression] gcc.dg/vect/vect-simd-clone-6.c ICEs
  2014-11-22 11:58 [Bug tree-optimization/64024] New: gcc.dg/vect/vect-simd-clone-6.c ICEs ubizjak at gmail dot com
                   ` (9 preceding siblings ...)
  2014-11-27 11:03 ` jakub at gcc dot gnu.org
@ 2014-11-28  9:31 ` jakub at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-11-28  9:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64024

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-11-28  9:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-22 11:58 [Bug tree-optimization/64024] New: gcc.dg/vect/vect-simd-clone-6.c ICEs ubizjak at gmail dot com
2014-11-22 17:36 ` [Bug tree-optimization/64024] [5 Regression] " hjl.tools at gmail dot com
2014-11-24 11:26 ` rguenth at gcc dot gnu.org
2014-11-24 15:15 ` jakub at gcc dot gnu.org
2014-11-24 15:56 ` jakub at gcc dot gnu.org
2014-11-24 16:06 ` rguenth at gcc dot gnu.org
2014-11-24 16:16 ` jakub at gcc dot gnu.org
2014-11-24 16:29 ` rguenth at gcc dot gnu.org
2014-11-24 16:31 ` rguenth at gcc dot gnu.org
2014-11-26 14:54 ` jakub at gcc dot gnu.org
2014-11-27 11:03 ` jakub at gcc dot gnu.org
2014-11-28  9:31 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).