summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr78794.c
blob: 86f1a9e3a1dd646e444f906659fd2318bef4d5bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* PR target/pr78794 */
/* { dg-do compile { target ia32 } } */
/* { dg-options "-O2 -march=slm -mno-bmi -mno-stackrealign" } */
/* { dg-final { scan-assembler "pandn" } } */

typedef unsigned long long ull;

struct S1
{
  float x;
  ull y;
};


struct S2
{
  int a1;
  struct S1 *node;
  int *a2;
};

void
foo(int c1, int c2, int c3, struct S2 *reg)
{
  int i;
  for(i=0; i<reg->a1; i++)
    if(reg->node[i].y & ((ull) 1 << c1))
      {
	if(reg->node[i].y & ((ull) 1 << c2))
	  reg->node[i].y ^= ((ull) 1 << c3);
      }
}