1
- // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes -o - | FileCheck %s --check-prefixes=CHECK,NOINLINE
2
- // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library %s -emit-llvm -O0 -o - | FileCheck %s --check-prefixes=CHECK,INLINE
3
- // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library %s -emit-llvm -O1 -o - | FileCheck %s --check-prefixes=CHECK,INLINE
1
+ // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes -o - | FileCheck %s --check-prefixes=CHECK,NOINLINE,OPT_ATTR
2
+ // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library %s -emit-llvm -O0 -o - | FileCheck %s --check-prefixes=CHECK,INLINE,OPT_ATTR
3
+ // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library %s -emit-llvm -O1 -o - | FileCheck %s --check-prefixes=CHECK,INLINE,NOOPT_ATTR
4
4
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute %s -emit-llvm -disable-llvm-passes -o - | FileCheck %s --check-prefixes=CHECK,NOINLINE
5
- // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute %s -emit-llvm -O0 -o - | FileCheck %s --check-prefixes=CHECK,INLINE
6
- // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute %s -emit-llvm -O1 -o - | FileCheck %s --check-prefixes=CHECK,INLINE
5
+ // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute %s -emit-llvm -O0 -o - | FileCheck %s --check-prefixes=CHECK,INLINE,OPT_ATTR
6
+ // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute %s -emit-llvm -O1 -o - | FileCheck %s --check-prefixes=CHECK,INLINE,NOOPT_ATTR
7
7
8
8
// Tests that user functions will always be inlined.
9
9
// This includes exported functions and mangled entry point implementation functions.
@@ -71,7 +71,8 @@ RWBuffer<unsigned> Indices;
71
71
// NOINLINE: ret void
72
72
73
73
// The unmangled version is not inlined, EntryAttr reflects that
74
- // CHECK: Function Attrs: {{.*}}noinline
74
+ // OPT_ATTR: Function Attrs: {{.*}}optnone
75
+ // NOOPT_ATTR-NOT: Function Attrs: {{.*}}optnone
75
76
// CHECK: define void @main() {{[a-z_ ]*}}[[EntryAttr:\#[0-9]+]]
76
77
// Make sure function calls are inlined when AlwaysInline is run
77
78
// This only leaves calls to llvm. intrinsics
@@ -98,7 +99,8 @@ void main(unsigned int GI : SV_GroupIndex) {
98
99
// NOINLINE: ret void
99
100
100
101
// The unmangled version is not inlined, EntryAttr reflects that
101
- // CHECK: Function Attrs: {{.*}}noinline
102
+ // OPT_ATTR: Function Attrs: {{.*}}optnone
103
+ // NOOPT_ATTR-NOT: Function Attrs: {{.*}}optnone
102
104
// CHECK: define void @main10() {{[a-z_ ]*}}[[EntryAttr]]
103
105
// Make sure function calls are inlined when AlwaysInline is run
104
106
// This only leaves calls to llvm. intrinsics
0 commit comments