| 1 |
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir |
| 2 |
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CHECK-O0 |
| 3 |
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -O1 -fclangir -emit-cir %s -o %t.cir |
| 4 |
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CHECK-O1 |
| 5 |
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -O2 -fclangir -emit-cir %s -o %t.cir |
| 6 |
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CHECK-O2 |
| 7 |
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -O3 -fclangir -emit-cir %s -o %t.cir |
| 8 |
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CHECK-O3 |
| 9 |
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -Os -fclangir -emit-cir %s -o %t.cir |
| 10 |
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CHECK-Os |
| 11 |
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -Oz -fclangir -emit-cir %s -o %t.cir |
| 12 |
// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CHECK-Oz |
| 13 |
|
| 14 |
void f() {} |
| 15 |
|
| 16 |
// CHECK-O0: module{{.*}} attributes |
| 17 |
// CHECK-O0-NOT: cir.opt_info |
| 18 |
// CHECK-O1: module{{.*}} attributes {{.+}}cir.opt_info = #cir.opt_info<level = 1, size = 0>{{.+}} |
| 19 |
// CHECK-O2: module{{.*}} attributes {{.+}}cir.opt_info = #cir.opt_info<level = 2, size = 0>{{.+}} |
| 20 |
// CHECK-O3: module{{.*}} attributes {{.+}}cir.opt_info = #cir.opt_info<level = 3, size = 0>{{.+}} |
| 21 |
// CHECK-Os: module{{.*}} attributes {{.+}}cir.opt_info = #cir.opt_info<level = 2, size = 1>{{.+}} |
| 22 |
// CHECK-Oz: module{{.*}} attributes {{.+}}cir.opt_info = #cir.opt_info<level = 2, size = 2>{{.+}} |