Author: Huihui Zhang
Date: 2020-05-13T18:04:14-07:00
New Revision: fd842d3626625d8075b0ecbd4d24de70d7ac2456

URL: 
https://github.com/llvm/llvm-project/commit/fd842d3626625d8075b0ecbd4d24de70d7ac2456
DIFF: 
https://github.com/llvm/llvm-project/commit/fd842d3626625d8075b0ecbd4d24de70d7ac2456.diff

LOG: [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

Added: 
    

Modified: 
    clang/test/CodeGen/pr45476.cpp

Removed: 
    


################################################################################
diff  --git a/clang/test/CodeGen/pr45476.cpp b/clang/test/CodeGen/pr45476.cpp
index 61f3f3649986..dd97013ae674 100644
--- a/clang/test/CodeGen/pr45476.cpp
+++ b/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 @@ struct s3 {
 _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

Reply via email to