View | Details | Return to bug 107997
Collapse All | Expand All

(-)gcc/tree-ssa-loop-ivopts.cc.jj (+7 lines)
Lines 131-136 along with GCC; see the file COPYING3. Link Here
131
#include "builtins.h"
131
#include "builtins.h"
132
#include "tree-vectorizer.h"
132
#include "tree-vectorizer.h"
133
#include "dbgcnt.h"
133
#include "dbgcnt.h"
134
#include "cfganal.h"
134
135
135
/* For lang_hooks.types.type_for_mode.  */
136
/* For lang_hooks.types.type_for_mode.  */
136
#include "langhooks.h"
137
#include "langhooks.h"
Lines 7235-7240 create_new_iv (struct ivopts_data *data, Link Here
7235
    case IP_END:
7236
    case IP_END:
7236
      incr_pos = gsi_last_bb (ip_end_pos (data->current_loop));
7237
      incr_pos = gsi_last_bb (ip_end_pos (data->current_loop));
7237
      after = true;
7238
      after = true;
7239
      if (!gsi_end_p (incr_pos) && stmt_ends_bb_p (gsi_stmt (incr_pos)))
7240
	{
7241
	  edge e = find_edge (gsi_bb (incr_pos), data->current_loop->header);
7242
	  incr_pos = gsi_after_labels (split_edge (e));
7243
	  after = false;
7244
	}
7238
      break;
7245
      break;
7239
7246
7240
    case IP_AFTER_USE:
7247
    case IP_AFTER_USE:
(-)gcc/testsuite/gcc.c-torture/compile/pr107997.c.jj (+23 lines)
Line 0 Link Here
1
/* PR tree-optimization/107997 */
2
3
int a, b;
4
void bar (int);
5
int baz (void);
6
7
void *
8
foo (int x, void *y)
9
{
10
  asm goto ("" : : "r" (x || !a) : : l);
11
l:
12
  if (y)
13
    return 0;
14
  bar (b ? b : x);
15
  while (x--)
16
    {
17
      if (!baz ())
18
	baz ();
19
      asm goto ("" : : : : l2);
20
    l2:;
21
    }
22
  return y;
23
}

Return to bug 107997