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
44// 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
77
88// Tests that user functions will always be inlined.
99// This includes exported functions and mangled entry point implementation functions.
@@ -71,7 +71,8 @@ RWBuffer<unsigned> Indices;
7171// NOINLINE: ret void
7272
7373// 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
7576// CHECK: define void @main() {{[a-z_ ]*}}[[EntryAttr:\#[0-9]+]]
7677// Make sure function calls are inlined when AlwaysInline is run
7778// This only leaves calls to llvm. intrinsics
@@ -98,7 +99,8 @@ void main(unsigned int GI : SV_GroupIndex) {
9899// NOINLINE: ret void
99100
100101// 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
102104// CHECK: define void @main10() {{[a-z_ ]*}}[[EntryAttr]]
103105// Make sure function calls are inlined when AlwaysInline is run
104106// This only leaves calls to llvm. intrinsics
0 commit comments