-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[compiler-rt][tests] Make this test case pass on AArch64 #117628
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
|
Do you have more details about why this is unsupported? Is it due to i128 atomics and constants? Could just TEST_16 be disabled? I tried to run it locally but I don't think this test ran. |
It doesn't surprise me, I'm using a very specific set of flags for compiler-rt, that makes it truly contain atomics (needed for Flang OpenMP experiments with atomics): Building it whith |
|
Does it fix the test to remove the const from this line:? Atomic loads from a constant address potentially needing to store/cas has always been an issue, but (hopefully) doesn't come up very often as it usually doesn't make a lot of sense. That would allow us to keep the test coverage from this test, which otherwise looks useful. |
The const removal is what we do in house to make CI all green. But after our discussion couple of weeks ago I somewhat remembered that it would be better to mark this test case unsupported on AArch64, hence this patch. |
|
Hmm. This doesn't seem to be a test for whether you can do an atomic load from constant memory, but just a test for atomic loads. I think we can remove the const and the test will make more sense. |
Initially, we wanted to make this test case unsupported on AArch64, but there is a value in its coverage, so it is better to make an amendment that could help it pass. Atomic loads from a constant address potentially needing to store/cas has always been an issue, but (hopefully) doesn't come up very often as it usually doesn't make a lot of sense. It doesn't seem to be a test for whether you can do an atomic load from constant memory, but just a test for atomic loads. Hence we can remove the `const` and the test will make more sense. See also D92832 and GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80878
d045c30 to
fb29076
Compare
Done. |
You can test this locally with the following command:git-clang-format --diff 535247841d8635bc998ec0ec4871ea22f27caba6 fb29076f77c4c695aa7af8dba88106af67ad71c3 --extensions c -- compiler-rt/test/builtins/Unit/atomic_test.cView the diff from clang-format here.diff --git a/compiler-rt/test/builtins/Unit/atomic_test.c b/compiler-rt/test/builtins/Unit/atomic_test.c
index 346c9b3be5..a00518a71f 100644
--- a/compiler-rt/test/builtins/Unit/atomic_test.c
+++ b/compiler-rt/test/builtins/Unit/atomic_test.c
@@ -145,10 +145,9 @@ typedef uint64_t maxuint_t;
#define LEN(array) (sizeof(array) / sizeof(array[0]))
__attribute__((aligned(16))) static char data[] = {
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
- 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
- 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
+ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a,
+ 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25,
+ 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
};
uint8_t a8, b8;
|
The clang-format issue is none of our concern here. |
davemgreen
left a comment
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.
Thanks. LGTM
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/123/builds/10415 Here is the relevant piece of the build log for the reference |
See also D92832 and GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80878