backport: re PR tree-optimization/46107 (-ftree-loop-distribute-patterns caused verify_loop_structure problem)
Backport from mainline 2010-11-03 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/46107 * cfgloopmanip.c (loop_version): Set irred_flag back into entry->flags if cfg_hook_duplicate_loop_to_header_edge failed. * gcc.c-torture/compile/pr46107.c: New test. From-SVN: r166649
This commit is contained in:
parent
56b671d28c
commit
bc1345169a
|
@ -1,3 +1,12 @@
|
|||
2010-11-12 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
Backport from mainline
|
||||
2010-11-03 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/46107
|
||||
* cfgloopmanip.c (loop_version): Set irred_flag back into entry->flags
|
||||
if cfg_hook_duplicate_loop_to_header_edge failed.
|
||||
|
||||
2010-11-10 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
PR middle-end/46419
|
||||
|
|
|
@ -1546,7 +1546,10 @@ loop_version (struct loop *loop,
|
|||
/* Duplicate loop. */
|
||||
if (!cfg_hook_duplicate_loop_to_header_edge (loop, entry, 1,
|
||||
NULL, NULL, NULL, 0))
|
||||
return NULL;
|
||||
{
|
||||
entry->flags |= irred_flag;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* After duplication entry edge now points to new loop head block.
|
||||
Note down new head as second_head. */
|
||||
|
|
|
@ -4842,6 +4842,13 @@ gimplify_asm_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
|
|||
/* If the operand is a memory input, it should be an lvalue. */
|
||||
if (!allows_reg && allows_mem)
|
||||
{
|
||||
tree inputv = TREE_VALUE (link);
|
||||
STRIP_NOPS (inputv);
|
||||
if (TREE_CODE (inputv) == PREDECREMENT_EXPR
|
||||
|| TREE_CODE (inputv) == PREINCREMENT_EXPR
|
||||
|| TREE_CODE (inputv) == POSTDECREMENT_EXPR
|
||||
|| TREE_CODE (inputv) == POSTINCREMENT_EXPR)
|
||||
TREE_VALUE (link) = error_mark_node;
|
||||
tret = gimplify_expr (&TREE_VALUE (link), pre_p, post_p,
|
||||
is_gimple_lvalue, fb_lvalue | fb_mayfail);
|
||||
mark_addressable (TREE_VALUE (link));
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
2010-11-12 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
Backport from mainline
|
||||
2010-11-03 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/46107
|
||||
* gcc.c-torture/compile/pr46107.c: New test.
|
||||
|
||||
2010-11-10 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
PR target/46419
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
/* PR tree-optimization/46107 */
|
||||
|
||||
int foo (void) __attribute__ ((noreturn));
|
||||
|
||||
void
|
||||
bar (int x, int *y, int z)
|
||||
{
|
||||
static void *j[] = { &&l1, &&l2 };
|
||||
l1:
|
||||
if (*y)
|
||||
goto *j[z];
|
||||
foo ();
|
||||
l2:
|
||||
*y ^= (x & 1) ? -1 : 0;
|
||||
goto *j[x];
|
||||
}
|
Loading…
Reference in New Issue