================ @@ -0,0 +1,41 @@ + +// RUN: %clang -gkey-instructions -x c++ %s -gmlt -gno-column-info -S -emit-llvm -o - -ftrivial-auto-var-init=pattern \ +// RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not atomRank + +// RUN: %clang -gkey-instructions -x c %s -gmlt -gno-column-info -S -emit-llvm -o - -ftrivial-auto-var-init=pattern \ +// RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not atomRank + +// The implicit-check-not is important; we don't want the GEPs created for the +// store locations to be included in the atom group. + +int g; +void a() { +// CHECK: call void @llvm.memcpy{{.*}}, !dbg [[G1R1:!.*]] + int A[] = { 1, 2, 3 }; + +// CHECK: store i32 1, ptr %{{.*}}, !dbg [[G2R1:!.*]] +// CHECK: store i32 2, ptr %{{.*}}, !dbg [[G2R1]] +// CHECK: %0 = load i32, ptr @g{{.*}}, !dbg [[G2R2:!.*]] +// CHECK: store i32 %0, ptr %{{.*}}, !dbg [[G2R1]] + int B[] = { 1, 2, g }; + +// CHECK: call void @llvm.memset{{.*}}, !dbg [[G3R1:!.*]] ---------------- OCHyams wrote:
Done https://github.com/llvm/llvm-project/pull/134637 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits