@@ -1973,8 +1973,8 @@ (define_expand "reduc_plus_scal_v8qi"
(define_expand "usadv8qi"
[(match_operand:V2SI 0 "register_operand")
(match_operand:V8QI 1 "register_operand")
- (match_operand:V8QI 2 "vector_operand")
- (match_operand:V2SI 3 "vector_operand")]
+ (match_operand:V8QI 2 "register_operand")
+ (match_operand:V2SI 3 "register_operand")]
"TARGET_MMX_WITH_SSE"
{
rtx t1 = gen_reg_rtx (V1DImode);
@@ -0,0 +1,29 @@
+/* PR target/91408 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-loop-vectorize -fno-tree-forwprop" } */
+
+long long a;
+unsigned char b;
+short *c;
+int d;
+
+void
+foo (long long *x)
+{
+ unsigned char *e = (char *) x;
+ int f, g = 0;
+ for (d = 0; d < 8; d++)
+ {
+ f = b - e[d];
+ if (f < 0)
+ f = -f;
+ g += f;
+ }
+ c[0] = g;
+}
+
+void
+bar (void)
+{
+ foo (&a);
+}