* [Bug target/48941] [arm gcc] NEON: Stack pointer operations performed even tho stack is not accessed at all in function.
2011-05-10 3:13 [Bug target/48941] New: [arm gcc] NEON: Stack pointer operations performed even tho stack is not accessed at all in function julien at cayzac dot name
@ 2011-05-12 7:26 ` ramana at gcc dot gnu.org
2011-05-12 7:39 ` rsandifo at gcc dot gnu.org
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ramana at gcc dot gnu.org @ 2011-05-12 7:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48941
Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target|arm-elf |arm-elf, arm-eabi
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.05.12 07:07:51
CC| |ramana at gcc dot gnu.org
Ever Confirmed|0 |1
--- Comment #1 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> 2011-05-12 07:07:51 UTC ---
Occurs with trunk as well.
This is what I see with "GCC: (GNU) 4.7.0 20110413 (experimental) [trunk
revision 172363
str fp, [sp, #-4]!
add fp, sp, #0
sub sp, sp, #20
vldmia r0, {d20-d21}
vmov q11, q10 @ v4sf
sub sp, sp, #48
add r3, sp, #15
bic r3, r3, #15
vzip.32 q10, q11
vstr d22, [r3, #16]
vstr d23, [r3, #24]
vstmia r3, {d20-d21}
vldmia r1, {d18-d19}
vmov q8, q9 @ v4sf
vmov d24, d21
vzip.32 q9, q8
vstr d16, [r3, #16]
vstr d17, [r3, #24]
vstmia r3, {d18-d19}
vmov d26, d22
vmov d25, d16
vmov d23, d18
vmul.f32 d16, d24, d25
vmul.f32 d22, d26, d23
vmov d18, d19
vmul.f32 d17, d20, d18
vmls.f32 d16, d26, d18
vmls.f32 d22, d20, d25
vmls.f32 d17, d24, d23
vuzp.32 d16, d22
vmov d18, d16
vmov d19, d17
vmov r0, r1, d18 @ v4sf
vmov r2, r3, d19
add sp, fp, #0
ldmfd sp!, {fp}
bx lr
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/48941] [arm gcc] NEON: Stack pointer operations performed even tho stack is not accessed at all in function.
2011-05-10 3:13 [Bug target/48941] New: [arm gcc] NEON: Stack pointer operations performed even tho stack is not accessed at all in function julien at cayzac dot name
2011-05-12 7:26 ` [Bug target/48941] " ramana at gcc dot gnu.org
@ 2011-05-12 7:39 ` rsandifo at gcc dot gnu.org
2011-05-12 9:22 ` rsandifo at gcc dot gnu.org
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2011-05-12 7:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48941
rsandifo@gcc.gnu.org <rsandifo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |rsandifo at gcc dot gnu.org
AssignedTo|unassigned at gcc dot |rsandifo at gcc dot gnu.org
|gnu.org |
--- Comment #2 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> 2011-05-12 07:18:13 UTC ---
The problem seems to be that arm_neon.h implementation
of vzip* is returning the result by reference rather
than by value.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/48941] [arm gcc] NEON: Stack pointer operations performed even tho stack is not accessed at all in function.
2011-05-10 3:13 [Bug target/48941] New: [arm gcc] NEON: Stack pointer operations performed even tho stack is not accessed at all in function julien at cayzac dot name
2011-05-12 7:26 ` [Bug target/48941] " ramana at gcc dot gnu.org
2011-05-12 7:39 ` rsandifo at gcc dot gnu.org
@ 2011-05-12 9:22 ` rsandifo at gcc dot gnu.org
2011-05-16 9:07 ` rearnsha at gcc dot gnu.org
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2011-05-12 9:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48941
--- Comment #3 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> 2011-05-12 08:46:54 UTC ---
Created attachment 24234
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24234
Proposed patch
The attached patch seems to fix the testcase and doesn't
regress neon.exp. I'll test it fully next week.
We still generate more moves than necessary, but that's
a separate problem.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/48941] [arm gcc] NEON: Stack pointer operations performed even tho stack is not accessed at all in function.
2011-05-10 3:13 [Bug target/48941] New: [arm gcc] NEON: Stack pointer operations performed even tho stack is not accessed at all in function julien at cayzac dot name
` (2 preceding siblings ...)
2011-05-12 9:22 ` rsandifo at gcc dot gnu.org
@ 2011-05-16 9:07 ` rearnsha at gcc dot gnu.org
2011-06-02 13:41 ` rsandifo at gcc dot gnu.org
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2011-05-16 9:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48941
--- Comment #4 from Richard Earnshaw <rearnsha at gcc dot gnu.org> 2011-05-16 08:13:04 UTC ---
(In reply to comment #3)
> Created attachment 24234 [details]
> Proposed patch
>
> The attached patch seems to fix the testcase and doesn't
> regress neon.exp. I'll test it fully next week.
> We still generate more moves than necessary, but that's
> a separate problem.
I think we should try to preserve the existing internal API, so that if someone
manages to pick up an older version of arm_neon.h they won't get bizarre errors
out of the compiler.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/48941] [arm gcc] NEON: Stack pointer operations performed even tho stack is not accessed at all in function.
2011-05-10 3:13 [Bug target/48941] New: [arm gcc] NEON: Stack pointer operations performed even tho stack is not accessed at all in function julien at cayzac dot name
` (3 preceding siblings ...)
2011-05-16 9:07 ` rearnsha at gcc dot gnu.org
@ 2011-06-02 13:41 ` rsandifo at gcc dot gnu.org
2011-11-24 11:35 ` rearnsha at gcc dot gnu.org
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2011-06-02 13:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48941
--- Comment #5 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> 2011-06-02 13:40:28 UTC ---
(In reply to comment #4)
> (In reply to comment #3)
> > Created attachment 24234 [details]
> > Proposed patch
> >
> > The attached patch seems to fix the testcase and doesn't
> > regress neon.exp. I'll test it fully next week.
> > We still generate more moves than necessary, but that's
> > a separate problem.
>
> I think we should try to preserve the existing internal API, so that if someone
> manages to pick up an older version of arm_neon.h they won't get bizarre errors
> out of the compiler.
That shouldn't be such a big issue though. It's relatively
common for changes in GCC behaviour (such as extra front-end
strictness) to need fixincludes to be used on some older
headers. If you manage to pull in the unfixed versions,
you'll get strange errors. And this certainly wouldn't
be the only case in which GCC needs the right version of
its own headers to be used.
How strongly do you object? I think the benefits are
worth any compatibility drawbacks in this case.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/48941] [arm gcc] NEON: Stack pointer operations performed even tho stack is not accessed at all in function.
2011-05-10 3:13 [Bug target/48941] New: [arm gcc] NEON: Stack pointer operations performed even tho stack is not accessed at all in function julien at cayzac dot name
` (4 preceding siblings ...)
2011-06-02 13:41 ` rsandifo at gcc dot gnu.org
@ 2011-11-24 11:35 ` rearnsha at gcc dot gnu.org
2012-01-18 12:06 ` rsandifo at gcc dot gnu.org
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2011-11-24 11:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48941
--- Comment #6 from Richard Earnshaw <rearnsha at gcc dot gnu.org> 2011-11-24 11:00:46 UTC ---
(In reply to comment #5)
> How strongly do you object? I think the benefits are
> worth any compatibility drawbacks in this case.
It would be a nice to have, but I'm not going to lose any sleep over it.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/48941] [arm gcc] NEON: Stack pointer operations performed even tho stack is not accessed at all in function.
2011-05-10 3:13 [Bug target/48941] New: [arm gcc] NEON: Stack pointer operations performed even tho stack is not accessed at all in function julien at cayzac dot name
` (5 preceding siblings ...)
2011-11-24 11:35 ` rearnsha at gcc dot gnu.org
@ 2012-01-18 12:06 ` rsandifo at gcc dot gnu.org
2012-01-27 14:40 ` eric.batut at allegorithmic dot com
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2012-01-18 12:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48941
rsandifo@gcc.gnu.org <rsandifo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |NEW
AssignedTo|rsandifo at gcc dot gnu.org |unassigned at gcc dot
| |gnu.org
--- Comment #7 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> 2012-01-18 11:54:27 UTC ---
No longer working on this.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/48941] [arm gcc] NEON: Stack pointer operations performed even tho stack is not accessed at all in function.
2011-05-10 3:13 [Bug target/48941] New: [arm gcc] NEON: Stack pointer operations performed even tho stack is not accessed at all in function julien at cayzac dot name
` (6 preceding siblings ...)
2012-01-18 12:06 ` rsandifo at gcc dot gnu.org
@ 2012-01-27 14:40 ` eric.batut at allegorithmic dot com
2012-01-27 17:12 ` ramana at gcc dot gnu.org
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: eric.batut at allegorithmic dot com @ 2012-01-27 14:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48941
Eric Batut <eric.batut at allegorithmic dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |eric.batut at allegorithmic
| |dot com, Greta.Yorsh at arm
| |dot com
--- Comment #8 from Eric Batut <eric.batut at allegorithmic dot com> 2012-01-27 14:11:34 UTC ---
Any chance of seeing the work on this restart ?
I found this bug while looking for something that would help (I raised bug
51980 for the same kind of issue, still seen on trunk), but the patch attached
to this bug does not solve the issue for code that is rich with zip/uzp/trn
intrinsics.
This is a major limitation of arm-gcc with respect to performance-critical Neon
code in my opinion.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/48941] [arm gcc] NEON: Stack pointer operations performed even tho stack is not accessed at all in function.
2011-05-10 3:13 [Bug target/48941] New: [arm gcc] NEON: Stack pointer operations performed even tho stack is not accessed at all in function julien at cayzac dot name
` (7 preceding siblings ...)
2012-01-27 14:40 ` eric.batut at allegorithmic dot com
@ 2012-01-27 17:12 ` ramana at gcc dot gnu.org
2012-05-02 6:29 ` ramana at gcc dot gnu.org
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ramana at gcc dot gnu.org @ 2012-01-27 17:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48941
--- Comment #9 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> 2012-01-27 16:20:07 UTC ---
(In reply to comment #8)
> Any chance of seeing the work on this restart ?
>
> I found this bug while looking for something that would help (I raised bug
> 51980 for the same kind of issue, still seen on trunk), but the patch attached
> to this bug does not solve the issue for code that is rich with zip/uzp/trn
> intrinsics.
I took a look at this for sometime when I was reviewing the patch submitted on
trunk. The problem in this case appears to go away with -fno-split-wide-types
but that in general is not a good idea. IIRC when RichardS and I talked about
it we did talk about maybe getting lower-subreg to pay some attention to it.
Neon intrinsics have been improving ( I'd like to think) over time but they are
still not perfect unfortunately. I don't have time to look at this in the near
term myself.
>
> This is a major limitation of arm-gcc with respect to performance-critical Neon
> code in my opinion.
As they say, patches are welcome :)
Ramana
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/48941] [arm gcc] NEON: Stack pointer operations performed even tho stack is not accessed at all in function.
2011-05-10 3:13 [Bug target/48941] New: [arm gcc] NEON: Stack pointer operations performed even tho stack is not accessed at all in function julien at cayzac dot name
` (8 preceding siblings ...)
2012-01-27 17:12 ` ramana at gcc dot gnu.org
@ 2012-05-02 6:29 ` ramana at gcc dot gnu.org
2012-05-02 6:52 ` ramana at gcc dot gnu.org
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ramana at gcc dot gnu.org @ 2012-05-02 6:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48941
Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |ramana at gcc dot gnu.org
|gnu.org |
Target Milestone|--- |4.8.0
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/48941] [arm gcc] NEON: Stack pointer operations performed even tho stack is not accessed at all in function.
2011-05-10 3:13 [Bug target/48941] New: [arm gcc] NEON: Stack pointer operations performed even tho stack is not accessed at all in function julien at cayzac dot name
` (9 preceding siblings ...)
2012-05-02 6:29 ` ramana at gcc dot gnu.org
@ 2012-05-02 6:52 ` ramana at gcc dot gnu.org
2012-05-22 14:40 ` ramana at gcc dot gnu.org
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ramana at gcc dot gnu.org @ 2012-05-02 6:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48941
Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #24234|0 |1
is obsolete| |
--- Comment #10 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> 2012-05-02 06:51:12 UTC ---
Created attachment 27282
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27282
Rebased patch.
This patch originally by Richard Sandiford fixed PR target/48941 but the
problem was that lower-subreg was being a bit too aggressive with lowering
subreg moves in this case causing unnecessary spills to the stack. As shown in
my mail in the thread on lower-subreg.c the code generated is far better now
with this patch in play . I've rebased to trunk, double checked that the
generated files from the ml description match up and added a simple test that
makes sure that the original testcase from the PR doesn't emit a vector store
instruction ! That should be enough to catch all the cases that we worry about.
There are still a few vmov's between Vector registers but I suspect that is
because of the vcombine at the end for which RichardE might have something in
flight. For the record, this patch is not directly applicable to earlier
release branches as it depends on the new behaviour of lower-subreg.c which is
why this bug is only targeted at 4.8.0
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/48941] [arm gcc] NEON: Stack pointer operations performed even tho stack is not accessed at all in function.
2011-05-10 3:13 [Bug target/48941] New: [arm gcc] NEON: Stack pointer operations performed even tho stack is not accessed at all in function julien at cayzac dot name
` (10 preceding siblings ...)
2012-05-02 6:52 ` ramana at gcc dot gnu.org
@ 2012-05-22 14:40 ` ramana at gcc dot gnu.org
2012-07-05 16:57 ` ramana at gcc dot gnu.org
2012-07-05 17:02 ` ramana at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: ramana at gcc dot gnu.org @ 2012-05-22 14:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48941
--- Comment #11 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> 2012-05-22 14:16:34 UTC ---
> There are still a few vmov's between Vector registers but I suspect that is
> because of the vcombine at the end for which RichardE might have something in
> flight.
This is probably not true and needs some more investigation.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/48941] [arm gcc] NEON: Stack pointer operations performed even tho stack is not accessed at all in function.
2011-05-10 3:13 [Bug target/48941] New: [arm gcc] NEON: Stack pointer operations performed even tho stack is not accessed at all in function julien at cayzac dot name
` (11 preceding siblings ...)
2012-05-22 14:40 ` ramana at gcc dot gnu.org
@ 2012-07-05 16:57 ` ramana at gcc dot gnu.org
2012-07-05 17:02 ` ramana at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: ramana at gcc dot gnu.org @ 2012-07-05 16:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48941
--- Comment #12 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> 2012-07-05 16:56:23 UTC ---
Author: ramana
Date: Thu Jul 5 16:56:15 2012
New Revision: 189295
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189295
Log:
Correct bug number to PR target/48941
First part of the fix .
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/48941] [arm gcc] NEON: Stack pointer operations performed even tho stack is not accessed at all in function.
2011-05-10 3:13 [Bug target/48941] New: [arm gcc] NEON: Stack pointer operations performed even tho stack is not accessed at all in function julien at cayzac dot name
` (12 preceding siblings ...)
2012-07-05 16:57 ` ramana at gcc dot gnu.org
@ 2012-07-05 17:02 ` ramana at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: ramana at gcc dot gnu.org @ 2012-07-05 17:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48941
Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #13 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> 2012-07-05 17:01:39 UTC ---
(In reply to comment #12)
fixed by
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189294
^ permalink raw reply [flat|nested] 15+ messages in thread