brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1004 B · 3709079 Raw
27 lines · plain
1// 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-unexpected2 3int test_too_few_arg() {4  return firstbitlow();5  // expected-error@-1 {{no matching function for call to 'firstbitlow'}}6}7 8int test_too_many_arg(int p0) {9  return firstbitlow(p0, p0);10  // expected-error@-1 {{no matching function for call to 'firstbitlow'}}11}12 13double test_int_builtin(double p0) {14  return firstbitlow(p0);15  // expected-error@-1 {{call to 'firstbitlow' is ambiguous}}16}17 18double2 test_int_builtin_2(double2 p0) {19  return __builtin_hlsl_elementwise_firstbitlow(p0);20  // expected-error@-1 {{1st argument must be a scalar or vector of integer types (was 'double2' (aka 'vector<double, 2>'))}}21}22 23float test_int_builtin_3(float p0) {24  return __builtin_hlsl_elementwise_firstbitlow(p0);25  // expected-error@-1 {{1st argument must be a scalar or vector of integer types (was 'double')}}26}27