This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/77308] surprisingly large stack usage for sha512 on arm
- From: "rearnsha at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 01 Nov 2016 09:49:12 +0000
- Subject: [Bug target/77308] surprisingly large stack usage for sha512 on arm
- Auto-submitted: auto-generated
- References: <bug-77308-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77308
--- Comment #33 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
(In reply to Wilco from comment #32)
> (In reply to Bernd Edlinger from comment #31)
> > Furthermore, if I want to do -Os the third condition is FALSE too.
> > But one ldrd must be shorter than two ldr ?
> >
> > That seems wrong...
>
> Indeed, on a target that supports LDRD you want to use LDRD if legal. LDM
> should only be tried on Thumb-1. Emitting LDRD from a peephole when the
> offset is in range will never increase code size so should always be enabled.
The logic is certainly strange. Some cores run LDRD less quickly than they can
do LDM, or even two independent loads. I suspect the logic is meant to be: use
LDRD if available and not (optimizing for speed on a slow LDRD-device).