[clang] [CIR] Upstream Load/Store Complex with volatile qualifier (PR #167216)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 10 13:01:36 PST 2025


================
@@ -1495,3 +1495,52 @@ void calling_function_that_return_complex() {
 // OGCG: %[[A_IMAG_PTR:.*]] = getelementptr inbounds nuw { float, float }, ptr %[[A_ADDR]], i32 0, i32 1
 // OGCG: store float %[[RESULT_REAL]], ptr %[[A_REAL_PTR]], align 4
 // OGCG: store float %[[RESULT_IMAG]], ptr %[[A_IMAG_PTR]], align 4
+
+void load_store_volatile() {
+  volatile double _Complex a;
+  volatile double _Complex b;
+  a = b;
----------------
andykaylor wrote:

It would be better to have a test where the volatile qualifier is mixed to verify that we're attaching it to the correct loads and stores:

https://godbolt.org/z/WGc9Y4Ydd

https://github.com/llvm/llvm-project/pull/167216


More information about the cfe-commits mailing list