public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/64878] New: [5 Regression] Miscompilation of nntpgrab
@ 2015-01-30 17:29 jakub at gcc dot gnu.org
2015-01-30 17:29 ` [Bug tree-optimization/64878] " jakub at gcc dot gnu.org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-01-30 17:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64878
Bug ID: 64878
Summary: [5 Regression] Miscompilation of nntpgrab
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: jakub at gcc dot gnu.org
Starting with r218451 gcc miscompiles at -O2 on x86_64-linux (both -m64 and
-m32) following testcase:
struct A { int a1; };
struct B { char *b1; int b2; int b3; };
struct C { char *c1; int c2; struct B *c3; };
extern struct A *f1 (char *s);
static struct A *f2 (struct C *x);
__attribute__ ((noinline, noclone)) int f3 (struct A *x, struct A *z) { asm
volatile ("" : : "g" (x), "g" (z) : "memory"); return 0; }
__attribute__ ((noinline, noclone)) void f4 (struct A *x, char *y, struct A *z)
{ asm volatile ("" : : "g" (x), "g" (z), "g" (y) : "memory"); }
__attribute__ ((noinline, noclone)) struct B *f5 (void) { static char b[32];
static struct B f3 = { b, 0, 32 }; return &f3; }
__attribute__ ((noinline, noclone)) int f6 (struct B *p, char *w, int z) { asm
volatile ("" : : "g" (p), "g" (w), "g" (z) : "memory"); return 0; }
__attribute__ ((noinline, noclone)) void f7 (struct B *p) { asm volatile ("" :
: "g" (p) : "memory"); }
__attribute__ ((noinline, noclone)) void f8 (struct B *p) { asm volatile ("" :
: "g" (p) : "memory"); }
__attribute__ ((noinline, noclone)) void f9 (struct A *x) { asm volatile ("" :
: "g" (x) : "memory"); }
__attribute__ ((noinline, noclone)) struct A *f10 (void) { static struct A j;
asm volatile ("" : : : "memory"); return &j; }
__attribute__ ((noinline, noclone)) struct A *f11 (void) { static struct A j;
asm volatile ("" : : : "memory"); return &j; }
__attribute__ ((noinline, noclone)) struct A *f12 (int b) { static struct A j;
asm volatile ("" : : "g" (b) : "memory"); return &j; }
__attribute__ ((noinline, noclone)) struct A *f13 (int i) { static struct A j;
asm volatile ("" : : "g" (i) : "memory"); return &j; }
__attribute__ ((noinline, noclone)) struct A *f14 (double d) { static struct A
j; asm volatile ("" : : "g" (&d) : "memory"); return &j; }
__attribute__ ((noinline, noclone)) struct A *f15 (char *s) { static struct A
j; asm volatile ("" : : "g" (s) : "memory"); return &j; }
char *t = "0123456789abcdef";
char *u = "0123456789.+-e";
__attribute__ ((noinline, noclone)) struct A *
f1 (char *s)
{
struct C f;
struct A *o;
f.c1 = s;
f.c2 = 0;
f.c3 = f5 ();
o = f2 (&f);
f8 (f.c3);
return o;
}
static struct A *
f2 (struct C *x)
{
int a, b, e = 0;
struct A *f = 0, *o;
char *g = 0;
char h = '\0';
int i = 0, j = 0;
a = 0;
b = 1;
char c;
do
{
c = x->c1[x->c2];
switch (a)
{
case 0:
if (c == ' ')
x->c2++;
else if (c == '/')
{
a = 4;
j = x->c2++;
}
else
a = b;
break;
case 1:
switch (c)
{
case '{':
a = 0;
b = 15;
f = f10 ();
x->c2++;
break;
case '[':
a = 0;
b = 13;
f = f11 ();
x->c2++;
break;
case 'N':
case 'n':
a = 3;
j = x->c2++;
break;
case '"':
case '\'':
h = c;
f7 (x->c3);
a = 8;
j = ++x->c2;
break;
case 'T':
case 't':
case 'F':
case 'f':
a = 11;
j = x->c2++;
break;
case '0' ... '9':
case '-':
i = 0;
a = 12;
j = x->c2++;
break;
default:
e = 1;
goto out;
}
break;
case 2:
goto out;
case 3:
if (__builtin_strncmp ("null", x->c1 + j, x->c2 - j))
{
e = 2;
goto out;
}
if (x->c2 - j == 4)
{
f = 0;
b = 2;
a = 0;
}
else
x->c2++;
break;
case 4:
if (c == '*')
a = 5;
else if (c == '/')
a = 6;
else
{
e = 8;
goto out;
}
x->c2++;
break;
case 5:
if (c == '*')
a = 7;
x->c2++;
break;
case 6:
if (c == '\n')
a = 0;
x->c2++;
break;
case 7:
if (c == '/')
a = 0;
else
a = 5;
x->c2++;
break;
case 8:
if (c == h)
{
f6 (x->c3, x->c1 + j, x->c2 - j);
f = f15 (x->c3->b1);
b = 2;
a = 0;
}
else if (c == '\\')
{
b = 8;
a = 9;
}
x->c2++;
break;
case 9:
switch (c)
{
case '"':
case '\\':
f6 (x->c3, x->c1 + j, x->c2 - j - 1);
j = x->c2++;
a = b;
break;
case 'b':
case 'n':
case 'r':
case 't':
f6 (x->c3, x->c1 + j, x->c2 - j - 1);
if (c == 'b')
f6 (x->c3, "\b", 1);
else if (c == 'n')
f6 (x->c3, "\n", 1);
else if (c == 'r')
f6 (x->c3, "\r", 1);
else if (c == 't')
f6 (x->c3, "\t", 1);
j = ++x->c2;
a = b;
break;
case 'u':
f6 (x->c3, x->c1 + j, x->c2 - j - 1);
j = ++x->c2;
a = 10;
break;
default:
e = 7;
goto out;
}
break;
case 10:
if (__builtin_strchr (t, c))
{
x->c2++;
if (x->c2 - j == 4)
{
unsigned char w[3];
unsigned int s =
(((x->c1[j] <= '9') ? x->c1[j] - '0' : (x->c1[j] & 7) + 9) << 12)
+ (((x->c1[j + 1] <= '9') ? x->c1[j + 1] - '0' : (x->c1[j + 1] & 7)
+ 9) << 8)
+ (((x->c1[j + 2] <= '9') ? x->c1[j + 2] - '0' : (x->c1[j + 2] & 7)
+ 9) << 4)
+ ((x->c1[j + 3] <= '9') ? x->c1[j + 3] - '0' : (x->c1[j + 3] & 7)
+ 9);
if (s < 0x80)
{
w[0] = s;
f6 (x->c3, (char *) w, 1);
}
else if (s < 0x800)
{
w[0] = 0xc0 | (s >> 6);
w[1] = 0x80 | (s & 0x3f);
f6 (x->c3, (char *) w, 2);
}
else
{
w[0] = 0x0 | (s >> 12);
w[1] = 0x80 | ((s >> 6) & 0x3f);
w[2] = 0x80 | (s & 0x3f);
f6 (x->c3, (char *) w, 3);
}
j = x->c2;
a = b;
}
}
else
{
e = 7;
goto out;
}
break;
case 11:
if (__builtin_strncmp ("true", x->c1 + j, x->c2 - j) == 0)
{
if (x->c2 - j == 4)
{
f = f12 (1);
b = 2;
a = 0;
}
else
x->c2++;
}
else if (__builtin_strncmp ("false", x->c1 + j, x->c2 - j) == 0)
{
if (x->c2 - j == 5)
{
f = f12 (0);
b = 2;
a = 0;
}
else
x->c2++;
}
else
{
e = 3;
goto out;
}
break;
case 12:
if (!c || !__builtin_strchr (u, c))
{
if (!i)
f = f13 (0);
else
f = f14 (0.0);
b = 2;
a = 0;
}
else
{
if (c == '.' || c == 'e')
i = 1;
x->c2++;
}
break;
case 13:
if (c == ']')
{
x->c2++;
b = 2;
a = 0;
}
else
{
o = f2 (x);
if (((unsigned long) o > (unsigned long) -4000L))
{
e = 5;
goto out;
}
f3 (f, o);
b = 14;
a = 0;
}
break;
case 14:
if (c == ']')
{
x->c2++;
b = 2;
a = 0;
}
else if (c == ',')
{
x->c2++;
b = 13;
a = 0;
}
else
{
f9 (f);
e = 5;
goto out;
}
break;
case 15:
a = 16;
j = x->c2;
break;
case 16:
if (c == '}')
{
x->c2++;
b = 2;
a = 0;
}
else if (c == '"' || c == '\'')
{
h = c;
f7 (x->c3);
a = 17;
j = ++x->c2;
}
else
{
e = 6;
goto out;
}
break;
case 17:
if (c == h)
{
f6 (x->c3, x->c1 + j, x->c2 - j);
g = __builtin_strdup (x->c3->b1);
b = 18;
a = 0;
}
else if (c == '\\')
{
b = 17;
a = 9;
}
x->c2++;
break;
case 18:
if (c == ':')
{
x->c2++;
b = 19;
a = 0;
}
else
{
e = -6;
goto out;
}
break;
case 19:
o = f2 (x);
if (((unsigned long) o > (unsigned long) -4000L))
{
e = 6;
goto out;
}
f4 (f, g, o);
__builtin_free (g);
g = 0;
b = 20;
a = 0;
break;
case 20:
if (c == '}')
{
x->c2++;
b = 2;
a = 0;
}
else if (c == ',')
{
x->c2++;
b = 15;
a = 0;
}
else
{
e = 6;
goto out;
}
break;
}
}
while (c);
if (a != 2 && b != 2)
e = 9;
out:
__builtin_free (g);
if (e == 0)
return f;
f9 (f);
return 0;
}
int
main ()
{
asm volatile ("" : : : "memory");
struct A *r = f1 ("{ \"id\": null, \"blahah\": \"foobarbazbar\", \"barbar\":
{ \"barbarbarba\":"
"\"abcdefgh\", \"ijklmnopqr\": \"stuvwxyzabcdefghijklmnopqrstuv\",
\"xyzxyz\":"
" [ \"1\" ] } }");
if (!r)
__builtin_abort ();
return 0;
}
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/64878] [5 Regression] Miscompilation of nntpgrab
2015-01-30 17:29 [Bug tree-optimization/64878] New: [5 Regression] Miscompilation of nntpgrab jakub at gcc dot gnu.org
@ 2015-01-30 17:29 ` jakub at gcc dot gnu.org
2015-01-30 17:30 ` jakub at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-01-30 17:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64878
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-01-30
CC| |spop at gcc dot gnu.org
Target Milestone|--- |5.0
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/64878] [5 Regression] Miscompilation of nntpgrab
2015-01-30 17:29 [Bug tree-optimization/64878] New: [5 Regression] Miscompilation of nntpgrab jakub at gcc dot gnu.org
2015-01-30 17:29 ` [Bug tree-optimization/64878] " jakub at gcc dot gnu.org
@ 2015-01-30 17:30 ` jakub at gcc dot gnu.org
2015-01-30 20:15 ` spop at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-01-30 17:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64878
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/64878] [5 Regression] Miscompilation of nntpgrab
2015-01-30 17:29 [Bug tree-optimization/64878] New: [5 Regression] Miscompilation of nntpgrab jakub at gcc dot gnu.org
2015-01-30 17:29 ` [Bug tree-optimization/64878] " jakub at gcc dot gnu.org
2015-01-30 17:30 ` jakub at gcc dot gnu.org
@ 2015-01-30 20:15 ` spop at gcc dot gnu.org
2015-01-30 20:19 ` spop at gcc dot gnu.org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: spop at gcc dot gnu.org @ 2015-01-30 20:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64878
--- Comment #1 from Sebastian Pop <spop at gcc dot gnu.org> ---
It fails with -O2 --param max-fsm-thread-paths=10 and does not fail with 9.
This is the thread that generates wrong code:
Registering FSM jump thread: (102, 6) incoming edge; (5, 128) nocopy;
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/64878] [5 Regression] Miscompilation of nntpgrab
2015-01-30 17:29 [Bug tree-optimization/64878] New: [5 Regression] Miscompilation of nntpgrab jakub at gcc dot gnu.org
` (2 preceding siblings ...)
2015-01-30 20:15 ` spop at gcc dot gnu.org
@ 2015-01-30 20:19 ` spop at gcc dot gnu.org
2015-01-30 20:27 ` spop at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: spop at gcc dot gnu.org @ 2015-01-30 20:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64878
--- Comment #2 from Sebastian Pop <spop at gcc dot gnu.org> ---
Jump threading is called twice as two separate passes, the "miscompiled" jump
thread during the first invocation is:
Registering FSM jump thread: (10, 114) incoming edge; (4, 93) nocopy;
The "miscompiled" jump thread for the second invocation of dom is:
Registering FSM jump thread: (102, 6) incoming edge; (5, 128) nocopy;
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/64878] [5 Regression] Miscompilation of nntpgrab
2015-01-30 17:29 [Bug tree-optimization/64878] New: [5 Regression] Miscompilation of nntpgrab jakub at gcc dot gnu.org
` (3 preceding siblings ...)
2015-01-30 20:19 ` spop at gcc dot gnu.org
@ 2015-01-30 20:27 ` spop at gcc dot gnu.org
2015-02-02 17:25 ` spop at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: spop at gcc dot gnu.org @ 2015-01-30 20:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64878
--- Comment #3 from Sebastian Pop <spop at gcc dot gnu.org> ---
-fdbg-cnt=registered_jump_thread:44 passes
-fdbg-cnt=registered_jump_thread:45 fails
So this is the jump thread that produces the wrong code:
Registering FSM jump thread: (10, 114) incoming edge; (4, 93) nocopy
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/64878] [5 Regression] Miscompilation of nntpgrab
2015-01-30 17:29 [Bug tree-optimization/64878] New: [5 Regression] Miscompilation of nntpgrab jakub at gcc dot gnu.org
` (4 preceding siblings ...)
2015-01-30 20:27 ` spop at gcc dot gnu.org
@ 2015-02-02 17:25 ` spop at gcc dot gnu.org
2015-02-04 17:30 ` spop at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: spop at gcc dot gnu.org @ 2015-02-02 17:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64878
--- Comment #4 from Sebastian Pop <spop at gcc dot gnu.org> ---
The problem is in the recursion step of
fsm_find_control_statement_thread_paths:
for (i = 0; i < gimple_phi_num_args (phi); i++)
{
tree arg = gimple_phi_arg_def (phi, i);
basic_block bbi = gimple_phi_arg_edge (phi, i)->src;
[...]
if (TREE_CODE (arg) == SSA_NAME)
{
vec_safe_push (path, bbi);
/* Recursively follow SSA_NAMEs looking for a constant definition. */
fsm_find_control_statement_thread_paths (arg, visited_phis, path);
path->pop ();
continue;
}
We are not supposed to register a jump-thread following only one of the PHI
arguments, as the other arguments may resolve into a non-constant or a
different constant.
In the current case, we have
c = x->c1[x->c2];
switch (a)
{
case 0:
if (c == ' ')
x->c2++;
else if (c == '/')
{
a = 4; // here is the first argument of the phi node
j = x->c2++;
}
else
a = b; // recursive call will follow b and resolve into 15
// here the phi node looks like
// a0 = phi (4, b)
break;
case 1:
switch (c)
{
case '{':
a = 0;
b = 15;
f = f10 ();
x->c2++;
break;
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/64878] [5 Regression] Miscompilation of nntpgrab
2015-01-30 17:29 [Bug tree-optimization/64878] New: [5 Regression] Miscompilation of nntpgrab jakub at gcc dot gnu.org
` (5 preceding siblings ...)
2015-02-02 17:25 ` spop at gcc dot gnu.org
@ 2015-02-04 17:30 ` spop at gcc dot gnu.org
2015-02-04 17:41 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: spop at gcc dot gnu.org @ 2015-02-04 17:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64878
--- Comment #5 from Sebastian Pop <spop at gcc dot gnu.org> ---
Created attachment 34665
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34665&action=edit
fix
The problem is that we jump thread twice across the loop latch:
first, from
case '{':
a = 0;
b = 15;
f = f10 ();
x->c2++;
break;
through the loop latch to:
case 0:
if (c == ' ')
x->c2++;
else if (c == '/')
{
a = 4;
j = x->c2++;
}
else
a = b;
and second, from "a = b;" again across the loop latch to case 15.
Attached patch fixes the wrong code and passes make check.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/64878] [5 Regression] Miscompilation of nntpgrab
2015-01-30 17:29 [Bug tree-optimization/64878] New: [5 Regression] Miscompilation of nntpgrab jakub at gcc dot gnu.org
` (6 preceding siblings ...)
2015-02-04 17:30 ` spop at gcc dot gnu.org
@ 2015-02-04 17:41 ` jakub at gcc dot gnu.org
2015-02-06 21:08 ` spop at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-02-04 17:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64878
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Sebastian Pop from comment #5)
> Created attachment 34665 [details]
> fix
Thanks for working on this. s/accross/across/. Please mail it to gcc-patches
once you test it.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/64878] [5 Regression] Miscompilation of nntpgrab
2015-01-30 17:29 [Bug tree-optimization/64878] New: [5 Regression] Miscompilation of nntpgrab jakub at gcc dot gnu.org
` (7 preceding siblings ...)
2015-02-04 17:41 ` jakub at gcc dot gnu.org
@ 2015-02-06 21:08 ` spop at gcc dot gnu.org
2015-02-06 21:16 ` jakub at gcc dot gnu.org
2015-03-05 14:28 ` yroux at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: spop at gcc dot gnu.org @ 2015-02-06 21:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64878
--- Comment #7 from Sebastian Pop <spop at gcc dot gnu.org> ---
Author: spop
Date: Fri Feb 6 21:08:13 2015
New Revision: 220491
URL: https://gcc.gnu.org/viewcvs?rev=220491&root=gcc&view=rev
Log:
PR 64878: do not jump thread across more than one back-edge
2015-02-04 Sebastian Pop <s.pop@samsung.com>
Brian Rzycki <b.rzycki@samsung.com>
PR tree-optimization/64878
* tree-ssa-threadedge.c: Include tree-ssa-loop.h.
(fsm_find_control_statement_thread_paths): Add parameter seen_loop_phi.
Stop recursion at loop phi nodes after having visited a loop phi node.
* testsuite/gcc.dg/tree-ssa/ssa-dom-thread-8.c: New.
Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-8.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-threadedge.c
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/64878] [5 Regression] Miscompilation of nntpgrab
2015-01-30 17:29 [Bug tree-optimization/64878] New: [5 Regression] Miscompilation of nntpgrab jakub at gcc dot gnu.org
` (8 preceding siblings ...)
2015-02-06 21:08 ` spop at gcc dot gnu.org
@ 2015-02-06 21:16 ` jakub at gcc dot gnu.org
2015-03-05 14:28 ` yroux at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-02-06 21:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64878
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed, thanks.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/64878] [5 Regression] Miscompilation of nntpgrab
2015-01-30 17:29 [Bug tree-optimization/64878] New: [5 Regression] Miscompilation of nntpgrab jakub at gcc dot gnu.org
` (9 preceding siblings ...)
2015-02-06 21:16 ` jakub at gcc dot gnu.org
@ 2015-03-05 14:28 ` yroux at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: yroux at gcc dot gnu.org @ 2015-03-05 14:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64878
--- Comment #9 from Yvan Roux <yroux at gcc dot gnu.org> ---
Author: yroux
Date: Thu Mar 5 14:28:05 2015
New Revision: 221216
URL: https://gcc.gnu.org/viewcvs?rev=221216&root=gcc&view=rev
Log:
gcc/
2015-03-05 Yvan Roux <yvan.roux@linaro.org>
Backport from trunk r212011, r214942, r214957, r215012, r215016, r218115,
r218733, r218746, r220491.
2015-02-06 Sebastian Pop <s.pop@samsung.com>
Brian Rzycki <b.rzycki@samsung.com>
PR tree-optimization/64878
* tree-ssa-threadedge.c: Include tree-ssa-loop.h.
(fsm_find_control_statement_thread_paths): Add parameter seen_loop_phi.
Stop recursion at loop phi nodes after having visited a loop phi node.
2014-12-15 Richard Biener <rguenther@suse.de>
PR middle-end/64246
* cfgloop.c (mark_loop_for_removal): Make safe against multiple
invocations on the same loop.
2014-12-15 Richard Biener <rguenther@suse.de>
PR tree-optimization/64284
* tree-ssa-threadupdate.c (duplicate_seme_region): Mark
the loop for removal if we copied the loop header.
2014-11-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/64083
* tree-ssa-threadupdate.c (thread_through_all_blocks): Do not
forcibly mark loop for removal the wrong way.
2014-09-08 Richard Biener <rguenther@suse.de>
PR ipa/63196
* tree-inline.c (copy_loops): The source loop header should
always be non-NULL.
(tree_function_versioning): If loops need fixup after removing
unreachable blocks fix them.
* omp-low.c (simd_clone_adjust): Do not add incr block to
loop under construction.
2014-09-08 Richard Biener <rguenther@suse.de>
PR bootstrap/63204
* cfgloop.c (mark_loop_for_removal): Track former header
unconditionally.
* cfgloop.h (struct loop): Add former_header member unconditionally.
* loop-init.c (fix_loop_structure): Enable bogus loop removal
diagnostic unconditionally.
2014-09-05 Richard Biener <rguenther@suse.de>
* cfgloop.c (mark_loop_for_removal): Record former header
when ENABLE_CHECKING.
* cfgloop.h (strut loop): Add former_header member when
ENABLE_CHECKING.
* loop-init.c (fix_loop_structure): Sanity check loops
marked for removal if they re-appeared.
2014-09-05 Richard Biener <rguenther@suse.de>
* cfgloop.c (mark_loop_for_removal): New function.
* cfgloop.h (mark_loop_for_removal): Declare.
* cfghooks.c (delete_basic_block): Use mark_loop_for_removal.
(merge_blocks): Likewise.
(duplicate_block): Likewise.
* except.c (sjlj_emit_dispatch_table): Likewise.
* tree-eh.c (cleanup_empty_eh_merge_phis): Likewise.
* tree-ssa-threadupdate.c (ssa_redirect_edges): Likewise.
(thread_through_loop_header): Likewise.
2014-06-26 Richard Biener <rguenther@suse.de>
PR tree-optimization/61607
* tree-ssa-threadupdate.c (ssa_redirect_edges): Cancel the
loop if we redirected its latch edge.
(thread_block_1): Do not cancel loops prematurely.
gcc/testsuite/
2015-03-05 Yvan Roux <yvan.roux@linaro.org>
Backport from trunk r218115, r218733, r218746, r220491.
2015-02-06 Sebastian Pop <s.pop@samsung.com>
Brian Rzycki <b.rzycki@samsung.com>
PR tree-optimization/64878
* testsuite/gcc.dg/tree-ssa/ssa-dom-thread-8.c: New.
2014-12-15 Richard Biener <rguenther@suse.de>
PR middle-end/64246
* gnat.dg/opt46.adb: New testcase.
* gnat.dg/opt46.ads: Likewise.
* gnat.dg/opt46_pkg.adb: Likewise.
* gnat.dg/opt46_pkg.ads: Likewise.
2014-12-15 Richard Biener <rguenther@suse.de>
PR tree-optimization/64284
* gcc.dg/torture/pr64284.c: New testcase.
2014-11-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/64083
* gcc.dg/torture/pr64083.c: New testcase.
Added:
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.dg/torture/pr64083.c
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.dg/torture/pr64284.c
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-8.c
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46.adb
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46.ads
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46_pkg.adb
branches/linaro/gcc-4_9-branch/gcc/testsuite/gnat.dg/opt46_pkg.ads
Modified:
branches/linaro/gcc-4_9-branch/gcc/ChangeLog.linaro
branches/linaro/gcc-4_9-branch/gcc/cfghooks.c
branches/linaro/gcc-4_9-branch/gcc/cfgloop.c
branches/linaro/gcc-4_9-branch/gcc/cfgloop.h
branches/linaro/gcc-4_9-branch/gcc/except.c
branches/linaro/gcc-4_9-branch/gcc/loop-init.c
branches/linaro/gcc-4_9-branch/gcc/omp-low.c
branches/linaro/gcc-4_9-branch/gcc/testsuite/ChangeLog.linaro
branches/linaro/gcc-4_9-branch/gcc/tree-eh.c
branches/linaro/gcc-4_9-branch/gcc/tree-inline.c
branches/linaro/gcc-4_9-branch/gcc/tree-ssa-threadedge.c
branches/linaro/gcc-4_9-branch/gcc/tree-ssa-threadupdate.c
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2015-03-05 14:28 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-30 17:29 [Bug tree-optimization/64878] New: [5 Regression] Miscompilation of nntpgrab jakub at gcc dot gnu.org
2015-01-30 17:29 ` [Bug tree-optimization/64878] " jakub at gcc dot gnu.org
2015-01-30 17:30 ` jakub at gcc dot gnu.org
2015-01-30 20:15 ` spop at gcc dot gnu.org
2015-01-30 20:19 ` spop at gcc dot gnu.org
2015-01-30 20:27 ` spop at gcc dot gnu.org
2015-02-02 17:25 ` spop at gcc dot gnu.org
2015-02-04 17:30 ` spop at gcc dot gnu.org
2015-02-04 17:41 ` jakub at gcc dot gnu.org
2015-02-06 21:08 ` spop at gcc dot gnu.org
2015-02-06 21:16 ` jakub at gcc dot gnu.org
2015-03-05 14:28 ` yroux 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).