From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by sourceware.org (Postfix) with ESMTPS id 25B3138708E6 for ; Fri, 12 Mar 2021 07:42:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 25B3138708E6 Received: by mail-ej1-x62c.google.com with SMTP id ci14so51372393ejc.7 for ; Thu, 11 Mar 2021 23:42:49 -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=Nb92OTWdTObkoj9KRq03IaI05mSknYYmMoFWtavQr3Y=; b=GowRc0LqBHANX0Vsibk3rGk2/wI6FoSjmcyhdiYvTfR88m9A7Q55vuEutly7gYApms YIWWqmaGSYzggVlf0CPHQVNIu3k6wCmD68S9tNvSBser8qLnvQ37ul+P3GA2FbTDMzIB p/AsaHn+q+TswdkjICPR2VfYuf1WhKIEt6AjUyg8zfVt9QKME5GLDAFNcg1Wrv4O8JCt QqHvzOvIWhXvLbcd5nz5ROIX1lbRttodZfHrkE2U7ykumMDUVGCAXqE6RBu6NZu5OxRd XL/ttE4/C+wLSrBIEEqj/cYne17Cw0Q5fWkH/19dVgjiV8srs5L5hJjwv8fI9El9yU2T aLGg== X-Gm-Message-State: AOAM5303sGilWO4lHeBjnjykAzInXoVlIoJmIgpH54wjiXS5JvbKbV9B nEoymQ/34g8tNoSZ8mga4ZA8H4HZjQoWA7Xz42Y= X-Google-Smtp-Source: ABdhPJwH2cYyOCcYBeqgBeXfDURxl4ok3aqgUvczx8blx+NzDCI1e/qpsicKIaLohWuzYXqN1BbBq9uCe/FuHPQBZyI= X-Received: by 2002:a17:906:68c5:: with SMTP id y5mr7198727ejr.371.1615534968153; Thu, 11 Mar 2021 23:42:48 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Richard Biener Date: Fri, 12 Mar 2021 08:42:37 +0100 Message-ID: Subject: Re: [RFC] decay vect tests from run to link for pr95401 To: Alexandre Oliva Cc: GCC Patches Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_NUMSUBJECT, 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: Fri, 12 Mar 2021 07:42:50 -0000 On Thu, Mar 11, 2021 at 3:47 PM Alexandre Oliva wrote: > > On Mar 11, 2021, Richard Biener wrote: > > > I think that's OK. > > Cool, here's the patch I'm nearly done regstrapping on x86_64-linux-gnu > and x-ppc64-vx7r2. Ok to install? OK. Richard. > > It's probably difficult to make the test UNSUPPORTED > > when dg-additional-sources is discovered with a dg-do compile test? > > Well, first of all, I really don't like the idea of skipping a test if > we can still get some useful information out of it. > > That said, I suppose we could test for additional_sources_used in > ${langdriver}_target_compile proces in gcc.exp, g++.exp et al, between > their calling dg-additional-files-options and target_compile, to > conditionally skip the latter, or pass $type to the former in all > $langdriver.exp, so that the extra files can be flagged and/or discarded > in unsupported modes. I believe such changes would also require > adjustments to library test infrastructures. > > > decay vect tests from run to link for pr95401 > > When vect.exp finds our configuration disables altivec by default, it > disables the execution of vectorization tests, assuming the test > hardware doesn't support it. > > Tests become just compile tests, but compile tests won't work > correctly when additional sources are named, e.g. pr95401.cc, because > GCC refuses to compile multiple files into the same asm output. > > With this patch, the default for when execution is not possible > becomes link. > > > for gcc/testsuite/ChangeLog > > * lib/target-supports.exp (check_vect_support_and_set_flags): > Decay to link rather than compile. > --- > gcc/testsuite/lib/target-supports.exp | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp > index 52d3d036d3c5c..f5b9b0578de37 100644 > --- a/gcc/testsuite/lib/target-supports.exp > +++ b/gcc/testsuite/lib/target-supports.exp > @@ -9632,7 +9632,7 @@ proc check_vect_support_and_set_flags { } { > if [check_750cl_hw_available] { > set dg-do-what-default run > } else { > - set dg-do-what-default compile > + set dg-do-what-default link > } > } elseif [istarget powerpc*-*-*] { > # Skip targets not supporting -maltivec. > @@ -9656,14 +9656,14 @@ proc check_vect_support_and_set_flags { } { > # Specify a cpu that supports VMX for compile-only tests. > lappend DEFAULT_VECTCFLAGS "-mcpu=970" > } > - set dg-do-what-default compile > + set dg-do-what-default link > } > } elseif { [istarget i?86-*-*] || [istarget x86_64-*-*] } { > lappend DEFAULT_VECTCFLAGS "-msse2" > if { [check_effective_target_sse2_runtime] } { > set dg-do-what-default run > } else { > - set dg-do-what-default compile > + set dg-do-what-default link > } > } elseif { [istarget mips*-*-*] > && [check_effective_target_nomips16] } { > @@ -9682,7 +9682,7 @@ proc check_vect_support_and_set_flags { } { > if [check_effective_target_ultrasparc_hw] { > set dg-do-what-default run > } else { > - set dg-do-what-default compile > + set dg-do-what-default link > } > } elseif [istarget alpha*-*-*] { > # Alpha's vectorization capabilities are extremely limited. > @@ -9695,7 +9695,7 @@ proc check_vect_support_and_set_flags { } { > if [check_alpha_max_hw_available] { > set dg-do-what-default run > } else { > - set dg-do-what-default compile > + set dg-do-what-default link > } > } elseif [istarget ia64-*-*] { > set dg-do-what-default run > @@ -9708,7 +9708,7 @@ proc check_vect_support_and_set_flags { } { > if [is-effective-target arm_neon_hw] { > set dg-do-what-default run > } else { > - set dg-do-what-default compile > + set dg-do-what-default link > } > } elseif [istarget "aarch64*-*-*"] { > set dg-do-what-default run > @@ -9729,7 +9729,7 @@ proc check_vect_support_and_set_flags { } { > set dg-do-what-default run > } else { > lappend DEFAULT_VECTCFLAGS "-march=z14" "-mzarch" > - set dg-do-what-default compile > + set dg-do-what-default link > } > } elseif [istarget amdgcn-*-*] { > set dg-do-what-default run > > > -- > Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ > Free Software Activist GNU Toolchain Engineer > Vim, Vi, Voltei pro Emacs -- GNUlius Caesar