From eb066284cb8cdf7f46f455c3e975cf1b349a0487 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Fri, 20 May 2016 09:09:28 +0000 Subject: [PATCH] re PR target/71185 (ice in gimplify_modify_expr, at gimplify.c:4873) 2016-05-20 Richard Biener PR tree-optimization/71185 * tree-ssa-loop-prefetch.c (gather_memory_references): Drop register operations. * gcc.dg/tree-ssa/pr71185.c: New testcase. From-SVN: r236499 --- gcc/ChangeLog | 6 ++++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/tree-ssa/pr71185.c | 13 +++++++++++++ gcc/tree-ssa-loop-prefetch.c | 3 +++ 4 files changed, 27 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr71185.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8471e8a01f4..83a6f3cc566 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-05-20 Richard Biener + + PR tree-optimization/71185 + * tree-ssa-loop-prefetch.c (gather_memory_references): Drop + register operations. + 2016-05-20 Richard Biener * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Use diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0c2f4bc2dfe..87588f02129 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-05-20 Richard Biener + + PR tree-optimization/71185 + * gcc.dg/tree-ssa/pr71185.c: New testcase. + 2016-05-20 Richard Biener * gcc.dg/tree-ssa/ifc-cd.c: Adjust. diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr71185.c b/gcc/testsuite/gcc.dg/tree-ssa/pr71185.c new file mode 100644 index 00000000000..c2e246f1cd0 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr71185.c @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-options "-O3" } */ +/* { dg-options "-O3 -march=barcelona" { target x86_64-*-* i?86-*-* } } */ + +union U { struct S { int l; int m; } p; long long a; } b; +int a, c; + +void +foo () +{ + for (; b.p.m; b.a += c) + a = b.p.l / 65536.0 * 65536.0; +} diff --git a/gcc/tree-ssa-loop-prefetch.c b/gcc/tree-ssa-loop-prefetch.c index 49fd597a892..fb8c4763769 100644 --- a/gcc/tree-ssa-loop-prefetch.c +++ b/gcc/tree-ssa-loop-prefetch.c @@ -631,6 +631,9 @@ gather_memory_references (struct loop *loop, bool *no_other_refs, unsigned *ref_ continue; } + if (! gimple_vuse (stmt)) + continue; + lhs = gimple_assign_lhs (stmt); rhs = gimple_assign_rhs1 (stmt); -- 2.30.2