1 /* { dg-do compile } */
2 /* { dg-require-effective-target arm_dsp } */
3 
4 /* Ensure the smlatb doesn't get generated when reading the Q flag
5    from ACLE.  */
6 
7 #include <arm_acle.h>
8 
9 int
foo(int x,int in,int32_t c)10 foo (int x, int in, int32_t c)
11 {
12   short a = in & 0xffff;
13   short b = (in & 0xffff0000) >> 16;
14 
15   int res =  x + b * a + __ssat (c, 24);
16   return res + __saturation_occurred ();
17 }
18 
19 /* { dg-final { scan-assembler-not "smlatb\\t" } } */
20