Page MenuHomePhabricator

XFAIL align.pass.pass.cpp on aix regarding atomic alignment
AbandonedPublic

Authored by jasonliu on May 20 2021, 7:11 AM.

Details

Reviewers
hubert.reinterpretcast
cebowleratibm
xingxue
jfb
lkail
Xiangling_L
Group Reviewers
Restricted Project
Summary

AIX currently fails because it does not support 16-byte MaxAtomicPromoteWidth while the type is implied to be lock-free.

Diff Detail

Event Timeline

Xiangling_L created this revision.May 20 2021, 7:11 AM
Xiangling_L requested review of this revision.May 20 2021, 7:11 AM
Xiangling_L removed a reviewer: jfb.
jsji added reviewers: lkail, Restricted Project.May 20 2021, 7:12 AM
hubert.reinterpretcast added subscribers: Restricted Project, libcxx-commits.
libcxx/test/libcxx/atomics/atomics.align/align.pass.pass.cpp
18

Just trying to understand... this is a "known bug" (properly tracked) that is now being marked XFAIL to make it easier to spot other problems in regular regression testing? Might it be better to apply #ifndef _AIX to a subset of the calls?

35

So, this is returning the wrong value?

libcxx/test/libcxx/atomics/atomics.align/align.pass.pass.cpp
37

This is a statically-determined fact, but the storage for the object could be aligned even if the type's guaranteed alignment is less-than-natural. We now have is_always_lock_free.

cebowleratibm added inline comments.May 20 2021, 9:29 AM
libcxx/test/libcxx/atomics/atomics.align/align.pass.pass.cpp
37

Are you saying the test is invalid because some of the types below may have less than natural alignment and is_lock_free() is permitted to return true based on the actual alignment of the particular object?

libcxx/test/libcxx/atomics/atomics.align/align.pass.pass.cpp
37

I recall reading this before... the test is valid:
In any given program execution, the result of the lock-free query is the same for all atomic objects of the same type.

jasonliu commandeered this revision.Jun 22 2021, 12:14 PM
jasonliu abandoned this revision.
jasonliu edited reviewers, added: Xiangling_L; removed: jasonliu.

is_lock_free actually returns false for this structure:
struct LLIArr2 { long long int i[2]; };

So I'm seeing this test case passing on pwr8 and pwr9.
I don't think we need this change for AIX.