summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr45903.c
blob: 5cb642a4b33d7416cc9096e276f40e8dee3b233d (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
33
34
35
36
37
38
39
40
41
42
43
44
/* PR tree-optimization/45903 */
/* { dg-do compile } */
/* { dg-options "-O2" } */

unsigned long long a, b;
unsigned char c;

void
f1 (void)
{
  c = (a >> 8) + (b >> 8);
}

void
f2 (void)
{
  c = (a >> 8) | (b >> 8);
}

void
f3 (void)
{
  c = (a >> 16) ^ (b >> 56);
}

unsigned char
f4 (void)
{
  return (a >> 48) + (b >> 40);
}

unsigned char
f5 (void)
{
  return (a >> 32) | (b >> 16);
}

unsigned char
f6 (void)
{
  return (a >> 24) ^ (b >> 32);
}

/* { dg-final { scan-assembler-not "shr\[qdl\]" } } */