[CodeGen][NFC] Fix test/CodeGen/pr45476.cpp to specify target triple.
Summary:
Use explicit target triple to match more accurately the output for libcall
or native atomic.
Similar to D74847, without explicit target triple, this test will fail for ARM.
This patch update test pr45476.cpp to check for both native atomic and libcall.
Reviewers: efriedma, ekatz, rjmccall, rsmith, luismarques
Reviewed By: efriedma
Subscribers: kristof.beyls, jfb, cfe-commits, llvm-commits
Tags: #llvm, #clang
Differential Revision: https://reviews.llvm.org/D79914
2020-05-14 08:55:08 +08:00
|
|
|
// RUN: %clang_cc1 -triple arm-unknown-linux-gnueabi -emit-llvm %s -o - | FileCheck -check-prefix=LIBCALL %s
|
|
|
|
// RUN: %clang_cc1 -triple armv8-eabi -emit-llvm %s -o - | FileCheck -check-prefix=NATIVE %s
|
2020-04-16 18:26:23 +08:00
|
|
|
// PR45476
|
|
|
|
|
|
|
|
// This test used to get into an infinite loop,
|
|
|
|
// which, in turn, caused clang to never finish execution.
|
|
|
|
|
|
|
|
struct s3 {
|
|
|
|
char a, b, c;
|
|
|
|
};
|
|
|
|
|
|
|
|
_Atomic struct s3 a;
|
|
|
|
|
|
|
|
extern "C" void foo() {
|
[CodeGen][NFC] Fix test/CodeGen/pr45476.cpp to specify target triple.
Summary:
Use explicit target triple to match more accurately the output for libcall
or native atomic.
Similar to D74847, without explicit target triple, this test will fail for ARM.
This patch update test pr45476.cpp to check for both native atomic and libcall.
Reviewers: efriedma, ekatz, rjmccall, rsmith, luismarques
Reviewed By: efriedma
Subscribers: kristof.beyls, jfb, cfe-commits, llvm-commits
Tags: #llvm, #clang
Differential Revision: https://reviews.llvm.org/D79914
2020-05-14 08:55:08 +08:00
|
|
|
// LIBCALL-LABEL: @foo
|
|
|
|
// LIBCALL: call void @__atomic_store
|
|
|
|
// NATIVE-LABEL: @foo
|
2021-02-12 06:33:43 +08:00
|
|
|
// NATIVE: store atomic i32 {{.*}} seq_cst, align 4
|
2020-04-16 18:26:23 +08:00
|
|
|
|
|
|
|
a = s3{1, 2, 3};
|
|
|
|
}
|