+2020-03-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/94088
+ * config/i386/i386.md (*testqi_ext_3): Call ix86_match_ccmode with
+ CCZmode instead of CCNOmode if operands[2] has DImode and pos + len
+ is 32.
+
2020-03-09 Jason Merrill <jason@redhat.com>
* gdbinit.in (pgs): Fix typo in documentation.
(match_operand 3 "const_int_operand" "n")
(match_operand 4 "const_int_operand" "n"))
(const_int 0)]))]
- "ix86_match_ccmode (insn, CCNOmode)
- && ((TARGET_64BIT && GET_MODE (operands[2]) == DImode)
- || GET_MODE (operands[2]) == SImode
- || GET_MODE (operands[2]) == HImode
- || GET_MODE (operands[2]) == QImode)
+ "((TARGET_64BIT && GET_MODE (operands[2]) == DImode)
+ || GET_MODE (operands[2]) == SImode
+ || GET_MODE (operands[2]) == HImode
+ || GET_MODE (operands[2]) == QImode)
/* Ensure that resulting mask is zero or sign extended operand. */
&& INTVAL (operands[4]) >= 0
&& ((INTVAL (operands[3]) > 0
&& INTVAL (operands[3]) + INTVAL (operands[4]) <= 32)
|| (<MODE>mode == DImode
&& INTVAL (operands[3]) > 32
- && INTVAL (operands[3]) + INTVAL (operands[4]) == 64))"
+ && INTVAL (operands[3]) + INTVAL (operands[4]) == 64))
+ && ix86_match_ccmode (insn,
+ /* *testdi_1 requires CCZmode if the mask has bit
+ 31 set and all bits above it clear. */
+ GET_MODE (operands[2]) == DImode
+ && INTVAL (operands[3]) + INTVAL (operands[4]) == 32
+ ? CCZmode : CCNOmode)"
"#"
"&& 1"
[(set (match_dup 0) (match_op_dup 1 [(match_dup 2) (const_int 0)]))]