This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH][ARM] PR 65489: Accept VSTRUCT constants in arm_legitimate_constant_p
- From: Kyrill Tkachov <kyrylo dot tkachov at arm dot com>
- To: Ramana Radhakrishnan <Ramana dot Radhakrishnan at arm dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>
- Date: Tue, 07 Apr 2015 11:24:41 +0100
- Subject: Re: [PATCH][ARM] PR 65489: Accept VSTRUCT constants in arm_legitimate_constant_p
- Authentication-results: sourceware.org; auth=none
- References: <000001d06584$90d4fbb0$b27ef310$ at arm dot com> <CAJA7tRY5mJLmbBiwKQ+BkXX8+gX+oqfTksWQsP_52J5aCi94DA at mail dot gmail dot com>
On 04/04/15 17:11, Ramana Radhakrishnan wrote:
On Mon, Mar 23, 2015 at 4:15 PM, Kyrill Tkachov <email@example.com> wrote:
The ICE in the PR happens on arm during the hoist pass when the code
generates a SET rtx of the form:
(set (reg:OI) (const_int 0)). It checks whether const_int 0 is a
general_operand for OImode which involves asking the backend whether it's a
arm_legitimate_constant_p_1 explicitly rejects OImode constants as a result
of the fix for PR 46329
This results in gcse using an emit_insn of the SET rtx rather than trying to
do an emit_move_insn
which would have worked in this case.
From reading the thread I get the impression that the ICE there was caused
by reload and coproc_secondary_reload_class behaving weirdly. We're now
using LRA and
SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS which are the
only users of coproc_secondary_reload_class are no longer used.
I removed the restriction on constants for these large modes in
arm_legitimate_constant_p_1 and the testcases in PR 46329 all work fine.
Bootstrap, testing and building various vector workloads also didn't show
Is this the right way to go for this?
If so, ok for trunk?
The ICE in this PR happens on a recently added testcase to
gcc.c-torture/execute/ and this patch fixes that, so no new testcase is
added. Jakub mentioned that maybe the testcase can be modified to manually
perform the lowering done in his patch to potentially trigger this on older
gcc versions, but I'm not sure how that would be done.
The problem is that something is generating OImode moves that I think can
only be done in the vector form of the testcase, so I'm not entirely
convinced that it's reproducible on 4.9 and 4.8.
This is OK for trunk now that we are in wide-int mode on trunk for the ARM port.
committed with r221892.
2015-03-23 Kyrylo Tkachov <firstname.lastname@example.org>
* config/arm/arm.c (arm_legitimate_constant_p_1): Remove restriction
on constants for NEON VSTRUCT modes.