summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr82260-1.c
blob: 3804fcc53532c18d9e195fbfef312e4a81891c3c (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
/* PR target/82260 */
/* { dg-do compile { target lp64 } } */
/* { dg-options "-Os -mtune=generic -masm=att -mno-bmi2" } */
/* movl %esi, %ecx is shorter than movb %sil, %cl.  While
   movl %edx, %ecx is the same size as movb %dl, %cl and
   movl %r8d, %ecx is the same size as movb %r8b, %cl, movl
   is faster on contemporary CPUs.  */
/* { dg-final { scan-assembler-not {\mmovb\M} } } */

int
foo (int x, int c)
{
  return x >> c;
}

int
bar (int x, int y, int z)
{
  return x >> z;
}

int
baz (int x, int y, int z, int u, int v)
{
  return x >> v;
}