brintos

brintos / llvm-project-archived public Read only

0
0
Text · 942 B · ebad1cc Raw
23 lines · plain
1// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -verify2// RUN: %clang_cc1 -triple spirv-unknown-vulkan1.3-library %s -fnative-half-type -verify3 4float no_arg() {5  return __builtin_hlsl_elementwise_ddx_coarse();6  // expected-error@-1 {{too few arguments to function call, expected 1, have 0}}7}8 9float too_many_args(float val) {10  return __builtin_hlsl_elementwise_ddx_coarse(val, val);11  // expected-error@-1 {{too many arguments to function call, expected 1, have 2}}12}13 14float test_integer_scalar_input(int val) {15  return __builtin_hlsl_elementwise_ddx_coarse(val);16  // expected-error@-1 {{1st argument must be a scalar or vector of 16 or 32 bit floating-point types (was 'int')}}17}18 19double test_double_scalar_input(double val) {20  return __builtin_hlsl_elementwise_ddx_coarse(val);21  // expected-error@-1 {{1st argument must be a scalar or vector of 16 or 32 bit floating-point types (was 'double')}}22}23