This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/63679] [5.0 Regression][AArch64] Failure to constant fold.
- From: "rguenther at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 24 Nov 2014 08:52:02 +0000
- Subject: [Bug target/63679] [5.0 Regression][AArch64] Failure to constant fold.
- Auto-submitted: auto-generated
- References: <bug-63679-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63679
--- Comment #16 from rguenther at suse dot de <rguenther at suse dot de> ---
On Fri, 21 Nov 2014, jgreenhalgh at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63679
>
> --- Comment #15 from jgreenhalgh at gcc dot gnu.org ---
> I wonder whether the call to can_move_by_pieces in gimplify.c is bogus. It
> seems to me that gimplify.c really wants to know whether it is a good idea to
> scalarize the constructor copy - nothing to do with whether we will copy it by
> pieces or as a block or otherwise.
>
> If that is what gimplify.c wants to ask, then we can use the SRA parameters I
> added last month to get a better answer.
>
> The patch would look something like the below, it won't "fix" this testcase -
> but it would allow you to revert to the 4.9 behaviour by tweaking the parameter
> value.
>
> It *feels* like the right thing to do, but I don't know the code and I
> might be wrong. An alternate approach would be to introduce a new target
> hook which returns true if scalarizing a copy is smarter than leaving it
> as an aggregate, but that sounds so close to what SRA is supposed to control
> as to end up indistinguishable from this patch.
>
> Any thoughts? Or should I just propose this patch on gcc-patches. (It passes an
> x86_64 bootstrap with no issues).
Certainly removing the alignment is not going to fly - we'd generate
very bad code for strict-align targets for initializing packed
structs by pieces for example.