-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Fix test regressions due to C++ frontend update #8852
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
Conversation
@@ -48,7 +48,7 @@ int builtin(int x, int y) { | |||
acc++; | |||
} | |||
|
|||
acc += __atomic_fetch_min(&staticint, x+y, 0); | |||
__atomic_fetch_min(&staticint, x+y, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a bug? From https://clang.llvm.org/docs/LanguageExtensions.html#atomic-min-max-builtins-with-memory-ordering:
The return value is the original value that was stored in memory before comparison.
And since they were added with a return value in https://reviews.llvm.org/D46386, I'd be surprised if there's a version of Clang that doesn't have it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, seems like it. I just checked the frontend signature and didn't look at what Clang did.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok there's something weird going on with version numbers in the frontend. I changed the clang version number in the test to match the one used in the previous version of the frontend. This fixes the issue without changing the test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See: 73e4f0c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@MathiasVP No concerns about the issue @sashabu flagged up? Note that I'm still waiting for the DCA experiment to complete (see the internal PR) |
Oh, yeah. Sorry. I should have been more clear: LGTM except for the issue @sashabu highlighted. |
@MathiasVP Thanks for clarifying. I'll check with Nick and Ian on the approach to take. |
These features are no longer available and the frontend does stricter checking on this.
The test uses an `auto` return type without a trailing return type, which is a C++14 feature.
… frontend There are now more artificial blocks containing more than one instruction (artificial blocks containing a single instruction have the extractor only emit that instruction and not the block). The second instruction in each case is the label for breaking out of a loop or switch.
This ensures that `__atomic_fetch_min` parses and that the number of builtins does not changed compared to the previous version of the frontend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
See the individual commit messages.
Note that 324bd9e and ef6c4c5 need further investigation, but these are non-blocking.