re PR target/65871 (bzhi builtin/intrinsic wrongly assumes bzhi instruction doesn't set the ZF flag)

PR target/65871
        * config/i386/i386.md (*bmi_bextr_<mode>_cczonly): New pattern.
        (*bmi2_bzhi_<mode>3_1_cczonly): Ditto.
        (setcc+movzbl peephole2): Check also clobbered reg.
        (setcc+andl peephole2): Ditto.

From-SVN: r222592
This commit is contained in:
Uros Bizjak 2015-04-29 22:58:25 +02:00 committed by Uros Bizjak
parent 9f7fb685d9
commit ec4c68c8d0
2 changed files with 8 additions and 2 deletions

View File

@ -8,6 +8,8 @@
PR target/65871
* config/i386/i386.md (*bmi_bextr_<mode>_cczonly): New pattern.
(*bmi2_bzhi_<mode>3_1_cczonly): Ditto.
(setcc+movzbl peephole2): Check also clobbered reg.
(setcc+andl peephole2): Ditto.
2015-04-29 Thomas Schwinge <thomas@codesourcery.com>

View File

@ -11567,7 +11567,9 @@
(zero_extend (match_dup 1)))]
"(peep2_reg_dead_p (3, operands[1])
|| operands_match_p (operands[1], operands[3]))
&& ! reg_overlap_mentioned_p (operands[3], operands[0])"
&& ! reg_overlap_mentioned_p (operands[3], operands[0])
&& ! (GET_CODE (operands[4]) == CLOBBER
&& reg_mentioned_p (operands[3], operands[4]))"
[(parallel [(set (match_dup 5) (match_dup 0))
(match_dup 4)])
(set (strict_low_part (match_dup 6))
@ -11610,7 +11612,9 @@
(clobber (reg:CC FLAGS_REG))])]
"(peep2_reg_dead_p (3, operands[1])
|| operands_match_p (operands[1], operands[3]))
&& ! reg_overlap_mentioned_p (operands[3], operands[0])"
&& ! reg_overlap_mentioned_p (operands[3], operands[0])
&& ! (GET_CODE (operands[4]) == CLOBBER
&& reg_mentioned_p (operands[3], operands[4]))"
[(parallel [(set (match_dup 5) (match_dup 0))
(match_dup 4)])
(set (strict_low_part (match_dup 6))