(clobber (reg:CC FLAGS_REG))])
(set (strict_low_part (match_operand:SWI12 1 "general_reg_operand"))
(match_operand:SWI12 2 "nonimmediate_operand"))]
- "REGNO (operands[0]) == REGNO (operands[1])"
+ "REGNO (operands[0]) == REGNO (operands[1])
+ && (<SWI48:MODE>mode != SImode
+ || !TARGET_ZERO_EXTEND_WITH_AND
+ || !optimize_function_for_speed_p (cfun))"
[(set (match_dup 0) (zero_extend:SWI48 (match_dup 2)))])
;; Likewise, but preserving FLAGS_REG.
[(set (match_operand:SWI48 0 "general_reg_operand") (const_int 0))
(set (strict_low_part (match_operand:SWI12 1 "general_reg_operand"))
(match_operand:SWI12 2 "nonimmediate_operand"))]
- "REGNO (operands[0]) == REGNO (operands[1])"
+ "REGNO (operands[0]) == REGNO (operands[1])
+ && (<SWI48:MODE>mode != SImode
+ || !TARGET_ZERO_EXTEND_WITH_AND
+ || !optimize_function_for_speed_p (cfun))"
[(set (match_dup 0) (zero_extend:SWI48 (match_dup 2)))])
\f
;; Sign extension instructions
/* { dg-do compile } */
/* { dg-options "-O2" } */
+/* { dg-skip-if "" { *-*-* } { "-march=i[45]86" } { "-O[sz]" } } */
+/* { dg-skip-if "" { *-*-* } { "-march=pentium" } { "-O[sz]" } } */
+/* { dg-skip-if "" { *-*-* } { "-mtune=i[45]86" } { "-O[sz]" } } */
+/* { dg-skip-if "" { *-*-* } { "-mtune=pentium" } { "-O[sz]" } } */
+
union Data { char a; short b; };
char c;