public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] [testsuite][arm] Fix cmse-15.c expected output
@ 2022-09-23  8:43 Torbjörn SVENSSON
  2022-09-29 14:30 ` Christophe Lyon
  2022-10-03 14:36 ` Richard Earnshaw
  0 siblings, 2 replies; 3+ messages in thread
From: Torbjörn SVENSSON @ 2022-09-23  8:43 UTC (permalink / raw)
  To: gcc-patches; +Cc: kyrylo.tkachov, yvan.roux, Torbjörn SVENSSON

The cmse-15.c testcase fails at -Os because ICF means that we
generate
secure3:
        b       secure1

which is OK, but does not match the currently expected
secure3:
...
        bx      r[0-3]

gcc/testsuite/ChangeLog:

	* gcc.target/arm/cmse/cmse-15.c: Align with -Os improvements.

Co-Authored-By: Yvan ROUX  <yvan.roux@foss.st.com>
Signed-off-by: Torbjörn SVENSSON  <torbjorn.svensson@foss.st.com>
---
 gcc/testsuite/gcc.target/arm/cmse/cmse-15.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gcc/testsuite/gcc.target/arm/cmse/cmse-15.c b/gcc/testsuite/gcc.target/arm/cmse/cmse-15.c
index b0fefe561a1..5188f1d697f 100644
--- a/gcc/testsuite/gcc.target/arm/cmse/cmse-15.c
+++ b/gcc/testsuite/gcc.target/arm/cmse/cmse-15.c
@@ -144,6 +144,8 @@ int secure2 (s_bar_ptr s_bar_p)
 **	bx	r[0-3]
 ** |
 **	blx	r[0-3]
+** |
+**	b	secure1
 ** )
 **	...
 */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] [testsuite][arm] Fix cmse-15.c expected output
  2022-09-23  8:43 [PATCH] [testsuite][arm] Fix cmse-15.c expected output Torbjörn SVENSSON
@ 2022-09-29 14:30 ` Christophe Lyon
  2022-10-03 14:36 ` Richard Earnshaw
  1 sibling, 0 replies; 3+ messages in thread
From: Christophe Lyon @ 2022-09-29 14:30 UTC (permalink / raw)
  To: Torbjörn SVENSSON, gcc-patches

Hi Torbjörn,

On 9/23/22 10:43, Torbjörn SVENSSON via Gcc-patches wrote:
> The cmse-15.c testcase fails at -Os because ICF means that we
> generate
> secure3:
>          b       secure1
> 
> which is OK, but does not match the currently expected
> secure3:
> ...
>          bx      r[0-3]
> 
> gcc/testsuite/ChangeLog:
> 
> 	* gcc.target/arm/cmse/cmse-15.c: Align with -Os improvements.
> 
> Co-Authored-By: Yvan ROUX  <yvan.roux@foss.st.com>
> Signed-off-by: Torbjörn SVENSSON  <torbjorn.svensson@foss.st.com>
> ---
>   gcc/testsuite/gcc.target/arm/cmse/cmse-15.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/gcc/testsuite/gcc.target/arm/cmse/cmse-15.c b/gcc/testsuite/gcc.target/arm/cmse/cmse-15.c
> index b0fefe561a1..5188f1d697f 100644
> --- a/gcc/testsuite/gcc.target/arm/cmse/cmse-15.c
> +++ b/gcc/testsuite/gcc.target/arm/cmse/cmse-15.c
> @@ -144,6 +144,8 @@ int secure2 (s_bar_ptr s_bar_p)
>   **	bx	r[0-3]
>   ** |
>   **	blx	r[0-3]
> +** |
> +**	b	secure1
>   ** )
>   **	...
>   */

Yes, that looks OK to me, similar to a patch I made some time ago to the 
very same file, when ICF became smarter. It seems it is now able to 
notice that
return (*s_bar_p) ();
in secure3 () is equivalent to the same call in secure1 ().

LGTM, but I'm not a maintainer.

Thanks,

Christophe

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] [testsuite][arm] Fix cmse-15.c expected output
  2022-09-23  8:43 [PATCH] [testsuite][arm] Fix cmse-15.c expected output Torbjörn SVENSSON
  2022-09-29 14:30 ` Christophe Lyon
@ 2022-10-03 14:36 ` Richard Earnshaw
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Earnshaw @ 2022-10-03 14:36 UTC (permalink / raw)
  To: Torbjörn SVENSSON, gcc-patches



On 23/09/2022 09:43, Torbjörn SVENSSON via Gcc-patches wrote:
> The cmse-15.c testcase fails at -Os because ICF means that we
> generate
> secure3:
>          b       secure1
> 
> which is OK, but does not match the currently expected
> secure3:
> ...
>          bx      r[0-3]
> 
> gcc/testsuite/ChangeLog:
> 
> 	* gcc.target/arm/cmse/cmse-15.c: Align with -Os improvements.

OK.

R.
> 
> Co-Authored-By: Yvan ROUX  <yvan.roux@foss.st.com>
> Signed-off-by: Torbjörn SVENSSON  <torbjorn.svensson@foss.st.com>
> ---
>   gcc/testsuite/gcc.target/arm/cmse/cmse-15.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/gcc/testsuite/gcc.target/arm/cmse/cmse-15.c b/gcc/testsuite/gcc.target/arm/cmse/cmse-15.c
> index b0fefe561a1..5188f1d697f 100644
> --- a/gcc/testsuite/gcc.target/arm/cmse/cmse-15.c
> +++ b/gcc/testsuite/gcc.target/arm/cmse/cmse-15.c
> @@ -144,6 +144,8 @@ int secure2 (s_bar_ptr s_bar_p)
>   **	bx	r[0-3]
>   ** |
>   **	blx	r[0-3]
> +** |
> +**	b	secure1
>   ** )
>   **	...
>   */

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-03 14:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-23  8:43 [PATCH] [testsuite][arm] Fix cmse-15.c expected output Torbjörn SVENSSON
2022-09-29 14:30 ` Christophe Lyon
2022-10-03 14:36 ` Richard Earnshaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).