1 /* { dg-do compile } */
2 /* { dg-options "-O2 -march=haswell -mno-stackrealign" } */
3 
4 unsigned short
UMVLine16Y_11(short unsigned int * Pic,int y,int width)5 UMVLine16Y_11 (short unsigned int * Pic, int y, int width)
6 {
7   if (y != width)
8     {
9       y = y < 0 ? 0 : y;
10       return Pic[y * width];
11     }
12   return Pic[y];
13 }
14 
15 /* We do not want the RA to spill %esi for it's dual-use but using
16    pmaxsd is OK.  */
17 /* { dg-final { scan-assembler-not "rsp" { target { ! { ia32 } } } } } */
18 /* { dg-final { scan-assembler "pmaxsd" } } */
19