xref: /llvm-project/clang/test/CodeGenHLSL/disable_opt.hlsl (revision 0d501f38f348cf046d40c9baee12f0c5145b6d8c)
1// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -O0 -emit-llvm -xhlsl -o - %s | FileCheck %s
2// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -O3 -emit-llvm -xhlsl -o - %s | FileCheck %s --check-prefix=OPT
3
4// CHECK:!"dx.disable_optimizations", i32 1}
5
6// OPT-NOT:"dx.disable_optimizations"
7
8float bar(float a, float b);
9
10float foo(float a, float b) {
11  return bar(a, b);
12}
13