I just noticed that the effective target is not right,
this needs to be prefer_ldrd_strd instead of arm_ldrd_strd_ok,
otherwise the ldrd is not generated.

Committed the following fix to the test case as obvious:

Index: gcc.target/arm/pr91684.c
===================================================================
--- gcc.target/arm/pr91684.c    (revision 275488)
+++ gcc.target/arm/pr91684.c    (revision 275489)
@@ -1,5 +1,5 @@
 /* { dg-do compile }  */
-/* { dg-require-effective-target arm_ldrd_strd_ok } */
+/* { dg-require-effective-target arm_prefer_ldrd_strd } */
 /* { dg-options "-O3" } */
 
 typedef struct { int a, b, c; } S;
Index: ChangeLog
===================================================================
--- ChangeLog   (revision 275488)
+++ ChangeLog   (revision 275489)
@@ -1,3 +1,7 @@
+2019-09-07  Bernd Edlinger  <bernd.edlin...@hotmail.de>
+
+       * gcc.target/arm/pr91684.c: Use effective-target arm_prefer_ldrd_strd.
+
 2019-09-07  David Edelsohn  <dje....@gmail.com>
 
        * g++.dg/cpp2a/decomp2.C: Add TLS options.


On 9/7/19 6:39 AM, Bernd Edlinger wrote:
> Hi,
> 
> this fixes PR 91684, where an only 4-byte aligned memory is used with movdi,
> which is formally invalid for strict alignment, but okay for prefer_ldrd_strd
> targets.
> 
> 
> Boot-strapped and reg-tested on arm-linux-gnueabihf.
> Patch was approved via BZ.
> Applied to trunk.
> 
> 
> Thanks
> Bernd.
> 

Reply via email to