From patchwork Fri Jun 17 10:47:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 70313 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp211802qgy; Fri, 17 Jun 2016 03:47:42 -0700 (PDT) X-Received: by 10.98.205.79 with SMTP id o76mr1694066pfg.37.1466160459497; Fri, 17 Jun 2016 03:47:39 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id p8si3021234pac.132.2016.06.17.03.47.39 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Jun 2016 03:47:39 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-430022-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-430022-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-430022-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=YZ/LwaiGcgtbqvMw2tDa4MCSFZTQo+0AdbDTVt1mdykidl aMeRP9BjMtzijvGLF99RMHa7/nVzWYXnrH0jcVNR3CbAQHW68Vb2pp2OhJx2dNHk HrCiUZAlQLX0YafTKlP75dokK0fMVdjHQqcSwV6vIZrewyo6vkumViPK5TdsE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=YH1iJHZ3FzD2CXNhrI76J3NIrN8=; b=YaD2pES8DnHi5/FS1Ssp tZnggtBCX/ku5C/lZjFqIdPntBnQNI1fQziy1IFh2nitSSqrHGt16w0ovf8WFq59 RzbeKG69EUzCA23MoEPV9qjCKs5XRrujwmVKgnPTKoxXUQgRtf5zph+IaQeag/XW P3ukvgBlmxgCyxCQsOSen48= Received: (qmail 86170 invoked by alias); 17 Jun 2016 10:47:28 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 86161 invoked by uid 89); 17 Jun 2016 10:47:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=sk:check_e, HX-Envelope-From:sk:christo, lyon, Lyon X-HELO: mail-qk0-f179.google.com Received: from mail-qk0-f179.google.com (HELO mail-qk0-f179.google.com) (209.85.220.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 17 Jun 2016 10:47:17 +0000 Received: by mail-qk0-f179.google.com with SMTP id s186so80761908qkc.1 for ; Fri, 17 Jun 2016 03:47:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=yiC98q6GOE8jHRooNo7os90duhGkQBIJtlVqBxzPhC8=; b=Hl5VTaMx+y7fzEtZ0T1UYknGRzoCp1vvXuhFTKyrH/15Iwt1OSzdrp/lTYPJR0NC+9 jo+i4w72N5SFlc11ML7tWi41XhxOzwz1fJ5umJoa8ALfxCzj5doqxM3QvvMiJOwBe1KA F0JE+g56u/P/f65iu+2899SQWc4y2Bo3ksiJg2wEZpI3VFR54JejBpx7FrLqxKu0H40U dv+99rYPnrCXU1GIxKZyoA8Z51t3mrw3bsK6d4RFuXF1Y3rnnxyWwWSc2Q3021qPIXBJ iSQTKZ6hIZSwqKnJzIAv1MRrejjPQeggMTOYHVMeMhVwUZErrRN59RxxaAaLfaUnopBf NLsA== X-Gm-Message-State: ALyK8tKGmPDuNH4TqBjjZyze0lnaBH7AGZCUrNeMdcGY517oTk4AfEz90570+Db7bRkrKbZwvyG2hRFQEfGmykTr X-Received: by 10.55.191.7 with SMTP id p7mr1445104qkf.54.1466160435362; Fri, 17 Jun 2016 03:47:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.39.47 with HTTP; Fri, 17 Jun 2016 03:47:14 -0700 (PDT) From: Christophe Lyon Date: Fri, 17 Jun 2016 12:47:14 +0200 Message-ID: Subject: [ARM][testsuite] Make arm_neon_fp16 depend on arm_neon_ok To: "gcc-patches@gcc.gnu.org" X-IsSubscribed: yes Hi, As discussed some time ago with Kyrylo (on IRC IIRC), the attached patch makes sure that arm_neon_fp16_ok and arm_neonv2_ok effective targets imply that arm_neon_ok passes, and use the corresponding flags. Without this patch, the 3 effective targets have different, possibly inconsistent conditions. For instance, arm_neon_ok make sure that __ARM_ARCH >= 7, but arm_neon_fp16_ok does not. This led to failures on configurations not supporting neon, but where arm_neon_fp16_ok passes as the test is less strict. Rather than duplicating the same tests, I preferred to call arm_neon_ok from the other places. We then use the union of flags needed for arm_neon_ok and arm_neon_fp16_ok to pass. Tested on many arm configurations with no harm. It prevents arm_neon_fp16 tests from passing when forcing -march=armv5t, that seems coherent. OK? Christophe gcc/testsuite/ChangeLog: 2016-06-17 Christophe Lyon * lib/target-supports.exp (check_effective_target_arm_neon_fp16_ok_nocache): Call arm_neon_ok and merge flags. Fix temporary test name. (check_effective_target_arm_neonv2_ok_nocache): Call arm_neon_ok and merge flags. diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index f4cb276..bbb5343 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -2990,23 +2990,25 @@ proc check_effective_target_arm_crc_ok { } { proc check_effective_target_arm_neon_fp16_ok_nocache { } { global et_arm_neon_fp16_flags + global et_arm_neon_flags set et_arm_neon_fp16_flags "" - if { [check_effective_target_arm32] } { + if { [check_effective_target_arm32] + && [check_effective_target_arm_neon_ok] } { foreach flags {"" "-mfloat-abi=softfp" "-mfpu=neon-fp16" "-mfpu=neon-fp16 -mfloat-abi=softfp" "-mfp16-format=ieee" "-mfloat-abi=softfp -mfp16-format=ieee" "-mfpu=neon-fp16 -mfp16-format=ieee" "-mfpu=neon-fp16 -mfloat-abi=softfp -mfp16-format=ieee"} { - if { [check_no_compiler_messages_nocache arm_neon_fp_16_ok object { + if { [check_no_compiler_messages_nocache arm_neon_fp16_ok object { #include "arm_neon.h" float16x4_t foo (float32x4_t arg) { return vcvt_f16_f32 (arg); } - } "$flags"] } { - set et_arm_neon_fp16_flags $flags + } "$et_arm_neon_flags $flags"] } { + set et_arm_neon_fp16_flags [concat $et_arm_neon_flags $flags] return 1 } } @@ -3085,8 +3087,10 @@ proc check_effective_target_arm_v8_neon_ok { } { proc check_effective_target_arm_neonv2_ok_nocache { } { global et_arm_neonv2_flags + global et_arm_neon_flags set et_arm_neonv2_flags "" - if { [check_effective_target_arm32] } { + if { [check_effective_target_arm32] + && [check_effective_target_arm_neon_ok] } { foreach flags {"" "-mfloat-abi=softfp" "-mfpu=neon-vfpv4" "-mfpu=neon-vfpv4 -mfloat-abi=softfp"} { if { [check_no_compiler_messages_nocache arm_neonv2_ok object { #include "arm_neon.h" @@ -3095,8 +3099,8 @@ proc check_effective_target_arm_neonv2_ok_nocache { } { { return vfma_f32 (a, b, c); } - } "$flags"] } { - set et_arm_neonv2_flags $flags + } "$et_arm_neon_flags $flags"] } { + set et_arm_neonv2_flags [concat $et_arm_neon_flags $flags] return 1 } }