aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/testsuite/gcc.target/i386/pr50038.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8/gcc/testsuite/gcc.target/i386/pr50038.c')
-rw-r--r--gcc-4.8/gcc/testsuite/gcc.target/i386/pr50038.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/testsuite/gcc.target/i386/pr50038.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/pr50038.c
new file mode 100644
index 000000000..e111574c4
--- /dev/null
+++ b/gcc-4.8/gcc/testsuite/gcc.target/i386/pr50038.c
@@ -0,0 +1,20 @@
+/* PR target/50038 */
+/* { dg-options "-O2" } */
+
+void
+test (int len, unsigned char *in, unsigned char *out)
+{
+ int i;
+ unsigned char xr, xg;
+ unsigned char xy=0;
+ for (i = 0; i < len; i++)
+ {
+ xr = *in++;
+ xg = *in++;
+ xy = (unsigned char) ((19595 * xr + 38470 * xg) >> 16);
+
+ *out++ = xy;
+ }
+}
+
+/* { dg-final { scan-assembler-times "movzbl" 2 } } */