public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: "Maciej W. Rozycki" <macro@embecosm.com>, gcc-patches@gcc.gnu.org
Cc: Rainer Orth <ro@cebitec.uni-bielefeld.de>,
	Mike Stump <mikestump@comcast.net>
Subject: Re: [PATCH] testsuite: Fix missing EFFECTIVE_TARGETS variable errors
Date: Mon, 21 Nov 2022 10:48:21 -0700	[thread overview]
Message-ID: <ef47a7eb-a982-e0f1-efd6-c1f2f771310c@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.20.2211142117380.19931@tpp.orcam.me.uk>


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



  reply	other threads:[~2022-11-21 17:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-15 17:02 Maciej W. Rozycki
2022-11-21 17:48 ` Jeff Law [this message]
2022-11-22 18:28   ` Maciej W. Rozycki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ef47a7eb-a982-e0f1-efd6-c1f2f771310c@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=macro@embecosm.com \
    --cc=mikestump@comcast.net \
    --cc=ro@cebitec.uni-bielefeld.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).