Debian Codegraph @

gcc/testsuite/gcc.target/i386/sse2-mmx-psubsb-2.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -msse2" } */
3
4 typedef char v8qi __attribute__ ((vector_size (8)));
5
6 char foo()
7 {
8 v8qi tx = { 5, 0, 0, 0, 0, 0, 0, 0 };
9 v8qi ty = { 2, 0, 0, 0, 0, 0, 0, 0 };
10 v8qi t = __builtin_ia32_psubsb(tx, ty);
11 return t[0];
12 }
13
14 char bar()
15 {
16 v8qi tx = { -100, 0, 0, 0, 0, 0, 0, 0 };
17 v8qi ty = { 100, 0, 0, 0, 0, 0, 0, 0 };
18 v8qi t = __builtin_ia32_psubsb(tx, ty);
19 return t[0];
20 }
21
22 char baz()
23 {
24 v8qi tx = { 100, 0, 0, 0, 0, 0, 0, 0 };
25 v8qi ty = { -100, 0, 0, 0, 0, 0, 0, 0 };
26 v8qi t = __builtin_ia32_psubsb(tx, ty);
27 return t[0];
28 }
29
30 /* { dg-final { scan-assembler-times "movl\[ \\t\]+\\\$3," 1 } } */
31 /* { dg-final { scan-assembler-times "movl\[ \\t\]+\\\$-?128," 1 } } */
32 /* { dg-final { scan-assembler-times "movl\[ \\t\]+\\\$127," 1 } } */
33 /* { dg-final { scan-assembler-not "paddsb\[ \\t\]+%xmm\[0-9\]+" } } */