This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix extendsidi2_1 splitting (PR rtl-optimization/57281, PR rtl-optimization/57300 wrong-code, alternative)
- From: Richard Henderson <rth at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Uros Bizjak <ubizjak at gmail dot com>, Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 17 May 2013 08:07:44 -0700
- Subject: Re: [PATCH] Fix extendsidi2_1 splitting (PR rtl-optimization/57281, PR rtl-optimization/57300 wrong-code, alternative)
- References: <20130516162210 dot GI1377 at tucnak dot redhat dot com> <20130517082501 dot GQ1377 at tucnak dot redhat dot com>
On 05/17/2013 01:25 AM, Jakub Jelinek wrote:
> +(define_peephole2
> + [(set (match_operand:SI 0 "memory_operand")
> + (match_operand:SI 1 "register_operand"))
> + (set (match_operand:SI 2 "register_operand") (match_dup 1))
> + (parallel [(set (match_dup 2)
> + (ashiftrt:SI (match_dup 2)
> + (match_operand:QI 3 "const_int_operand")))
> + (clobber (reg:CC FLAGS_REG))])
> + (set (match_operand:SI 4 "memory_operand") (match_dup 2))]
> + "INTVAL (operands[3]) == 31
No sense in using match_operand in the pattern and INTVAL == 31
in the condition when you can just use (const_int 31) in the pattern.
Modulo those two cases, the patch is ok.
r~