[llvm-branch-commits] [clang] c5d100f - [test] Fix conditional-temporaries.cpp

Arthur Eubanks via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Dec 28 20:22:32 PST 2020


Author: Arthur Eubanks
Date: 2020-12-28T20:17:31-08:00
New Revision: c5d100fdf2d782886215061e1ae0b4b072babce0

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

LOG: [test] Fix conditional-temporaries.cpp

Broken by https://reviews.llvm.org/D93880.
(but now the test is much better :) )

Added: 
    

Modified: 
    clang/test/CodeGenCXX/conditional-temporaries.cpp

Removed: 
    


################################################################################
diff  --git a/clang/test/CodeGenCXX/conditional-temporaries.cpp b/clang/test/CodeGenCXX/conditional-temporaries.cpp
index 8ea71dc3c3feb..65f977704d82f 100644
--- a/clang/test/CodeGenCXX/conditional-temporaries.cpp
+++ b/clang/test/CodeGenCXX/conditional-temporaries.cpp
@@ -1,10 +1,10 @@
 // REQUIRES: amdgpu-registered-target
 // RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 -O2 -fno-experimental-new-pass-manager -disable-llvm-passes | FileCheck %s --check-prefixes=CHECK,CHECK-NOOPT
-// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 -O2 -fno-experimental-new-pass-manager | FileCheck %s --check-prefixes=CHECK,CHECK-OPT,CHECK-LEGACY-OPT
-// RUN: %clang_cc1 -emit-llvm %s -o - -triple=amdgcn-amd-amdhsa -O2 -fno-experimental-new-pass-manager | FileCheck %s --check-prefixes=CHECK,CHECK-OPT,CHECK-LEGACY-OPT
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 -O2 -fno-experimental-new-pass-manager | FileCheck %s --check-prefixes=CHECK,CHECK-OPT
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=amdgcn-amd-amdhsa -O2 -fno-experimental-new-pass-manager | FileCheck %s --check-prefixes=CHECK,CHECK-OPT
 // RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 -O2 -fexperimental-new-pass-manager -disable-llvm-passes | FileCheck %s --check-prefixes=CHECK,CHECK-NOOPT
-// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 -O2 -fexperimental-new-pass-manager | FileCheck %s --check-prefixes=CHECK,CHECK-OPT,X64-NEWPM-OPT
-// RUN: %clang_cc1 -emit-llvm %s -o - -triple=amdgcn-amd-amdhsa -O2 -fexperimental-new-pass-manager | FileCheck %s --check-prefixes=CHECK,CHECK-OPT,AMDGCN-NEWPM-OPT
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 -O2 -fexperimental-new-pass-manager | FileCheck %s --check-prefixes=CHECK,CHECK-OPT
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=amdgcn-amd-amdhsa -O2 -fexperimental-new-pass-manager | FileCheck %s --check-prefixes=CHECK,CHECK-OPT
 
 namespace {
 
@@ -44,30 +44,19 @@ Checker c;
 
 // CHECK-OPT-LABEL: define i32 @_Z12getCtorCallsv()
 int getCtorCalls() {
-  // CHECK-LEGACY-OPT: ret i32 5
-  // X64-NEWPM-OPT: ret i32 5
-  // AMDGCN-NEWPM-OPT: [[RET:%.*]] = load i32, i32* addrspacecast (i32 addrspace(1)* @_ZN12_GLOBAL__N_19ctorcallsE to i32*), align 4
-  // AMDGCN-NEWPM-OPT: ret i32 [[RET]]
+  // CHECK-OPT: ret i32 5
   return ctorcalls;
 }
 
 // CHECK-OPT-LABEL: define i32 @_Z12getDtorCallsv()
 int getDtorCalls() {
-  // CHECK-LEGACY-OPT: ret i32 5
-  // X64-NEWPM-OPT: ret i32 5
-  // AMDGCN-NEWPM-OPT: [[RET:%.*]] = load i32, i32* addrspacecast (i32 addrspace(1)* @_ZN12_GLOBAL__N_19dtorcallsE to i32*), align 4
-  // AMDGCN-NEWPM-OPT: ret i32 [[RET]]
+  // CHECK-OPT: ret i32 5
   return dtorcalls;
 }
 
 // CHECK-OPT-LABEL: define zeroext i1 @_Z7successv()
 bool success() {
-  // CHECK-LEGACY-OPT: ret i1 true
-  // X64-NEWPM-OPT: ret i1 true
-  // AMDGCN-NEWPM-OPT: [[CTORS:%.*]] = load i32, i32* addrspacecast (i32 addrspace(1)* @_ZN12_GLOBAL__N_19ctorcallsE to i32*), align 4, !tbaa !2
-  // AMDGCN-NEWPM-OPT: [[DTORS:%.*]] = load i32, i32* addrspacecast (i32 addrspace(1)* @_ZN12_GLOBAL__N_19dtorcallsE to i32*), align 4, !tbaa !2
-  // AMDGCN-NEWPM-OPT: %cmp = icmp eq i32 [[CTORS]], [[DTORS]]
-  // AMDGCN-NEWPM-OPT: ret i1 %cmp
+  // CHECK-OPT: ret i1 true
   return ctorcalls == dtorcalls;
 }
 


        


More information about the llvm-branch-commits mailing list