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: 636901 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rWH5N0QrGz9t2S for ; Fri, 17 Jun 2016 20:47:35 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=Na2IeT/L; dkim-atps=neutral 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=Uk3h4dLcj6SshIF6X+kHnGSWBJh1H9W3AHepb9WgKM3TQi jRc4Tg9EuxBdgfg4I5Ge1cDOEFKYVn67h+jS6I8EZMaDlCLfIOODnbA3w/5pcxav /9c6Fhvzp88Jnn4JSzAhdFdRL9QI5737IB8mOWCKUY9NfVfvnniw1o9ABinrU= 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=Na2IeT/L+uE88RYsi4hT XonafkxJ2OMURHOC+rl+9hDo1pJKRHw2+byS6xMWk+hfCKDhbygSNpDszOq5Wgkz egi8jJ4J9uu9qew69nKE+r69B7ea1CfiRHitrvlH3Lvq6t3/9eMRxLl0PJ644yLW dwuIJNZli37SbyEQsLtsRVc= 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 } }