-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import gcc-dg/vect directory from GCC #114
Open
mablinov
wants to merge
16
commits into
llvm:main
Choose a base branch
from
mablinov:gcc-dg-vect-upstream
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
common parts between C/gcc-c-torture/CMakeLists.txt and the new C/gcc-dg/CMakeLists.txt are put in DgOptions.txt
The `pr89313.c` and `pr87600-1.c` tests were passing fine on LLVM trunk (specifically I was on `c1eef483b2c1`), but failed on 17.0.5. I bisected the failure down to the following LLVM commit: d79ccee8dc4a [X86][MC] Support encoding/decoding for APX variant ADD/SUB/ADC/SBB/OR/XOR/NEG/NOT instructions (#76319) So it turns out that the three-operand form of `add`, on x86_64, is actually a very recent addition. We should therefore probably avoid using it incase someone wants to run against an older but still recent LLVM version.
RISC-V does not support the __bf16 datatype, therefore disable test.
GCC has the notion of "default test behaviour", which is stored in the `dg-do-what-default` global variable. It specified what should happen when there is no `dg-do` comment found in the test suite. Our current behaviour is that if there's no `dg-do`, then we just compile the test. But for the `gcc.c-torture/execute` directory, the default behaviour is to run the test, because the `execute.exp` script manaully sets it so: ``` set saved-dg-do-what-default ${dg-do-what-default} set dg-do-what-default "run" gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "" "-w" set dg-do-what-default ${saved-dg-do-what-default} ``` We should probably model this behaviour in our CMake scripts, but for now undo the refactoring in the execute/CMakeLists.txt script, and for tests in that particular directory we always try to run the file.
In the GCC test suite many tests don't have an explicit `dg-do` directive telling the test driver what to do. In these cases, the default action is taken from a TCL variable called `dg-do-what-default`, which can be set freely (see for example gcc/testsuite/gcc.c-torture/execute/execute.exp) Emulate this behaviour in our CMakeScripts also.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi all.
This works builds directly off of our other MR waiting to be merged here, and simply adds the
gcc-dg/vect
subfolder.Under x86_64 there are 2913 build targets, 1152 passing tests.
There is a minor "hack" right now in that the original
vect.exp
file from upstream uses lots of glob patterns to create the list of tests to run - I've re-created this behaviour here by instrumenting the GCCvect.exp
toecho
the globs,cat
'ted them into a file, and then copied that into a new file created by this MR calledSingleSource/Regression/C/gcc-dg/vect/DgVectTestList.txt
. This file is then consumed inSingleSource/Regression/C/gcc-dg/vect/CMakeLists.txt
to figure out what tests to run/not run.