Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / pr45476.cpp
blob84e7a984a1a25eb61851ad291a119e8c2ec3e351
1 // RUN: %clang_cc1 -triple arm-unknown-linux-gnueabi -emit-llvm %s -o - | FileCheck -check-prefix=LIBCALL %s
2 // RUN: %clang_cc1 -triple armv8-eabi -emit-llvm %s -o - | FileCheck -check-prefix=NATIVE %s
3 // PR45476
5 // This test used to get into an infinite loop,
6 // which, in turn, caused clang to never finish execution.
8 struct s3 {
9 char a, b, c;
12 _Atomic struct s3 a;
14 extern "C" void foo() {
15 // LIBCALL-LABEL: @foo
16 // LIBCALL: call void @__atomic_store
17 // NATIVE-LABEL: @foo
18 // NATIVE: store atomic i32 {{.*}} seq_cst, align 4
20 a = s3{1, 2, 3};