From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x242.google.com (mail-oi1-x242.google.com [IPv6:2607:f8b0:4864:20::242]) by sourceware.org (Postfix) with ESMTPS id 0916A385782D for ; Thu, 5 Nov 2020 20:28:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0916A385782D Received: by mail-oi1-x242.google.com with SMTP id k26so3070397oiw.0 for ; Thu, 05 Nov 2020 12:28:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5OYv3O39f9pqjaysfsCkxFtt17Pcuorbm5h8hmoClN0=; b=Fyz6Q2DLVN9ldR8kdj4/6YrsejCt5m4pYUIMjsH2lY6b8szxm163FYdpexpEZdPX2f /t+Smc9zV8mmL/JLSJF5b+r2H38g6isiJY1LdaEFBL1yHyouHHVHbbwXTkbCkakePs1H Es6Q7fZP7uM2yYVuyraC9YmfqG7pUCe7wGnibl+Xxaaq7Gm9AR+tVSw1WryIxUUWquNw QXQ2fC+HNrYOhm6GL1H1B/RtFRCdJvucYyA+oo1iC2HtZMNXzgF1+ZGBFFPh9jH472Tq Q7gmp31lbOUoOtCNnLVVET8MUOopM6Z+kWZ5xVTeP1Bep8dhw2pbzRmVNw6Zh2/nbgK0 JP/g== X-Gm-Message-State: AOAM533Yzs8Uwf/KaL+1p3SO8LXzGsH91pPLZLJ8zxxUCDEVG/8pHb8B uZ2t/bnz4u0wJ70a65n9RAwrQIsg8vnD9bzVbRI4VA== X-Google-Smtp-Source: ABdhPJzB7KaumxXzDwGd7nXCJWGMXOOrItJZp8DL4XWwi7YqZ0GS8bqoi0rOPRHCG8mHkln1AGrcS2aAg751WKqBVDM= X-Received: by 2002:aca:ea54:: with SMTP id i81mr733743oih.48.1604608106230; Thu, 05 Nov 2020 12:28:26 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Christophe Lyon Date: Thu, 5 Nov 2020 21:28:15 +0100 Message-ID: Subject: Re: [PATCH] arm: [testcase] Better narrow some bfloat16 testcase To: Andrea Corallo Cc: Kyrylo Tkachov , "gcc-patches@gcc.gnu.org" , Richard Earnshaw , nd Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-10.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2020 20:28:28 -0000 On Thu, 5 Nov 2020 at 15:30, Andrea Corallo wrote: > > Christophe Lyon writes: > > > On Thu, 5 Nov 2020 at 12:11, Andrea Corallo wrote: > >> > >> Christophe Lyon writes: > >> > >> [...] > >> > >> >> I think you need to add -mfloat-abi=hard to the dg-additional-options > >> >> otherwise vld1_lane_bf16_1.c > >> >> fails on targets with a soft float-abi default (eg arm-linux-gnueabi). > >> >> > >> >> See bf16_vldn_1.c. > >> > > >> > Actually that's not sufficient because in turn we get: > >> > /sysroot-arm-none-linux-gnueabi/usr/include/gnu/stubs.h:10:11: fatal > >> > error: gnu/stubs-hard.h: No such file or directory > >> > > >> > So you should check that -mfloat-abi=hard is supported. > >> > > >> > Ditto for the vst tests. > >> > >> Hi Christophe, > >> > >> this patch should implement your suggestions. > >> > >> On my arm-none-linux-gnueabi setup the tests were already skipped > >> as unsupported so if you could test and confirm this fixes the > >> issue you see would be great. > > > > Do you know why they are unsupported in your setup? > > We probably have a different GCC configuration. Could you share how > it's configured your? > Sure, for instance: --target=arm-none-linux-gnueabi --with-float=soft --with-mode=arm --with-cpu=cortex-a9 > >> diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp > >> index 15f0649f8ae..2ab7e39756d 100644 > >> --- a/gcc/testsuite/lib/target-supports.exp > >> +++ b/gcc/testsuite/lib/target-supports.exp > >> @@ -5213,6 +5213,10 @@ proc check_effective_target_arm_v8_2a_bf16_neon_ok_nocache { } { > >> return 0; > >> } > >> > >> + if { ! [check_effective_target_arm_hard_ok] } { > >> + return 0; > >> + } > >> + > >> foreach flags {"" "-mfloat-abi=hard -mfpu=neon-fp-armv8" "-mfloat-abi=softfp -mfpu=neon-fp-armv8" } { > >> if { [check_no_compiler_messages_nocache arm_v8_2a_bf16_neon_ok object { > >> #include > > > > This seems strange since you would now exit early if > > check_effective_target_arm_hard_ok is false, so you'll never need the > > -mfloat-abi=softfp version of the flags. > > So IIUC your suggestion would be to test with higher priority softfp and > in case we decide to go for hardfp make sure > check_effective_target_arm_hard_ok is satisfied. Am I correct? > ISTM that other tests that need hardfp check if it's supported in the test, not in other effective targets. For instance mve/intrinsics/mve_fpu1.c I can see that quite a few tests that use -mfloat-abi=hard do not check whether it's supported. Those I checked do not include arm_neon.h and thus do not end up with the gnu/stubs-hard.h error above. > > BTW in general, I think softfp is tried before hard in the other > > similar effective targets, any reason the order is different here? > > No idea. > > Thanks > > Andrea