brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · f0076ac Raw
29 lines · plain
1 2// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -fnative-int16-type -emit-llvm-only -disable-llvm-passes -verify -verify-ignore-unexpected -DTEST_FUNC=__builtin_elementwise_exp3// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -fnative-int16-type -emit-llvm-only -disable-llvm-passes -verify -verify-ignore-unexpected -DTEST_FUNC=__builtin_elementwise_exp24// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -fnative-int16-type -emit-llvm-only -disable-llvm-passes -verify -verify-ignore-unexpected -DTEST_FUNC=__builtin_elementwise_exp105float test_too_few_arg() {6  return TEST_FUNC();7  // expected-error@-1 {{too few arguments to function call, expected 1, have 0}}8}9 10float2 test_too_many_arg(float2 p0) {11  return TEST_FUNC(p0, p0);12  // expected-error@-1 {{too many arguments to function call, expected 1, have 2}}13}14 15float builtin_bool_to_float_type_promotion(bool p1) {16  return TEST_FUNC(p1);17  // expected-error@-1 {{1st argument must be a scalar or vector of floating-point types (was 'bool')}}18}19 20float builtin_exp_int_to_float_promotion(int p1) {21  return TEST_FUNC(p1);22  // expected-error@-1 {{1st argument must be a scalar or vector of floating-point types (was 'int')}}23}24 25float2 builtin_exp_int2_to_float2_promotion(int2 p1) {26  return TEST_FUNC(p1);27  // expected-error@-1 {{1st argument must be a scalar or vector of floating-point types (was 'int2' (aka 'vector<int, 2>'))}}28}29