This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: enable LRA for rs6000 [patch for WRF]
- From: Vladimir Makarov <vmakarov at redhat dot com>
- To: Michael Meissner <meissner at linux dot vnet dot ibm dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>, David Edelsohn <dje dot gcc at gmail dot com>, "Bergner, Peter" <bergner at vnet dot ibm dot com>, aavrunin at redhat dot com
- Date: Fri, 19 Apr 2013 17:16:43 -0400
- Subject: Re: RFA: enable LRA for rs6000 [patch for WRF]
- References: <5166F34C dot 30901 at redhat dot com> <20130415224853 dot GA17643 at ibm-tiger dot the-meissners dot org> <20130416225639 dot GA16621 at ibm-tiger dot the-meissners dot org> <516EAE5D dot 4080601 at redhat dot com> <20130417161042 dot GA22186 at ibm-tiger dot the-meissners dot org> <51705B25 dot 6020402 at redhat dot com>
On 13-04-18 4:44 PM, Vladimir Makarov wrote:
Tomorrow I am going to look at SPEC2006 dealII crash for 32-bit mode.
LRA crashes on insn
(insn 406 575 391 22 (set (reg:TF 35 3)
(mem/u/c:TF (lo_sum:SI (reg:SI 7 7 [414])
(symbol_ref/u:SI ("*.LC10") [flags 0x82])) [85 S16
A128]))
/home/cygnus/vmakarov/build/spec2006/benchspec/CPU2006/447.dealII/src/quadrature_lib.cc:80
373 {*movtf_intern\
al}
(expr_list:REG_DEAD (reg:SI 7 7 [414])
(nil)))
As I understand this correct insn. LRA checks the insn correctness in
if (!constrain_operands (1))
fatal_insn_not_found (insn);
and fails. The reason for this code in
rs6000.c::legitimate_lo_sum_address_p
if (! lra_in_progress && GET_MODE_SIZE (mode) > UNITS_PER_WORD
&& !(/* ??? Assume floating point reg based on mode? */
TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
&& (mode == DFmode || mode == DDmode)))
return false;
lra_in_progress is false and mode==TFmode. I don't want to setup
lra_in_progress to true at this stage as I need right correctness check
(lra_in_progress may affect code checking RTLcorrectness, make the test
less rigourous).
If I change the above code to
if (! lra_in_progress && GET_MODE_SIZE (mode) > UNITS_PER_WORD
&& !(/* ??? Assume floating point reg based on mode? */
TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT
&& (mode == DFmode || mode == DDmode || mode == TFmode
|| mode == TDmode)))
return false;
the crash is gone.
I don't understand what this check means and what comments ??? means too.
So it is up to you, Mike, to decide is my change correct or not.
Thanks.