| 1 |
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ |
| 2 |
// RUN: dxil-pc-shadermodel6.3-library %s \ |
| 3 |
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s |
| 4 |
|
| 5 |
// CHECK-DAG: @[[CB:.+]] = external constant { float } |
| 6 |
|
| 7 |
cbuffer A { |
| 8 |
float a; |
| 9 |
// CHECK-DAG:@b = internal global float 3.000000e+00, align 4 |
| 10 |
static float b = 3; |
| 11 |
// CHECK:load float, ptr @[[CB]], align 4 |
| 12 |
// CHECK:load float, ptr @b, align 4 |
| 13 |
float foo() { return a + b; } |
| 14 |
} |
| 15 |
|
| 16 |
float bar() { |
| 17 |
return foo(); |
| 18 |
} |