Skip to content

Commit

Permalink
2018-11-29 Richard Biener <[email protected]>
Browse files Browse the repository at this point in the history
	PR tree-optimization/88243
	* tree-vect-patterns.c (vect_mark_pattern_stmts): Set the def
	type of all pattern-sequence stmts to vect_internal_def.

	* gcc.dg/torture/pr88243.c: New testcase.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@266615 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
rguenth committed Nov 29, 2018
1 parent c1ddd99 commit 1650c1e
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 1 deletion.
6 changes: 6 additions & 0 deletions gcc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2018-11-29 Richard Biener <[email protected]>

PR tree-optimization/88243
* tree-vect-patterns.c (vect_mark_pattern_stmts): Set the def
type of all pattern-sequence stmts to vect_internal_def.

2018-11-29 Andre Vieira <[email protected]>

PR target/88224
Expand Down
5 changes: 5 additions & 0 deletions gcc/testsuite/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2018-11-29 Richard Biener <[email protected]>

PR tree-optimization/88243
* gcc.dg/torture/pr88243.c: New testcase.

2018-11-29 Jakub Jelinek <[email protected]>

PR c++/87539
Expand Down
18 changes: 18 additions & 0 deletions gcc/testsuite/gcc.dg/torture/pr88243.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/* { dg-do compile } */

int a, b, c;

void d()
{
int e, f;
for (; a; a++)
{
e = (__UINTPTR_TYPE__)d;
b = 0;
for (; b < 2; b++)
{
f = e = e / 2;
c = c + f;
}
}
}
10 changes: 9 additions & 1 deletion gcc/tree-vect-patterns.c
Original file line number Diff line number Diff line change
Expand Up @@ -4723,7 +4723,15 @@ vect_mark_pattern_stmts (stmt_vec_info orig_stmt_info, gimple *pattern_stmt,
if (def_seq)
for (gimple_stmt_iterator si = gsi_start (def_seq);
!gsi_end_p (si); gsi_next (&si))
vect_init_pattern_stmt (gsi_stmt (si), orig_stmt_info, pattern_vectype);
{
stmt_vec_info pattern_stmt_info
= vect_init_pattern_stmt (gsi_stmt (si),
orig_stmt_info, pattern_vectype);
/* Stmts in the def sequence are not vectorizable cycle or
induction defs, instead they should all be vect_internal_def
feeding the main pattern stmt which retains this def type. */
STMT_VINFO_DEF_TYPE (pattern_stmt_info) = vect_internal_def;
}

if (orig_pattern_stmt)
{
Expand Down

0 comments on commit 1650c1e

Please sign in to comment.