public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Earnshaw <Richard.Earnshaw@foss.arm.com>
To: Christophe Lyon <christophe.lyon@linaro.org>
Cc: Richard Earnshaw <Richard.Earnshaw@arm.com>,
	"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [committed 03/22] arm: testsuite: avoid hard-float ABI incompatibility with -march
Date: Mon, 20 Nov 2023 14:39:28 +0000	[thread overview]
Message-ID: <5f0f6e18-7c6a-4873-b9d9-722a431d4a3b@foss.arm.com> (raw)
In-Reply-To: <CAPS5khaKBwLY+TpiE1=rb7b1mc5qRBL+RjEt9D30jv15HeEM=w@mail.gmail.com>



On 20/11/2023 14:24, Christophe Lyon wrote:
> On Mon, 20 Nov 2023 at 14:58, Richard Earnshaw
> <Richard.Earnshaw@foss.arm.com> wrote:
>>
>>
>>
>> On 20/11/2023 13:36, Christophe Lyon wrote:
>>> On Mon, 20 Nov 2023 at 13:44, Richard Earnshaw
>>> <Richard.Earnshaw@foss.arm.com> wrote:
>>>>
>>>>
>>>>
>>>> On 20/11/2023 10:23, Christophe Lyon wrote:
>>>>> Hi Richard,
>>>>>
>>>>> On Mon, 13 Nov 2023 at 15:28, Richard Earnshaw <rearnsha@arm.com> wrote:
>>>>>>
>>>>>>
>>>>>> A number of tests in the gcc testsuite, especially for arm-specific
>>>>>> targets, add various flags to control the architecture.  These run
>>>>>> into problems when the compiler is configured with -mfpu=auto if the
>>>>>> new architecture lacks an architectural feature that implies we have
>>>>>> floating-point instructions.
>>>>>>
>>>>>> The testsuite makes this worse as it falls foul of this requirement in
>>>>>> the base architecture strings provided by target-supports.exp.
>>>>>>
>>>>>> To fix this we add "+fp", or something equivalent to this, to all the
>>>>>> base architecture specifications.  The feature will be ignored if the
>>>>>> float ABI is set to soft.
>>>>>>
>>>>>> gcc/testsuite:
>>>>>>
>>>>>>           * lib/target-supports.exp (check_effective_target_arm_arch_FUNC_ok):
>>>>>>           Add base FPU specifications to all architectures that can support
>>>>>>           one.
>>>>>> ---
>>>>>>    gcc/testsuite/lib/target-supports.exp | 50 +++++++++++++--------------
>>>>>>    1 file changed, 25 insertions(+), 25 deletions(-)
>>>>>>
>>>>>
>>>>> Our CI has detected some regressions with this patch, in particular
>>>>> when testing for cortex-m55:
>>>>>
>>>>> with
>>>>> -mthumb/-march=armv8.1-m.main+mve.fp+fp.dp/-mtune=cortex-m55/-mfloat-abi=hard/-mfpu=auto
>>>>> and GCC configured with --disable-multilib --with-mode=thumb
>>>>> --with-arch=armv8.1-m.main+mve.fp+fp.dp --with-float=hard
>>>>>
>>>>> you can see our logs here:
>>>>> https://ci.linaro.org/job/tcwg_gnu_embed_check_gcc--master-thumb_m55_hard_eabi-build/209/artifact/artifacts/00-sumfiles/ <https://ci.linaro.org/job/tcwg_gnu_embed_check_gcc--master-thumb_m55_hard_eabi-build/209/artifact/artifacts/00-sumfiles/>
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Christophe
>>>>
>>>> What exactly am I supposed to be looking at here?  I see no description
>>>> of what those logs represent.  If they are supposed to be before and
>>>> after, then why does the after only run a tiny fraction of the testsuite
>>>> (Running gcc.git~master/gcc/testsuite/gcc.target/arm/arm.exp ...
>>>> Running gcc.git~master/gcc/testsuite/gcc.target/arm/cmse/cmse.exp ...
>>>> Running gcc.git~master/gcc/testsuite/gcc.target/arm/lto/lto.exp ...)
>>>>
>>>> The logs give no clue as to why the reminder of the testsuite wasn't run.
>>>>
>>>> Please don't make me guess.
>>>>
>>>
>>> Here is a summary with the list of regressions:
>>> https://ci.linaro.org/job/tcwg_gnu_embed_check_gcc--master-thumb_m55_hard_eabi-build/209/artifact/artifacts/notify/regressions.sum/*view*/
>>
>> OK, that's much more useful.  But how was I supposed to know that link
>> existed?
>>
> The full notification email contains a lot of information, with
> several pointers to our Jenkins artifacts.
> The notification email is not yet automatically sent to contributors
> because we are still polishing, and I thought I'd save you some time
> by just sending the useful links.
> 
> Looks like it's time to send those automatically too.
> 
>>>
>>> I thought you'd be able to find your way in the logs above, the .0
>>> files contain the logs of the initial full testsuite run, and .1 ones
>>> contain the logs of the second run of the testsuite, restricted to the
>>> .exp files where we detected regressions. So looking at gcc.log.1.xz
>>> will give you details of the regressions shown in the link above.
>>
>> There's nothing in the page you sent me to that gives any clue as to how
>> to read the logs there.  So my assumption was that the .0 was a before
>> run and .1 an after.  Please, if you're going to direct people to the
>> log files, provide some way for them to understand what the log files show.
>>
>> Now, to the specific issues:
>>
>> Running gcc:gcc.target/arm/arm.exp ...
>> FAIL: gcc.target/arm/attr_thumb-static2.c (test for excess errors)
>> UNRESOLVED: gcc.target/arm/attr_thumb-static2.c scan-assembler-times blx 2
>>
>> This was fixed with "arm: testsuite: avoid problems with -mfpu=auto in
>> attr_thumb-static2.c", which is a later patch in the series (patch 6).
>>
>> I don't think it's useful to try to regression test each individual
>> patch, it wasn't practical to try to get every patch into order in the
>> series (it would have made for a lot of churn on some files, especially
>> target-supports.exp), so only a fully before and a fully after run is
>> useful.  If there are issues once the whole series has been applied,
>> then that is much more interesting.
>>
> 
> I looked at this in more detail.
> That specific bisection build was triggered because we detected
> regressions, after the full series was committed.
> What happens is that at the first bad commit (this one) there were
> more regressions than after the full series was committed.
> 
> So, the extract of
> https://ci.linaro.org/job/tcwg_gnu_embed_check_gcc--master-thumb_m55_hard_eabi-build/209/artifact/artifacts/notify/regressions.sum/*view*/
> which remains valid on current trunk is:
> Running gcc:gcc.target/arm/cmse/cmse.exp ...
> FAIL: gcc.target/arm/cmse/mainline/8m/hard-sp/cmse-5.c
> -march=armv8-m.main+fp -mthumb  -O0   scan-assembler msr\tAPSR_nzcvqg,
> lr
> FAIL: gcc.target/arm/cmse/mainline/8m/hard-sp/cmse-5.c
> -march=armv8-m.main+fp -mthumb  -O1   scan-assembler msr\tAPSR_nzcvqg,
> lr
> FAIL: gcc.target/arm/cmse/mainline/8m/hard-sp/cmse-5.c
> -march=armv8-m.main+fp -mthumb  -O2   scan-assembler msr\tAPSR_nzcvqg,
> lr
> FAIL: gcc.target/arm/cmse/mainline/8m/hard-sp/cmse-5.c
> -march=armv8-m.main+fp -mthumb  -O3 -g   scan-assembler
> msr\tAPSR_nzcvqg, lr
> FAIL: gcc.target/arm/cmse/mainline/8m/hard-sp/cmse-5.c
> -march=armv8-m.main+fp -mthumb  -Os   scan-assembler msr\tAPSR_nzcvqg,
> lr
> FAIL: gcc.target/arm/cmse/mainline/8m/hard/cmse-5.c
> -march=armv8-m.main+fp -mthumb  -O0   scan-assembler msr\tAPSR_nzcvqg,
> lr
> FAIL: gcc.target/arm/cmse/mainline/8m/hard/cmse-5.c
> -march=armv8-m.main+fp -mthumb  -O1   scan-assembler msr\tAPSR_nzcvqg,
> lr
> FAIL: gcc.target/arm/cmse/mainline/8m/hard/cmse-5.c
> -march=armv8-m.main+fp -mthumb  -O2   scan-assembler msr\tAPSR_nzcvqg,
> lr
> FAIL: gcc.target/arm/cmse/mainline/8m/hard/cmse-5.c
> -march=armv8-m.main+fp -mthumb  -O3 -g   scan-assembler
> msr\tAPSR_nzcvqg, lr
> FAIL: gcc.target/arm/cmse/mainline/8m/hard/cmse-5.c
> -march=armv8-m.main+fp -mthumb  -Os   scan-assembler msr\tAPSR_nzcvqg,
> lr
> FAIL: gcc.target/arm/cmse/mainline/8m/soft/cmse-5.c
> -march=armv8-m.main+fp -mthumb -mfloat-abi=soft  -O0   scan-assembler
> msr\tAPSR_nzcvqg, lr
> FAIL: gcc.target/arm/cmse/mainline/8m/soft/cmse-5.c
> -march=armv8-m.main+fp -mthumb -mfloat-abi=soft  -O1   scan-assembler
> msr\tAPSR_nzcvqg, lr
> FAIL: gcc.target/arm/cmse/mainline/8m/soft/cmse-5.c
> -march=armv8-m.main+fp -mthumb -mfloat-abi=soft  -O2   scan-assembler
> msr\tAPSR_nzcvqg, lr
> FAIL: gcc.target/arm/cmse/mainline/8m/soft/cmse-5.c
> -march=armv8-m.main+fp -mthumb -mfloat-abi=soft  -O3 -g
> scan-assembler msr\tAPSR_nzcvqg, lr
> FAIL: gcc.target/arm/cmse/mainline/8m/soft/cmse-5.c
> -march=armv8-m.main+fp -mthumb -mfloat-abi=soft  -Os   scan-assembler
> msr\tAPSR_nzcvqg, lr
> FAIL: gcc.target/arm/cmse/mainline/8m/softfp-sp/cmse-5.c
> -march=armv8-m.main+fp -mthumb  -O0   scan-assembler msr\tAPSR_nzcvqg,
> lr
> FAIL: gcc.target/arm/cmse/mainline/8m/softfp-sp/cmse-5.c
> -march=armv8-m.main+fp -mthumb  -O1   scan-assembler msr\tAPSR_nzcvqg,
> lr
> FAIL: gcc.target/arm/cmse/mainline/8m/softfp-sp/cmse-5.c
> -march=armv8-m.main+fp -mthumb  -O2   scan-assembler msr\tAPSR_nzcvqg,
> lr
> FAIL: gcc.target/arm/cmse/mainline/8m/softfp-sp/cmse-5.c
> -march=armv8-m.main+fp -mthumb  -O3 -g   scan-assembler
> msr\tAPSR_nzcvqg, lr
> FAIL: gcc.target/arm/cmse/mainline/8m/softfp-sp/cmse-5.c
> -march=armv8-m.main+fp -mthumb  -Os   scan-assembler msr\tAPSR_nzcvqg,
> lr
> FAIL: gcc.target/arm/cmse/mainline/8m/softfp/cmse-5.c
> -march=armv8-m.main+fp -mthumb  -O0   scan-assembler msr\tAPSR_nzcvqg,
> lr
> FAIL: gcc.target/arm/cmse/mainline/8m/softfp/cmse-5.c
> -march=armv8-m.main+fp -mthumb  -O1   scan-assembler msr\tAPSR_nzcvqg,
> lr
> FAIL: gcc.target/arm/cmse/mainline/8m/softfp/cmse-5.c
> -march=armv8-m.main+fp -mthumb  -O2   scan-assembler msr\tAPSR_nzcvqg,
> lr
> FAIL: gcc.target/arm/cmse/mainline/8m/softfp/cmse-5.c
> -march=armv8-m.main+fp -mthumb  -O3 -g   scan-assembler
> msr\tAPSR_nzcvqg, lr
> FAIL: gcc.target/arm/cmse/mainline/8m/softfp/cmse-5.c
> -march=armv8-m.main+fp -mthumb  -Os   scan-assembler msr\tAPSR_nzcvqg,
> lr
> 
>> R.

The compiled output contains (at least for the case I tried -mthumb 
-march=armv8.1-m.main+mve.fp+fp.dp -mtune=cortex-m55 -mfloat-abi=hard 
-mfpu=auto   -fdiagnostics-plain-output  -march=armv8-m.base -mthumb 
-mfloat-abi=soft -O1 -mcmse -ffat-lto-objects -fno-ident -S  -o cmse-2.s):

msr     APSR_nzcvq, r1

So this will never match the expected pattern, which is looking for 'lr' 
not 'r1'.  Are you sure these tests were running before?

R.

  reply	other threads:[~2023-11-20 14:39 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-13 14:26 [committed 00/22] arm: testsuite: clean up some architecture-specific tests Richard Earnshaw
2023-11-13 14:26 ` [committed 01/22] arm: testsuite: correctly detect armv6t2 hardware for acle execution tests Richard Earnshaw
2023-11-14 17:01   ` Christophe Lyon
2023-11-14 17:23     ` Richard Earnshaw
2023-11-13 14:26 ` [committed 02/22] arm: testsuite: correctly detect hard_float Richard Earnshaw
2023-11-20 10:41   ` Christophe Lyon
2023-11-20 12:20     ` Richard Earnshaw
2023-11-13 14:26 ` [committed 03/22] arm: testsuite: avoid hard-float ABI incompatibility with -march Richard Earnshaw
2023-11-20 10:23   ` Christophe Lyon
2023-11-20 12:44     ` Richard Earnshaw
2023-11-20 13:36       ` Christophe Lyon
2023-11-20 13:58         ` Richard Earnshaw
2023-11-20 14:24           ` Christophe Lyon
2023-11-20 14:39             ` Richard Earnshaw [this message]
2023-11-20 14:49               ` Richard Earnshaw
2023-11-20 14:50               ` Christophe Lyon
2023-11-20 15:58                 ` Richard Earnshaw
2023-11-13 14:26 ` [committed 04/22] arm: testsuite: avoid problems with -mfpu=auto in pacbti-m-predef-11.c Richard Earnshaw
2023-11-13 14:26 ` [committed 05/22] arm: testsuite: avoid problems with -mfpu=auto in attr-crypto.c Richard Earnshaw
2023-11-13 14:26 ` [committed 06/22] arm: testsuite: avoid problems with -mfpu=auto in attr_thumb-static2.c Richard Earnshaw
2023-11-13 14:26 ` [committed 07/22] arm: testsuite: tidy up pre-run check for g2.c Richard Earnshaw
2023-11-13 14:26 ` [committed 08/22] arm: testsuite: improve compatibility of arm/lto/pr96939_1.c Richard Earnshaw
2023-11-13 14:26 ` [committed 09/22] arm: testsuite: tidy up pr65647-2.c pre-checks Richard Earnshaw
2023-11-13 14:26 ` [committed 10/22] arm: testsuite: improve compatibility of arm/pr78353-*.c Richard Earnshaw
2023-11-13 14:26 ` [committed 11/22] arm: testsuite: improve compatibility of pr88648-asm-syntax-unified.c Richard Earnshaw
2023-11-13 14:26 ` [committed 12/22] arm: testsuite: improve compatibility of pragma_arch_attribute*.c Richard Earnshaw
2023-11-13 14:26 ` [committed 13/22] arm: testsuite: improve compatibility of pragma_arch_switch_2.c Richard Earnshaw
2023-11-13 14:26 ` [committed 14/22] arm: testsuite: modernize framework usage for arm/scd42-2.c Richard Earnshaw
2023-11-13 14:26 ` [committed 15/22] arm: testsuite: improve compatibility of ftest-armv7m-thumb.c Richard Earnshaw
2023-11-13 14:26 ` [committed 16/22] arm: testsuite: improve compatibility of gcc.target/arm/macro_defs*.c Richard Earnshaw
2023-11-13 14:26 ` [committed 17/22] arm: testsuite: improve compatibility of gcc.target/arm/optional_thumb-*.c Richard Earnshaw
2023-11-13 14:26 ` [committed 18/22] arm: testsuite: improve compatibility of gcc.target/arm/pr19599.c Richard Earnshaw
2023-11-13 14:26 ` [committed 19/22] arm: testsuite: improve compatibility of gcc.target/arm/pr59575.c Richard Earnshaw
2023-11-13 14:26 ` [committed 20/22] testsuite: arm: tighten up mode-specific ISA tests Richard Earnshaw
2023-11-13 14:26 ` [committed 21/22] arm: testsuite: fix some more architecture tests Richard Earnshaw
2023-11-13 14:26 ` [committed 22/22] arm: testsuite: improve compatibility of gcc.dg/debug/pr57351.c Richard Earnshaw

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5f0f6e18-7c6a-4873-b9d9-722a431d4a3b@foss.arm.com \
    --to=richard.earnshaw@foss.arm.com \
    --cc=Richard.Earnshaw@arm.com \
    --cc=christophe.lyon@linaro.org \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).