From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) by sourceware.org (Postfix) with ESMTPS id F38D43852222 for ; Mon, 21 Nov 2022 17:48:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F38D43852222 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-io1-xd32.google.com with SMTP id q21so9165253iod.4 for ; Mon, 21 Nov 2022 09:48:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=6CaYWZAFaIXfp9D8q3+FzQ4Jn1KKym/K4rryxA86Nr8=; b=FglVDuIknsux3RW6H/INoqxFEwaLaqNTjk1N73h0yiDqtczfMIM94k8q4Pq+GIFEwb N67bcltlNWclxhoXZ5TptY9xYi5LQ10ADNHE6y8V+XqyqSbuVOJ5AIx56KOSQzRuW6VV w9HXgsCLHApgfNwqZ/80RXc8XfiOKcsOgX53/0lV1Eb/iFfjnV9rJhvGoSLnQLyc+KEg lVwiD3rV6NpHH3b5v5NgS7VsX+95TuosJXm0zJ+TrpmZaihTiduWb/vlfKD9QWa1xjUV C9Z/a1us6omo+pme2pTpdkbtFFnT6SOV8Tq9IGmbUIyKDtdZYIKyyi22jwXBygxcEdCY JZmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6CaYWZAFaIXfp9D8q3+FzQ4Jn1KKym/K4rryxA86Nr8=; b=eScrtziHH4BJfzA0LIVAXwTUfD5bEjv19myFjB1UyC7sGSccS652Lh/qjufH7xnmof fd2hYEEydc+JNN89vgElVnd1kUBXo7cK3v2d4ENXzSfDgXXDikpAsLeHVTHraI1MpGH0 ooXt2JRg4OdgmA+S8fumrUdkRTBLCdzHw4xNoE0bSaTb5MrXZiI0hJGEbQFmeFbPR8rT QVR5+oImItHdt7Cws+nlXz8ccZqgzgChCrPkMSfjE3yZjEd3dus77Y5rp6m3wWRC2UG8 kloS/HVqve4jHQwAwmjpYbcyidfxE4pHWnX4YFAC8Hl9KZsg5tUQcV+RCn8DZxKJEh6B UHoQ== X-Gm-Message-State: ANoB5pl+c+JjsIVOgYO31Pxg7E6eyzpmfTPJE4f8dsygU+SESQ782218 SLx5Ky2WdHeZwngO8BFmQz4= X-Google-Smtp-Source: AA0mqf6Xno+RWyLi5EUoPZNpu2DJ/Ou36fsgrHQxPmqbxYGeMdXt+C5FxrFesztQ8TwNhvCxZQIo6w== X-Received: by 2002:a02:7122:0:b0:375:d16a:c9e9 with SMTP id n34-20020a027122000000b00375d16ac9e9mr8981161jac.75.1669052902975; Mon, 21 Nov 2022 09:48:22 -0800 (PST) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id s6-20020a056602168600b006c3fc7101fbsm4535727iow.3.2022.11.21.09.48.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Nov 2022 09:48:22 -0800 (PST) Message-ID: Date: Mon, 21 Nov 2022 10:48:21 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH] testsuite: Fix missing EFFECTIVE_TARGETS variable errors Content-Language: en-US To: "Maciej W. Rozycki" , gcc-patches@gcc.gnu.org Cc: Rainer Orth , Mike Stump References: From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 11/15/22 10:02, Maciej W. Rozycki wrote: > Permit running vector tests outside `check_vect_support_and_set_flags' > environment, removing errors such as: > > ERROR: gcc.dg/analyzer/torture/pr93350.c -O0 : can't read "EFFECTIVE_TARGETS": no such variable for " dg-require-effective-target 1 vect_int " > > or: > > ERROR: gcc.dg/bic-bitmask-13.c: error executing dg-final: can't read "EFFECTIVE_TARGETS": no such variable > > with `mips-linux-gnu' target testing. > > The EFFECTIVE_TARGETS variable has originated from commit 9b7937cf8a06 > ("Add support to run auto-vectorization tests for multiple effective > targets."), where arrangements have been made to run vector tests run > within `check_vect_support_and_set_flags' environment iteratively over > all the vector unit variants available in the architecture using extra > compilation flags regardless of whether the target environment arranged > for a particular testsuite run has vector support enabled by default. > So far this has been used for the MIPS target only. > > Vector tests have since been added though that run outside environment > set up by `check_vect_support_and_set_flags' just using the current > compilation environment with no extra flags added. This works for most > targets, however causes problems with the MIPS target, because outside > `check_vect_support_and_set_flags' environment the EFFECTIVE_TARGETS > variable will not have been correctly set up even if it was added to > the particular script invoking the test in question. > > Fix this by using just the current compilation environment whenever a > vector feature is requested by `et-is-effective-target' in the absence > of the EFFECTIVE_TARGETS variable. This required some modification to > individual vector feature tests, which always added the compilation > flags required for the determination of whether the given vector unit > variant can be verified with the current testsuite run (except for the > Loongson MMI variant). Now explicit flags are only passed in setting up > EFFECTIVE_TARGETS and otherwise the current compilation environment will > determine whether such a vector test is applicable. > > This changes how Loongson MMI is handled in that the `-mloongson-mmi' > flag is explicitly passed for the determination of whether this vector > unit variant can be verified, which I gather is how it was supposed to > be arranged anyway because the flag is then added for testing the > Loongson MMI variant. > > gcc/testsuite/ > * lib/target-supports.exp > (check_effective_target_mpaired_single): Add `args' argument and > pass it to `check_no_compiler_messages' replacing > `-mpaired-single'. > (add_options_for_mips_loongson_mmi): Add `args' argument and > pass it to `check_no_compiler_messages'. > (check_effective_target_mips_msa): Add `args' argument and pass > it to `check_no_compiler_messages' replacing `-mmsa'. > (check_effective_target_mpaired_single_runtime) > (add_options_for_mpaired_single): Pass `-mpaired-single' to > `check_effective_target_mpaired_single'. > (check_effective_target_mips_loongson_mmi_runtime) > (add_options_for_mips_loongson_mmi): Pass `-mloongson-mmi' to > `check_effective_target_mips_loongson_mmi'. > (check_effective_target_mips_msa_runtime) > (add_options_for_mips_msa): Pass `-mmsa' to > `check_effective_target_mips_msa'. > (et-is-effective-target): Verify that EFFECTIVE_TARGETS exists > and if not, just check if the current compilation environment > supports the target feature requested. > (check_vect_support_and_set_flags): Pass `-mpaired-single', > `-mloongson-mmi', and `-mmsa' to the respective target feature > checks. OK. jeff