This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Change replace_rtx if from is a REG (PR target/70245, take 2)
- From: Oleg Endo <oleg dot endo at t-online dot de>
- To: Jakub Jelinek <jakub at redhat dot com>, Segher Boessenkool <segher at kernel dot crashing dot org>, Bernd Schmidt <bschmidt at redhat dot com>, Richard Biener <rguenther at suse dot de>, Eric Botcazou <ebotcazou at adacore dot com>, Jeff Law <law at redhat dot com>, Uros Bizjak <ubizjak at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Joern Rennecke <gnu at amylaar dot uk>, Oleg Endo <olegendo at gcc dot gnu dot org>
- Date: Sat, 19 Mar 2016 10:45:14 +0900
- Subject: Re: [PATCH] Change replace_rtx if from is a REG (PR target/70245, take 2)
- Authentication-results: sourceware.org; auth=none
- References: <20160316122257 dot GD3017 at tucnak dot redhat dot com> <56E958B1 dot 3000203 at redhat dot com> <20160316224833 dot GA7719 at gate dot crashing dot org> <20160317111658 dot GI3017 at tucnak dot redhat dot com>
On Thu, 2016-03-17 at 12:16 +0100, Jakub Jelinek wrote:
> Thus, I've reverted the patch (kept the testcase), and after some
> discussions on IRC bootstrapped/regtested on x86_64-linux and i686
> -linux following version, which right now should change behavior just
> for the i?86 case and nothing else, so shouldn't break other targets.
> I believe at least the epiphany and sh peepholes that use replace_rtx
> will want similar treatment, but will leave testing of that to their
> maintainers.
As far as I can see, replace_rtx is used only in one pattern in sh.md:
(define_peephole2
[(set (match_operand:SI 0 "general_movdst_operand" "")
(match_operand:SI 1 "arith_reg_or_0_operand" ""))
(set (match_operand:SI 2 "arith_reg_dest" "")
(if_then_else:SI (match_operator 4 "equality_comparison_operator"
[(match_operand:SI 3 "arith_reg_operand" "")
(const_int 0)])
(match_dup 0)
(match_dup 2)))]
"TARGET_SHMEDIA && peep2_reg_dead_p (2, operands[0])
&& (!REG_P (operands[1]) || GENERAL_REGISTER_P (REGNO (operands[1])))"
[(set (match_dup 2)
(if_then_else:SI (match_dup 4) (match_dup 1) (match_dup 2)))]
{
replace_rtx (operands[4], operands[0], operands[1]);
})
This pattern is only for SH5/SH64, which I'm planning on removing after
GCC 6. So no concerns or further actions required here.
Cheers,
Oleg