Skip to content

Commit 2709339

Browse files
committed
[SPIR-V] Add CodeGen test for the SPIR-V builtin lookup
Signed-off-by: Victor Lomuller <[email protected]>
1 parent eb1d132 commit 2709339

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// RUN: %clang_cc1 -fdeclare-spirv-builtins -fsyntax-only -emit-llvm %s -o - | FileCheck %s
2+
3+
float acos(float val) {
4+
// CHECK: @_Z4acosf
5+
// CHECK: call float @_Z16__spirv_ocl_acosf
6+
return __spirv_ocl_acos(val);
7+
}
8+
9+
// CHECK: declare float @_Z16__spirv_ocl_acosf(float)
10+
11+
double acos(double val) {
12+
// CHECK: @_Z4acosd
13+
// CHECK: call double @_Z16__spirv_ocl_acosd
14+
return __spirv_ocl_acos(val);
15+
}
16+
17+
// CHECK: declare double @_Z16__spirv_ocl_acosd(double)

0 commit comments

Comments
 (0)