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

(-)gcc/combine.c.jj (+9 lines)
Lines 4378-4383 try_combine (rtx i3, rtx i2, rtx i1, rtx Link Here
4378
      update_cfg_for_uncondjump (i3);
4378
      update_cfg_for_uncondjump (i3);
4379
    }
4379
    }
4380
4380
4381
  if (undobuf.other_insn != NULL_RTX
4382
      && GET_CODE (PATTERN (undobuf.other_insn)) == SET
4383
      && SET_SRC (PATTERN (undobuf.other_insn)) == pc_rtx
4384
      && SET_DEST (PATTERN (undobuf.other_insn)) == pc_rtx)
4385
    {
4386
      *new_direct_jump_p = 1;
4387
      update_cfg_for_uncondjump (undobuf.other_insn);
4388
    }
4389
4381
  combine_successes++;
4390
  combine_successes++;
4382
  undo_commit ();
4391
  undo_commit ();
4383
4392
(-)gcc/testsuite/gcc.c-torture/compile/pr47157.c.jj (+20 lines)
Line 0 Link Here
1
/* PR rtl-optimization/47157 */
2
3
struct S { unsigned a; unsigned b; } c = { 1, 0 };
4
unsigned long int e;
5
void bar (int);
6
int baz (void);
7
8
static int
9
foo (int x, short y)
10
{
11
  return ((x ^ y) & ((x ^ (x ^ y) & ~__INT_MAX__) - y ^ y)) < 0 ? x : x - y;
12
}
13
14
void
15
test (void)
16
{
17
  bar (foo (baz () != (c.a | c.b), -1L));
18
  for (e = 0; e; e = 1)
19
    ;
20
}

Return to bug 47157