[PATCH] D79914: [CodeGen][NFC] Fix test/CodeGen/pr45476.cpp to specify target triple.

2020-05-13 Thread Huihui Zhang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rGfd842d362662: [CodeGen][NFC] Fix test/CodeGen/pr45476.cpp to 
specify target triple. (authored by huihuiz).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79914/new/

https://reviews.llvm.org/D79914

Files:
  clang/test/CodeGen/pr45476.cpp


Index: clang/test/CodeGen/pr45476.cpp
===
--- clang/test/CodeGen/pr45476.cpp
+++ clang/test/CodeGen/pr45476.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
+// 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
 // PR45476
 
 // This test used to get into an infinite loop,
@@ -11,8 +12,10 @@
 _Atomic struct s3 a;
 
 extern "C" void foo() {
-  // CHECK-LABEL: @foo
-  // CHECK: store atomic i32
+  // LIBCALL-LABEL: @foo
+  // LIBCALL: call void @__atomic_store
+  // NATIVE-LABEL: @foo
+  // NATIVE: store atomic i32
 
   a = s3{1, 2, 3};
 }


Index: clang/test/CodeGen/pr45476.cpp
===
--- clang/test/CodeGen/pr45476.cpp
+++ clang/test/CodeGen/pr45476.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
+// 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
 // PR45476
 
 // This test used to get into an infinite loop,
@@ -11,8 +12,10 @@
 _Atomic struct s3 a;
 
 extern "C" void foo() {
-  // CHECK-LABEL: @foo
-  // CHECK: store atomic i32
+  // LIBCALL-LABEL: @foo
+  // LIBCALL: call void @__atomic_store
+  // NATIVE-LABEL: @foo
+  // NATIVE: store atomic i32
 
   a = s3{1, 2, 3};
 }
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D79914: [CodeGen][NFC] Fix test/CodeGen/pr45476.cpp to specify target triple.

2020-05-13 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.

LGTM


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79914/new/

https://reviews.llvm.org/D79914



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D79914: [CodeGen][NFC] Fix test/CodeGen/pr45476.cpp to specify target triple.

2020-05-13 Thread Huihui Zhang via Phabricator via cfe-commits
huihuiz created this revision.
huihuiz added reviewers: efriedma, ekatz, rjmccall, rsmith, luismarques.
huihuiz added a project: LLVM.
Herald added subscribers: cfe-commits, jfb, kristof.beyls.
Herald added a project: clang.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D79914

Files:
  clang/test/CodeGen/pr45476.cpp


Index: clang/test/CodeGen/pr45476.cpp
===
--- clang/test/CodeGen/pr45476.cpp
+++ clang/test/CodeGen/pr45476.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
+// 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
 // PR45476
 
 // This test used to get into an infinite loop,
@@ -11,8 +12,10 @@
 _Atomic struct s3 a;
 
 extern "C" void foo() {
-  // CHECK-LABEL: @foo
-  // CHECK: store atomic i32
+  // LIBCALL-LABEL: @foo
+  // LIBCALL: call void @__atomic_store
+  // NATIVE-LABEL: @foo
+  // NATIVE: store atomic i32
 
   a = s3{1, 2, 3};
 }


Index: clang/test/CodeGen/pr45476.cpp
===
--- clang/test/CodeGen/pr45476.cpp
+++ clang/test/CodeGen/pr45476.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
+// 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
 // PR45476
 
 // This test used to get into an infinite loop,
@@ -11,8 +12,10 @@
 _Atomic struct s3 a;
 
 extern "C" void foo() {
-  // CHECK-LABEL: @foo
-  // CHECK: store atomic i32
+  // LIBCALL-LABEL: @foo
+  // LIBCALL: call void @__atomic_store
+  // NATIVE-LABEL: @foo
+  // NATIVE: store atomic i32
 
   a = s3{1, 2, 3};
 }
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits