@@ -15527,7 +15527,8 @@ (define_insn_and_split "*ashlqi_ext<mode>_1"
&& !(rtx_equal_p (operands[0], operands[1]))"
[(set (zero_extract:SWI248
(match_dup 0) (const_int 8) (const_int 8))
- (match_dup 1))
+ (zero_extract:SWI248
+ (match_dup 1) (const_int 8) (const_int 8)))
(parallel
[(set (zero_extract:SWI248
(match_dup 0) (const_int 8) (const_int 8))
@@ -16689,7 +16690,8 @@ (define_insn_and_split "*<insn>qi_ext<mode>_1"
&& !(rtx_equal_p (operands[0], operands[1]))"
[(set (zero_extract:SWI248
(match_dup 0) (const_int 8) (const_int 8))
- (match_dup 1))
+ (zero_extract:SWI248
+ (match_dup 1) (const_int 8) (const_int 8)))
(parallel
[(set (zero_extract:SWI248
(match_dup 0) (const_int 8) (const_int 8))
new file mode 100644
@@ -0,0 +1,24 @@
+/* PR target/113044 */
+/* { dg-do run } */
+/* { dg-options "-O" } */
+
+typedef unsigned char __attribute__((__vector_size__ (2))) V;
+
+V
+foo (char c, V v)
+{
+ V x = v >> (v & 8);
+ volatile char d = c;
+ if (!d)
+ __builtin_abort();
+ return x;
+}
+
+int
+main (void)
+{
+ V x = foo (10, (V){3});
+ if (x[0] != 3 || x[1])
+ __builtin_abort();
+ return 0;
+}