aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/minmax-6.c
blob: 615f919ba0adf2d6f81979551fb398ae7eecd746 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do compile } */
/* { dg-options "-O2 -march=haswell -mno-stackrealign" } */

unsigned short
UMVLine16Y_11 (short unsigned int * Pic, int y, int width)
{
  if (y != width)
    {
      y = y < 0 ? 0 : y;
      return Pic[y * width];
    }
  return Pic[y];
} 

/* We do not want the RA to spill %esi for it's dual-use but using
   pmaxsd is OK.  */
/* { dg-final { scan-assembler-not "rsp" { target { ! { ia32 } } } } } */
/* { dg-final { scan-assembler "pmaxsd" } } */