[libcxx-commits] [libcxx] [libcxx][test] Prevent compiler optimising out uses of 64-bit atomics (PR #172517)
David Spickett via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jan 5 01:37:22 PST 2026
DavidSpickett wrote:
> I assume you have turned the optimisation through
I added flags elsewhere but to the same effect, I thought, but perhaps not -
> If you invoke lit with this way, the feature test program should be compiled with the optimisation flag -O3 and hopefully that should also compile to nothing and the feature has-64-bit-atomics should return True and it won't make the test XFAIL
Probably because I put the flags in another way, they weren't used there, so I caused that confusion.
Then it's whether the tests passing in that state makes sense, given that the test program doesn't include all the accesses you'd expect it to. Then again, the point of the test is also to make sure it compiles and runs, whatever it happens to do, and it does compile and run.
I don't have a requirement to be super strict here and being so is probably going to create more chaos, so I will abandon these changes.
Thanks for explaining the feature check, that didn't occur to me.
https://github.com/llvm/llvm-project/pull/172517
More information about the libcxx-commits
mailing list