[PATCH] D59307: Patch llvm bug 41033 concerning atomicity of statement expressions
JF Bastien via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 13 09:57:25 PDT 2019
jfb requested changes to this revision.
jfb added a comment.
This revision now requires changes to proceed.
I think you also want to test C++ `std::atomic` as well as regular `volatile`.
================
Comment at: test/Sema/atomic-expr-stmt.c:7
+ //CHECK: %atomic-load = load atomic i32, i32* %a.addr seq_cst, align 4
+ //CHECK: store atomic i32 %atomic-load, i32* %tmp seq_cst, align 4
+ //CHECK: %0 = load i32, i32* %tmp, align 4
----------------
Why is there a store to `a` here?
================
Comment at: test/Sema/atomic-expr-stmt.c:9
+ //CHECK: %0 = load i32, i32* %tmp, align 4
+ //CHECK: store i32 %0, i32* %b.addr, align 4
+}
----------------
What's in `%tmp`? I'd expect the value loaded from `a` to be stored to `b`.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59307/new/
https://reviews.llvm.org/D59307
More information about the cfe-commits
mailing list