aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr87746.c
blob: 139651674e4df4dc49912b2e6f01a2cd80c23a74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* { dg-do compile } */
/* { dg-options "-Ofast" } */
/* { dg-additional-options "-mavx2" { target x86_64-*-* i?86-*-* } } */

typedef struct rtx_def *rtx;
struct replacement {
    rtx *where;
    rtx *subreg_loc;
    int mode;
};
static struct replacement replacements[150];
void move_replacements (rtx *x, rtx *y, int n_replacements)
{
  int i;
  for (i = 0; i < n_replacements; i++)
    if (replacements[i].subreg_loc == x)
      replacements[i].subreg_loc = y;
    else if (replacements[i].where == x) 
      {
	replacements[i].where = y;
	replacements[i].subreg_loc = 0;
      }
}