[Clang] Remove run-lines which use opt to run -ipconstprop.

ipconstprop is going to get removed and checking opt with specific
passes makes the tests more fragile.

The tests retain the important checks that !callback metadata is created
correctly.
This commit is contained in:
Florian Hahn 2020-08-02 21:45:42 +01:00
parent e6c2c9a7d1
commit 00a0282ff8
3 changed files with 3 additions and 26 deletions

View file

@ -1,6 +1,4 @@
// RUN: %clang_cc1 -triple i386-unknown-unknown -fopenmp -O1 -fno-experimental-new-pass-manager %s -emit-llvm -o - | FileCheck %s --check-prefix=RUN1
// RUN: %clang_cc1 -triple i386-unknown-unknown -fopenmp -O1 -fno-experimental-new-pass-manager %s -emit-llvm -o - | FileCheck %s --check-prefix=RUN2
// RUN: %clang_cc1 -triple i386-unknown-unknown -fopenmp -O1 -fno-experimental-new-pass-manager %s -emit-llvm -o - | opt -ipconstprop -S | FileCheck --check-prefix=IPCP %s
// RUN: %clang_cc1 -triple i386-unknown-unknown -fopenmp -fno-experimental-new-pass-manager %s -emit-llvm -o - -disable-llvm-optzns | FileCheck %s --check-prefix=RUN1
// RUN1-DAG: @broker0({{[^#]*#[0-9]+}} !callback ![[cid0:[0-9]+]]
__attribute__((callback(1, 2))) void *broker0(void *(*callee)(void *), void *payload) {
@ -29,22 +27,10 @@ __attribute__((callback(4, -1, a, __))) void *broker4(int a, int, int, int (*cal
__attribute__((callback(4, d, 5, 2))) void *broker5(int, int, int, int (*callee)(int, int, int), int d);
static void *VoidPtr2VoidPtr(void *payload) {
// RUN2: ret i8* %payload
// IPCP: ret i8* null
return payload;
}
static int ThreeInt2Int(int a, int b, int c) {
// RUN2: define internal i32 @ThreeInt2Int(i32 %a, i32 %b, i32 %c)
// RUN2: %mul = mul nsw i32 %b, %a
// RUN2: %add = add nsw i32 %mul, %c
// RUN2: ret i32 %add
// IPCP: define internal i32 @ThreeInt2Int(i32 %a, i32 %b, i32 %c)
// IPCP: %mul = mul nsw i32 4, %a
// IPCP: %add = add nsw i32 %mul, %c
// IPCP: ret i32 %add
return a * b + c;
}

View file

@ -1,5 +1,4 @@
// RUN: %clang_cc1 -triple i386-unknown-unknown -fopenmp -O1 %s -emit-llvm -o - | FileCheck %s
// RUN: %clang_cc1 -triple i386-unknown-unknown -fopenmp -O1 %s -emit-llvm -o - | opt -ipconstprop -S | FileCheck --check-prefix=IPCP %s
// RUN: %clang_cc1 -triple i386-unknown-unknown -fopenmp %s -emit-llvm -o - -disable-llvm-optzns | FileCheck %s
// CHECK: declare !callback ![[cid:[0-9]+]] void @__kmpc_fork_call
// CHECK: declare !callback ![[cid]] void @__kmpc_fork_teams
@ -15,14 +14,11 @@ void foo(int q) {
#pragma omp parallel firstprivate(q, p)
work1(p, q);
// IPCP: call void @work1(i32 2, i32 %{{[._a-zA-Z0-9]*}})
#pragma omp parallel for firstprivate(p, q)
for (int i = 0; i < q; i++)
work2(i, p);
// IPCP: call void @work2(i32 %{{[._a-zA-Z0-9]*}}, i32 2)
#pragma omp target teams firstprivate(p)
work12(p, p);
// IPCP: call void @work12(i32 2, i32 2)
}

View file

@ -1,5 +1,4 @@
// RUN: %clang_cc1 -O1 %s -S -emit-llvm -o - | FileCheck %s
// RUN: %clang_cc1 -O1 %s -S -emit-llvm -o - | opt -ipconstprop -S | FileCheck --check-prefix=IPCP %s
// RUN: %clang_cc1 %s -S -emit-llvm -o - -disable-llvm-optzns | FileCheck %s
// CHECK: declare !callback ![[cid:[0-9]+]] {{.*}}i32 @pthread_create
// CHECK: ![[cid]] = !{![[cidb:[0-9]+]]}
@ -21,14 +20,10 @@ int pthread_create(pthread_t *, const pthread_attr_t *,
const int GlobalVar = 0;
static void *callee0(void *payload) {
// IPCP: define internal i8* @callee0
// IPCP: ret i8* null
return payload;
}
static void *callee1(void *payload) {
// IPCP: define internal i8* @callee1
// IPCP: ret i8* bitcast (i32* @GlobalVar to i8*)
return payload;
}