[PATCH] D69062: Resolve LWG issue 2426

2023-09-14 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF commandeered this revision.
EricWF edited reviewers, added: zoecarver; removed: EricWF.
EricWF added a comment.
Herald added a reviewer: libc++.
Herald added a project: All.

In D69062#1711610 , @ldionne wrote:

> If we want to mark the LWG issue as being resolved for libc++, I think the 
> test should be moved to the libc++ test suite. Otherwise, we're only 
> assessing that libc++ implements LWG2426 __on Clang__.

I don't agree. Clang implements this behavior, the fact that C++ chose to put 
std::atomic in the library rather than the language has more to do with C++ and 
less to do with implementation responsibility.
If making changes to libc++ won't change the output of this test, then having 
the test doesn't matter.

I've marked the LWG issue as complete in a separate commit, and I'm going to 
close this now.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69062/new/

https://reviews.llvm.org/D69062

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D69062: Resolve LWG issue 2426

2019-10-16 Thread Louis Dionne via Phabricator via cfe-commits
ldionne requested changes to this revision.
ldionne added a comment.
This revision now requires changes to proceed.

If we want to mark the LWG issue as being resolved for libc++, I think the test 
should be moved to the libc++ test suite. Otherwise, we're only assessing that 
libc++ implements LWG2426 __on Clang__.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69062/new/

https://reviews.llvm.org/D69062



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D69062: Resolve LWG issue 2426

2019-10-16 Thread Zoe Carver via Phabricator via cfe-commits
zoecarver created this revision.
zoecarver added reviewers: mclow.lists, EricWF, ldionne, rsmith.
Herald added subscribers: libcxx-commits, cfe-commits, dexonsmith, christof.
Herald added projects: clang, libc++.

This patch checks that `expected` is loaded before it is used. Libc++ already 
does this.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D69062

Files:
  clang/test/CodeGen/atomic-ops.c
  libcxx/www/cxx1z_status.html


Index: libcxx/www/cxx1z_status.html
===
--- libcxx/www/cxx1z_status.html
+++ libcxx/www/cxx1z_status.html
@@ -318,7 +318,7 @@
https://wg21.link/LWG2328;>2328Rvalue 
stream extraction should use perfect 
forwardingOuluComplete
https://wg21.link/LWG2393;>2393std::function's Callable 
definition is brokenOuluComplete
https://wg21.link/LWG2422;>2422std::numeric_limitsT::is_modulo
 description: "most machines" errataOuluComplete
-   https://wg21.link/LWG2426;>2426Issue 
about compare_exchangeOulu
+   https://wg21.link/LWG2426;>2426Issue 
about compare_exchangeOuluComplete
https://wg21.link/LWG2436;>2436Comparators for associative 
containers should always be 
CopyConstructibleOuluComplete
https://wg21.link/LWG2441;>2441Exact-width atomic typedefs 
should be providedOuluComplete
https://wg21.link/LWG2451;>2451[fund.ts.v2] optional should 
'forward' T's implicit conversionsOuluNothing to do
Index: clang/test/CodeGen/atomic-ops.c
===
--- clang/test/CodeGen/atomic-ops.c
+++ clang/test/CodeGen/atomic-ops.c
@@ -466,6 +466,8 @@
   // CHECK: cmpxchg i32* {{%[0-9A-Za-z._]+}}, i32 {{%[0-9A-Za-z._]+}}, i32 
{{%[0-9A-Za-z_.]+}} acquire monotonic
 
   __c11_atomic_compare_exchange_weak(ptr, ptr2, 43, memory_order_seq_cst, 
memory_order_acquire);
+  // CHECK: load i32, i32* {{%[0-9A-Za-z._]+}}, align 4
+  // CHECK: load i32, i32* {{%[0-9A-Za-z._]+}}, align 4
   // CHECK: cmpxchg weak i32* {{%[0-9A-Za-z._]+}}, i32 {{%[0-9A-Za-z._]+}}, 
i32 {{%[0-9A-Za-z_.]+}} seq_cst acquire
 
   // Unknown ordering: conservatively pick strongest valid option (for now!).


Index: libcxx/www/cxx1z_status.html
===
--- libcxx/www/cxx1z_status.html
+++ libcxx/www/cxx1z_status.html
@@ -318,7 +318,7 @@
 	https://wg21.link/LWG2328;>2328Rvalue stream extraction should use perfect forwardingOuluComplete
 	https://wg21.link/LWG2393;>2393std::function's Callable definition is brokenOuluComplete
 	https://wg21.link/LWG2422;>2422std::numeric_limitsT::is_modulo description: "most machines" errataOuluComplete
-	https://wg21.link/LWG2426;>2426Issue about compare_exchangeOulu
+	https://wg21.link/LWG2426;>2426Issue about compare_exchangeOuluComplete
 	https://wg21.link/LWG2436;>2436Comparators for associative containers should always be CopyConstructibleOuluComplete
 	https://wg21.link/LWG2441;>2441Exact-width atomic typedefs should be providedOuluComplete
 	https://wg21.link/LWG2451;>2451[fund.ts.v2] optional should 'forward' T's implicit conversionsOuluNothing to do
Index: clang/test/CodeGen/atomic-ops.c
===
--- clang/test/CodeGen/atomic-ops.c
+++ clang/test/CodeGen/atomic-ops.c
@@ -466,6 +466,8 @@
   // CHECK: cmpxchg i32* {{%[0-9A-Za-z._]+}}, i32 {{%[0-9A-Za-z._]+}}, i32 {{%[0-9A-Za-z_.]+}} acquire monotonic
 
   __c11_atomic_compare_exchange_weak(ptr, ptr2, 43, memory_order_seq_cst, memory_order_acquire);
+  // CHECK: load i32, i32* {{%[0-9A-Za-z._]+}}, align 4
+  // CHECK: load i32, i32* {{%[0-9A-Za-z._]+}}, align 4
   // CHECK: cmpxchg weak i32* {{%[0-9A-Za-z._]+}}, i32 {{%[0-9A-Za-z._]+}}, i32 {{%[0-9A-Za-z_.]+}} seq_cst acquire
 
   // Unknown ordering: conservatively pick strongest valid option (for now!).
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits