From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by sourceware.org (Postfix) with ESMTPS id AB1623836C4D for ; Thu, 11 Mar 2021 09:48:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org AB1623836C4D Received: by mail-ej1-x630.google.com with SMTP id c10so44810542ejx.9 for ; Thu, 11 Mar 2021 01:48:21 -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=JTo+6Yq8/Q7Iu0iOwxs/YCp8rPX/0tEOFus7p8lTQwI=; b=W9L6/OtzDf2lhgGEVM6LwuTY15+/zfNG9BoDrzlickN2f/9zag1uIUDgnT9oE8kefk CDqgAaMo9lDsCkFuZob/n3qNwaTFR5zzkgPm5KbAkwVkIDaB6rmeAX2Ue7v18lcV2Qmg ou+0ThdfFDqwvbfSgsHd+uprcQzJD1N8eINx3kYJJVDFk7hu3X43+JWbE6iE3f+e4iNk c071XPNHnchV1yc1hARRSQ2GGDL+2Op4vTLhWfsPatyY9QwTgiCkTuVLrIE6Blqa1PGr gTP9RnNuJwqVExeIOupAHU4ra+tZa+823dvb11nhGddDekEfvrPVFX8OTZSd7TxJPACR jUrg== X-Gm-Message-State: AOAM532BvfwbnD1q87fC8kC05kwauw/W4wDMRQexEW2uMyQl49KSLryk 4+wXqn+XzcgsQ5Z4d8vVG8MbH1rM/IyPG0K/6mg= X-Google-Smtp-Source: ABdhPJwlYxsYIo2GXk09oc574L88injPlw7sk9YZi7rnWNPgskobRYjpYMoygIXyUTkHqCaO7oJN8Q26NmnzyKoC8do= X-Received: by 2002:a17:906:7c48:: with SMTP id g8mr2286541ejp.138.1615456100802; Thu, 11 Mar 2021 01:48:20 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Richard Biener Date: Thu, 11 Mar 2021 10:48:09 +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=-8.4 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: Thu, 11 Mar 2021 09:48:23 -0000 On Thu, Mar 11, 2021 at 9:03 AM Alexandre Oliva wrote: > > > 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. > > > This was regstrapped on x86_64-linux-gnu and ppc64-linux-gnu, and tested > with a cross to a ppc64-vxworks7r2 with altivec disabled by default. I > found fixing the handling of additional sources to e.g. compile each one > separately, or perhaps just discard or reject additional sources for > compile tests, to be a little too involved. > > So I'm leaning towards this proposed change, just extended to other > platforms that also decay from run to compile rather than link, and thus > run into this problem in g++.dg/vect/pr95401.cc. Would this be > acceptable? I think that's OK. It's probably difficult to make the test UNSUPPORTED when dg-additional-sources is discovered with a dg-do compile test? Richard. > > 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 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp > index 52d3d036d3c5c..23d532fb2b963 100644 > --- a/gcc/testsuite/lib/target-supports.exp > +++ b/gcc/testsuite/lib/target-supports.exp > @@ -9656,7 +9656,7 @@ 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" > > -- > Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ > Free Software Activist GNU Toolchain Engineer > Vim, Vi, Voltei pro Emacs -- GNUlius Caesar