| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,85 +1,85 @@ | ||
| // RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ | ||
| // RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ | ||
| // RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \ | ||
| // RUN: --check-prefixes=CHECK,NATIVE_HALF \ | ||
| // RUN: -DFNATTRS=noundef -DTARGET=dx | ||
| // RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ | ||
| // RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \ | ||
| // RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF \ | ||
| // RUN: -DFNATTRS=noundef -DTARGET=dx | ||
| // RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ | ||
| // RUN: spirv-unknown-vulkan-compute %s -fnative-half-type \ | ||
| // RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \ | ||
| // RUN: --check-prefixes=CHECK,NATIVE_HALF \ | ||
| // RUN: -DFNATTRS="spir_func noundef" -DTARGET=spv | ||
| // RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ | ||
| // RUN: spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \ | ||
| // RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF \ | ||
| // RUN: -DFNATTRS="spir_func noundef" -DTARGET=spv | ||
|
|
||
| // NATIVE_HALF: define [[FNATTRS]] half @ | ||
| // NATIVE_HALF: call half @llvm.[[TARGET]].normalize.f16(half | ||
| // NO_HALF: call float @llvm.[[TARGET]].normalize.f32(float | ||
| // NATIVE_HALF: ret half | ||
| // NO_HALF: ret float | ||
| half test_normalize_half(half p0) | ||
| { | ||
| return normalize(p0); | ||
| } | ||
| // NATIVE_HALF: define [[FNATTRS]] <2 x half> @ | ||
| // NATIVE_HALF: call <2 x half> @llvm.[[TARGET]].normalize.v2f16(<2 x half> | ||
| // NO_HALF: call <2 x float> @llvm.[[TARGET]].normalize.v2f32(<2 x float> | ||
| // NATIVE_HALF: ret <2 x half> %hlsl.normalize | ||
| // NO_HALF: ret <2 x float> %hlsl.normalize | ||
| half2 test_normalize_half2(half2 p0) | ||
| { | ||
| return normalize(p0); | ||
| } | ||
| // NATIVE_HALF: define [[FNATTRS]] <3 x half> @ | ||
| // NATIVE_HALF: call <3 x half> @llvm.[[TARGET]].normalize.v3f16(<3 x half> | ||
| // NO_HALF: call <3 x float> @llvm.[[TARGET]].normalize.v3f32(<3 x float> | ||
| // NATIVE_HALF: ret <3 x half> %hlsl.normalize | ||
| // NO_HALF: ret <3 x float> %hlsl.normalize | ||
| half3 test_normalize_half3(half3 p0) | ||
| { | ||
| return normalize(p0); | ||
| } | ||
| // NATIVE_HALF: define [[FNATTRS]] <4 x half> @ | ||
| // NATIVE_HALF: call <4 x half> @llvm.[[TARGET]].normalize.v4f16(<4 x half> | ||
| // NO_HALF: call <4 x float> @llvm.[[TARGET]].normalize.v4f32(<4 x float> | ||
| // NATIVE_HALF: ret <4 x half> %hlsl.normalize | ||
| // NO_HALF: ret <4 x float> %hlsl.normalize | ||
| half4 test_normalize_half4(half4 p0) | ||
| { | ||
| return normalize(p0); | ||
| } | ||
|
|
||
| // CHECK: define [[FNATTRS]] float @ | ||
| // CHECK: call float @llvm.[[TARGET]].normalize.f32(float | ||
| // CHECK: ret float | ||
| float test_normalize_float(float p0) | ||
| { | ||
| return normalize(p0); | ||
| } | ||
| // CHECK: define [[FNATTRS]] <2 x float> @ | ||
| // CHECK: %hlsl.normalize = call <2 x float> @llvm.[[TARGET]].normalize.v2f32(<2 x float> | ||
|
|
||
| // CHECK: ret <2 x float> %hlsl.normalize | ||
| float2 test_normalize_float2(float2 p0) | ||
| { | ||
| return normalize(p0); | ||
| } | ||
| // CHECK: define [[FNATTRS]] <3 x float> @ | ||
| // CHECK: %hlsl.normalize = call <3 x float> @llvm.[[TARGET]].normalize.v3f32( | ||
| // CHECK: ret <3 x float> %hlsl.normalize | ||
| float3 test_normalize_float3(float3 p0) | ||
| { | ||
| return normalize(p0); | ||
| } | ||
| // CHECK: define [[FNATTRS]] <4 x float> @ | ||
| // CHECK: %hlsl.normalize = call <4 x float> @llvm.[[TARGET]].normalize.v4f32( | ||
| // CHECK: ret <4 x float> %hlsl.normalize | ||
| float4 test_length_float4(float4 p0) | ||
| { | ||
| return normalize(p0); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,84 +1,84 @@ | ||
| // RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ | ||
| // RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ | ||
| // RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \ | ||
| // RUN: --check-prefixes=CHECK,NATIVE_HALF \ | ||
| // RUN: -DFNATTRS=noundef -DTARGET=dx | ||
| // RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ | ||
| // RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \ | ||
| // RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF \ | ||
| // RUN: -DFNATTRS=noundef -DTARGET=dx | ||
| // RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ | ||
| // RUN: spirv-unknown-vulkan-compute %s -fnative-half-type \ | ||
| // RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \ | ||
| // RUN: --check-prefixes=CHECK,NATIVE_HALF \ | ||
| // RUN: -DFNATTRS="spir_func noundef" -DTARGET=spv | ||
| // RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ | ||
| // RUN: spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \ | ||
| // RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF \ | ||
| // RUN: -DFNATTRS="spir_func noundef" -DTARGET=spv | ||
|
|
||
| // NATIVE_HALF: define [[FNATTRS]] half @ | ||
| // NATIVE_HALF: call half @llvm.[[TARGET]].step.f16(half | ||
| // NO_HALF: call float @llvm.[[TARGET]].step.f32(float | ||
| // NATIVE_HALF: ret half | ||
| // NO_HALF: ret float | ||
| half test_step_half(half p0, half p1) | ||
| { | ||
| return step(p0, p1); | ||
| } | ||
| // NATIVE_HALF: define [[FNATTRS]] <2 x half> @ | ||
| // NATIVE_HALF: call <2 x half> @llvm.[[TARGET]].step.v2f16(<2 x half> | ||
| // NO_HALF: call <2 x float> @llvm.[[TARGET]].step.v2f32(<2 x float> | ||
| // NATIVE_HALF: ret <2 x half> %hlsl.step | ||
| // NO_HALF: ret <2 x float> %hlsl.step | ||
| half2 test_step_half2(half2 p0, half2 p1) | ||
| { | ||
| return step(p0, p1); | ||
| } | ||
| // NATIVE_HALF: define [[FNATTRS]] <3 x half> @ | ||
| // NATIVE_HALF: call <3 x half> @llvm.[[TARGET]].step.v3f16(<3 x half> | ||
| // NO_HALF: call <3 x float> @llvm.[[TARGET]].step.v3f32(<3 x float> | ||
| // NATIVE_HALF: ret <3 x half> %hlsl.step | ||
| // NO_HALF: ret <3 x float> %hlsl.step | ||
| half3 test_step_half3(half3 p0, half3 p1) | ||
| { | ||
| return step(p0, p1); | ||
| } | ||
| // NATIVE_HALF: define [[FNATTRS]] <4 x half> @ | ||
| // NATIVE_HALF: call <4 x half> @llvm.[[TARGET]].step.v4f16(<4 x half> | ||
| // NO_HALF: call <4 x float> @llvm.[[TARGET]].step.v4f32(<4 x float> | ||
| // NATIVE_HALF: ret <4 x half> %hlsl.step | ||
| // NO_HALF: ret <4 x float> %hlsl.step | ||
| half4 test_step_half4(half4 p0, half4 p1) | ||
| { | ||
| return step(p0, p1); | ||
| } | ||
|
|
||
| // CHECK: define [[FNATTRS]] float @ | ||
| // CHECK: call float @llvm.[[TARGET]].step.f32(float | ||
| // CHECK: ret float | ||
| float test_step_float(float p0, float p1) | ||
| { | ||
| return step(p0, p1); | ||
| } | ||
| // CHECK: define [[FNATTRS]] <2 x float> @ | ||
| // CHECK: %hlsl.step = call <2 x float> @llvm.[[TARGET]].step.v2f32( | ||
| // CHECK: ret <2 x float> %hlsl.step | ||
| float2 test_step_float2(float2 p0, float2 p1) | ||
| { | ||
| return step(p0, p1); | ||
| } | ||
| // CHECK: define [[FNATTRS]] <3 x float> @ | ||
| // CHECK: %hlsl.step = call <3 x float> @llvm.[[TARGET]].step.v3f32( | ||
| // CHECK: ret <3 x float> %hlsl.step | ||
| float3 test_step_float3(float3 p0, float3 p1) | ||
| { | ||
| return step(p0, p1); | ||
| } | ||
| // CHECK: define [[FNATTRS]] <4 x float> @ | ||
| // CHECK: %hlsl.step = call <4 x float> @llvm.[[TARGET]].step.v4f32( | ||
| // CHECK: ret <4 x float> %hlsl.step | ||
| float4 test_step_float4(float4 p0, float4 p1) | ||
| { | ||
| return step(p0, p1); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| ! RUN: %clang --driver-mode=flang --target=x86_64-pc-windows-msvc -### %s -Ltest 2>&1 | FileCheck %s | ||
| ! | ||
| ! Test that user provided paths come before the Flang runtimes | ||
| ! CHECK: "-libpath:test" | ||
| ! CHECK: "-libpath:{{.*(\\|/)}}lib" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,3 @@ | ||
| // RUN: touch %t.o | ||
|
|
||
| // Test HIP runtime lib args specified by --rocm-path. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,11 @@ | ||
| // RUN: %clang_cc1 -pedantic -Wunused-label -fno-diagnostics-show-line-numbers -x c %s 2>&1 | FileCheck %s -strict-whitespace | ||
|
|
||
| // This file intentionally uses a CRLF newline style | ||
| // CHECK: warning: unused label 'ddd' | ||
| // CHECK-NEXT: {{^ ddd:}} | ||
| // CHECK-NEXT: {{^ \^~~~$}} | ||
| // CHECK-NOT: {{^ ;}} | ||
| void f(void) { | ||
| ddd: | ||
| ; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| // RUN: %clang_cc1 -E -frewrite-includes %s | %clang_cc1 - | ||
| // expected-no-diagnostics | ||
| // Note: This source file has CRLF line endings. | ||
| // This test validates that -frewrite-includes translates the end of line (EOL) | ||
| // form used in header files to the EOL form used in the the primary source | ||
| // file when the files use different EOL forms. | ||
| #include "rewrite-includes-mixed-eol-crlf.h" | ||
| #include "rewrite-includes-mixed-eol-lf.h" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,11 @@ | ||
| // Note: This header file has CRLF line endings. | ||
| // The indentation in some of the conditional inclusion directives below is | ||
| // intentional and is required for this test to function as a regression test | ||
| // for GH59736. | ||
| _Static_assert(__LINE__ == 5, ""); | ||
| #if 1 | ||
| _Static_assert(__LINE__ == 7, ""); | ||
| #if 1 | ||
| _Static_assert(__LINE__ == 9, ""); | ||
| #endif | ||
| #endif |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,21 @@ | ||
| // RUN: %clang_cc1 %s -E -o - -I %S/Inputs -isystem %S/Inputs/SystemHeaderPrefix | FileCheck %s | ||
| #include <noline.h> | ||
| #include <line-directive-in-system.h> | ||
|
|
||
| #include "line-directive.h" | ||
|
|
||
| // This tests that the line numbers for the current file are correctly outputted | ||
| // for the include-file-completed test case. This file should be CRLF. | ||
|
|
||
| // CHECK: # 1 "{{.*}}system-header-line-directive-ms-lineendings.c" 2 | ||
| // CHECK: # 1 "{{.*}}noline.h" 1 3 | ||
| // CHECK: foo(void); | ||
| // CHECK: # 3 "{{.*}}system-header-line-directive-ms-lineendings.c" 2 | ||
| // CHECK: # 1 "{{.*}}line-directive-in-system.h" 1 3 | ||
| // The "3" below indicates that "foo.h" is considered a system header. | ||
| // CHECK: # 1 "foo.h" 3 | ||
| // CHECK: foo(void); | ||
| // CHECK: # 4 "{{.*}}system-header-line-directive-ms-lineendings.c" 2 | ||
| // CHECK: # 1 "{{.*}}line-directive.h" 1 | ||
| // CHECK: # 10 "foo.h"{{$}} | ||
| // CHECK: # 6 "{{.*}}system-header-line-directive-ms-lineendings.c" 2 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,31 +1,31 @@ | ||
| // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -ast-dump -x hlsl -o - %s | FileCheck %s | ||
|
|
||
|
|
||
| struct MyBitFields { | ||
| // CHECK: FieldDecl 0x{{[0-9a-f]+}} <line:9:3, col:25> col:16 referenced field1 'unsigned int' | ||
| // CHECK:-ConstantExpr 0x{{[0-9a-f]+}} <col:25> 'int' | ||
| // CHECK:-value: Int 3 | ||
| // CHECK:-IntegerLiteral 0x{{[0-9a-f]+}} <col:25> 'int' 3 | ||
| unsigned int field1 : 3; // 3 bits for field1 | ||
|
|
||
| // CHECK:FieldDecl 0x{{[0-9a-f]+}} <line:15:3, col:25> col:16 referenced field2 'unsigned int' | ||
| // CHECK:-ConstantExpr 0x{{[0-9a-f]+}} <col:25> 'int' | ||
| // CHECK:-value: Int 4 | ||
| // CHECK:-IntegerLiteral 0x{{[0-9a-f]+}} <col:25> 'int' 4 | ||
| unsigned int field2 : 4; // 4 bits for field2 | ||
|
|
||
| // CHECK:FieldDecl 0x{{[0-9a-f]+}} <line:21:3, col:16> col:7 field3 'int' | ||
| // CHECK:-ConstantExpr 0x{{[0-9a-f]+}} <col:16> 'int' | ||
| // CHECK:-value: Int 5 | ||
| // CHECK:-IntegerLiteral 0x{{[0-9a-f]+}} <col:16> 'int' 5 | ||
| int field3 : 5; // 5 bits for field3 (signed) | ||
| }; | ||
|
|
||
|
|
||
|
|
||
| [numthreads(1,1,1)] | ||
| void main() { | ||
| MyBitFields m; | ||
| m.field1 = 4; | ||
| m.field2 = m.field1*2; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,21 @@ | ||
| // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -o - %s | FileCheck %s | ||
|
|
||
| // tests that hlsl annotations are properly parsed when applied on field decls, | ||
| // and that the annotation gets properly placed on the AST. | ||
|
|
||
| struct Eg9{ | ||
| // CHECK: CXXRecordDecl 0x{{[0-9a-f]+}} <col:1, col:8> col:8 implicit struct Eg9 | ||
| // CHECK: FieldDecl 0x{{[0-9a-f]+}} <line:10:3, col:16> col:16 referenced a 'unsigned int' | ||
| // CHECK: -HLSLSV_DispatchThreadIDAttr 0x{{[0-9a-f]+}} <col:20> | ||
| unsigned int a : SV_DispatchThreadID; | ||
| }; | ||
| Eg9 e9; | ||
|
|
||
|
|
||
| RWBuffer<int> In : register(u1); | ||
|
|
||
|
|
||
| [numthreads(1,1,1)] | ||
| void main() { | ||
| In[0] = e9.a; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,25 @@ | ||
| // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -std=hlsl202x -x hlsl -ast-dump -o - %s | FileCheck %s | ||
|
|
||
| typedef vector<float, 4> float4; | ||
|
|
||
| // CHECK: -TypeAliasDecl 0x{{[0-9a-f]+}} <line:[[# @LINE + 4]]:1, col:83> | ||
| // CHECK: -HLSLAttributedResourceType 0x{{[0-9a-f]+}} '__hlsl_resource_t | ||
| // CHECK-SAME{LITERAL}: [[hlsl::resource_class(UAV)]] | ||
| // CHECK-SAME{LITERAL}: [[hlsl::contained_type(int)]] | ||
| using ResourceIntAliasT = __hlsl_resource_t [[hlsl::resource_class(UAV)]] [[hlsl::contained_type(int)]]; | ||
| ResourceIntAliasT h1; | ||
|
|
||
| // CHECK: -VarDecl 0x{{[0-9a-f]+}} <line:[[# @LINE + 3]]:1, col:82> col:82 h2 '__hlsl_resource_t | ||
| // CHECK-SAME{LITERAL}: [[hlsl::resource_class(UAV)]] | ||
| // CHECK-SAME{LITERAL}: [[hlsl::contained_type(float4)]] | ||
| __hlsl_resource_t [[hlsl::resource_class(UAV)]] [[hlsl::contained_type(float4)]] h2; | ||
|
|
||
| // CHECK: ClassTemplateDecl 0x{{[0-9a-f]+}} <line:[[# @LINE + 6]]:1, line:[[# @LINE + 8]]:1> line:[[# @LINE + 6]]:30 S | ||
| // CHECK: TemplateTypeParmDecl 0x{{[0-9a-f]+}} <col:11, col:20> col:20 referenced typename depth 0 index 0 T | ||
| // CHECK: CXXRecordDecl 0x{{[0-9a-f]+}} <col:23, line:[[# @LINE + 6]]:1> line:[[# @LINE + 4]]:30 struct S definition | ||
| // CHECK: FieldDecl 0x{{[0-9a-f]+}} <line:[[# @LINE + 4]]:3, col:79> col:79 h '__hlsl_resource_t | ||
| // CHECK-SAME{LITERAL}: [[hlsl::resource_class(UAV)]] | ||
| // CHECK-SAME{LITERAL}: [[hlsl::contained_type(T)]] | ||
| template <typename T> struct S { | ||
| __hlsl_resource_t [[hlsl::resource_class(UAV)]] [[hlsl::contained_type(T)]] h; | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,28 +1,28 @@ | ||
| // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -std=hlsl202x -x hlsl -o - %s -verify | ||
|
|
||
| typedef vector<float, 4> float4; | ||
|
|
||
| // expected-error@+1{{'contained_type' attribute cannot be applied to a declaration}} | ||
| [[hlsl::contained_type(float4)]] __hlsl_resource_t h1; | ||
|
|
||
| // expected-error@+1{{'contained_type' attribute takes one argument}} | ||
| __hlsl_resource_t [[hlsl::resource_class(UAV)]] [[hlsl::contained_type()]] h3; | ||
|
|
||
| // expected-error@+1{{expected a type}} | ||
| __hlsl_resource_t [[hlsl::resource_class(UAV)]] [[hlsl::contained_type(0)]] h4; | ||
|
|
||
| // expected-error@+1{{unknown type name 'a'}} | ||
| __hlsl_resource_t [[hlsl::resource_class(UAV)]] [[hlsl::contained_type(a)]] h5; | ||
|
|
||
| // expected-error@+1{{expected a type}} | ||
| __hlsl_resource_t [[hlsl::resource_class(UAV)]] [[hlsl::contained_type("b", c)]] h6; | ||
|
|
||
| // expected-warning@+1{{attribute 'contained_type' is already applied}} | ||
| __hlsl_resource_t [[hlsl::resource_class(UAV)]] [[hlsl::contained_type(float)]] [[hlsl::contained_type(float)]] h7; | ||
|
|
||
| // expected-warning@+1{{attribute 'contained_type' is already applied with different arguments}} | ||
| __hlsl_resource_t [[hlsl::resource_class(UAV)]] [[hlsl::contained_type(float)]] [[hlsl::contained_type(int)]] h8; | ||
|
|
||
| // expected-error@+2{{attribute 'resource_class' can be used only on HLSL intangible type '__hlsl_resource_t'}} | ||
| // expected-error@+1{{attribute 'contained_type' can be used only on HLSL intangible type '__hlsl_resource_t'}} | ||
| float [[hlsl::resource_class(UAV)]] [[hlsl::contained_type(float)]] res5; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,22 @@ | ||
| // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -o - %s | FileCheck %s | ||
|
|
||
| // CHECK: CXXRecordDecl 0x{{[0-9a-f]+}} {{.*}} struct MyBuffer definition | ||
| // CHECK: FieldDecl 0x{{[0-9a-f]+}} <line:[[# @LINE + 4]]:3, col:68> col:68 h '__hlsl_resource_t | ||
| // CHECK-SAME{LITERAL}: [[hlsl::resource_class(UAV)]] | ||
| // CHECK-SAME{LITERAL}: [[hlsl::is_rov]] | ||
| struct MyBuffer { | ||
| __hlsl_resource_t [[hlsl::resource_class(UAV)]] [[hlsl::is_rov]] h; | ||
| }; | ||
|
|
||
| // CHECK: VarDecl 0x{{[0-9a-f]+}} <line:[[# @LINE + 3]]:1, col:66> col:66 res '__hlsl_resource_t | ||
| // CHECK-SAME{LITERAL}: [[hlsl::resource_class(SRV)]] | ||
| // CHECK-SAME{LITERAL}: [[hlsl::is_rov]] | ||
| __hlsl_resource_t [[hlsl::is_rov]] [[hlsl::resource_class(SRV)]] res; | ||
|
|
||
| // CHECK: FunctionDecl 0x{{[0-9a-f]+}} <line:[[# @LINE + 4]]:1, line:[[# @LINE + 6]]:1> line:[[# @LINE + 4]]:6 f 'void () | ||
| // CHECK: VarDecl 0x{{[0-9a-f]+}} <col:3, col:72> col:72 r '__hlsl_resource_t | ||
| // CHECK-SAME{LITERAL}: [[hlsl::resource_class(Sampler)]] | ||
| // CHECK-SAME{LITERAL}: [[hlsl::is_rov]] | ||
| void f() { | ||
| __hlsl_resource_t [[hlsl::resource_class(Sampler)]] [[hlsl::is_rov]] r; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,20 @@ | ||
| // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -o - %s -verify | ||
|
|
||
| // expected-error@+1{{'is_rov' attribute cannot be applied to a declaration}} | ||
| [[hlsl::is_rov]] __hlsl_resource_t res0; | ||
|
|
||
| // expected-error@+1{{HLSL resource needs to have [[hlsl::resource_class()]] attribute}} | ||
| __hlsl_resource_t [[hlsl::is_rov]] res1; | ||
|
|
||
| // expected-error@+1{{'is_rov' attribute takes no arguments}} | ||
| __hlsl_resource_t [[hlsl::resource_class(UAV)]] [[hlsl::is_rov(3)]] res2; | ||
|
|
||
| // expected-error@+1{{use of undeclared identifier 'gibberish'}} | ||
| __hlsl_resource_t [[hlsl::resource_class(UAV)]] [[hlsl::is_rov(gibberish)]] res3; | ||
|
|
||
| // expected-warning@+1{{attribute 'is_rov' is already applied}} | ||
| __hlsl_resource_t [[hlsl::resource_class(UAV)]] [[hlsl::is_rov]] [[hlsl::is_rov]] res4; | ||
|
|
||
| // expected-error@+2{{attribute 'resource_class' can be used only on HLSL intangible type '__hlsl_resource_t'}} | ||
| // expected-error@+1{{attribute 'is_rov' can be used only on HLSL intangible type '__hlsl_resource_t'}} | ||
| float [[hlsl::resource_class(UAV)]] [[hlsl::is_rov]] res5; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,22 @@ | ||
| // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -o - %s | FileCheck %s | ||
|
|
||
| // CHECK: CXXRecordDecl 0x{{[0-9a-f]+}} {{.*}} struct MyBuffer definition | ||
| // CHECK: FieldDecl 0x{{[0-9a-f]+}} <line:[[# @LINE + 4]]:3, col:72> col:72 h1 '__hlsl_resource_t | ||
| // CHECK-SAME{LITERAL}: [[hlsl::resource_class(UAV)]] | ||
| // CHECK-SAME{LITERAL}: [[hlsl::raw_buffer]] | ||
| struct MyBuffer { | ||
| __hlsl_resource_t [[hlsl::resource_class(UAV)]] [[hlsl::raw_buffer]] h1; | ||
| }; | ||
|
|
||
| // CHECK: VarDecl 0x{{[0-9a-f]+}} <line:[[# @LINE + 3]]:1, col:70> col:70 h2 '__hlsl_resource_t | ||
| // CHECK-SAME{LITERAL}: [[hlsl::resource_class(SRV)]] | ||
| // CHECK-SAME{LITERAL}: [[hlsl::raw_buffer]] | ||
| __hlsl_resource_t [[hlsl::raw_buffer]] [[hlsl::resource_class(SRV)]] h2; | ||
|
|
||
| // CHECK: FunctionDecl 0x{{[0-9a-f]+}} <line:[[# @LINE + 4]]:1, line:[[# @LINE + 6]]:1> line:[[# @LINE + 4]]:6 f 'void () | ||
| // CHECK: VarDecl 0x{{[0-9a-f]+}} <col:3, col:72> col:72 h3 '__hlsl_resource_t | ||
| // CHECK-SAME{LITERAL}: [[hlsl::resource_class(UAV)]] | ||
| // CHECK-SAME{LITERAL}: [[hlsl::raw_buffer]] | ||
| void f() { | ||
| __hlsl_resource_t [[hlsl::resource_class(UAV)]] [[hlsl::raw_buffer]] h3; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,17 @@ | ||
| // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -o - %s -verify | ||
|
|
||
| // expected-error@+1{{'raw_buffer' attribute cannot be applied to a declaration}} | ||
| [[hlsl::raw_buffer]] __hlsl_resource_t res0; | ||
|
|
||
| // expected-error@+1{{'raw_buffer' attribute takes no arguments}} | ||
| __hlsl_resource_t [[hlsl::resource_class(UAV)]] [[hlsl::raw_buffer(3)]] res2; | ||
|
|
||
| // expected-error@+1{{use of undeclared identifier 'gibberish'}} | ||
| __hlsl_resource_t [[hlsl::resource_class(UAV)]] [[hlsl::raw_buffer(gibberish)]] res3; | ||
|
|
||
| // expected-warning@+1{{attribute 'raw_buffer' is already applied}} | ||
| __hlsl_resource_t [[hlsl::resource_class(UAV)]] [[hlsl::raw_buffer]] [[hlsl::raw_buffer]] res4; | ||
|
|
||
| // expected-error@+2{{attribute 'resource_class' can be used only on HLSL intangible type '__hlsl_resource_t'}} | ||
| // expected-error@+1{{attribute 'raw_buffer' can be used only on HLSL intangible type '__hlsl_resource_t'}} | ||
| float [[hlsl::resource_class(UAV)]] [[hlsl::raw_buffer]] res5; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,37 +1,37 @@ | ||
| // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -o - %s | FileCheck %s | ||
|
|
||
| // CHECK: CXXRecordDecl 0x{{[0-9a-f]+}} {{.*}} struct MyBuffer definition | ||
| // CHECK: FieldDecl 0x{{[0-9a-f]+}} <line:[[# @LINE + 3]]:3, col:51> col:51 h '__hlsl_resource_t | ||
| // CHECK-SAME{LITERAL}: [[hlsl::resource_class(UAV)]] | ||
| struct MyBuffer { | ||
| __hlsl_resource_t [[hlsl::resource_class(UAV)]] h; | ||
| }; | ||
|
|
||
| // CHECK: VarDecl 0x{{[0-9a-f]+}} <line:[[# @LINE + 2]]:1, col:49> col:49 res '__hlsl_resource_t | ||
| // CHECK-SAME{LITERAL}: [[hlsl::resource_class(SRV)]] | ||
| __hlsl_resource_t [[hlsl::resource_class(SRV)]] res; | ||
|
|
||
| // CHECK: FunctionDecl 0x{{[0-9a-f]+}} <line:[[# @LINE + 3]]:1, line:[[# @LINE + 5]]:1> line:[[# @LINE + 3]]:6 f 'void () | ||
| // CHECK: VarDecl 0x{{[0-9a-f]+}} <col:3, col:55> col:55 r '__hlsl_resource_t | ||
| // CHECK-SAME{LITERAL}: [[hlsl::resource_class(Sampler)]] | ||
| void f() { | ||
| __hlsl_resource_t [[hlsl::resource_class(Sampler)]] r; | ||
| } | ||
|
|
||
| // CHECK: ClassTemplateDecl 0x{{[0-9a-f]+}} <line:[[# @LINE + 6]]:1, line:[[# @LINE + 8]]:1> line:[[# @LINE + 6]]:29 MyBuffer2 | ||
| // CHECK: TemplateTypeParmDecl 0x{{[0-9a-f]+}} <col:10, col:19> col:19 typename depth 0 index 0 T | ||
| // CHECK: CXXRecordDecl 0x{{[0-9a-f]+}} <col:22, line:[[# @LINE + 6]]:1> line:[[# @LINE + 4]]:29 struct MyBuffer2 definition | ||
| // CHECK: CXXRecordDecl 0x{{[0-9a-f]+}} <col:22, col:29> col:29 implicit struct MyBuffer2 | ||
| // CHECK: FieldDecl 0x{{[0-9a-f]+}} <line:[[# @LINE + 3]]:3, col:51> col:51 h '__hlsl_resource_t | ||
| // CHECK-SAME{LITERAL}: [[hlsl::resource_class(UAV)]] | ||
| template<typename T> struct MyBuffer2 { | ||
| __hlsl_resource_t [[hlsl::resource_class(UAV)]] h; | ||
| }; | ||
|
|
||
| // CHECK: ClassTemplateSpecializationDecl 0x{{[0-9a-f]+}} <line:[[# @LINE - 4]]:1, line:[[# @LINE - 2]]:1> line:[[# @LINE - 4]]:29 struct MyBuffer2 definition implicit_instantiation | ||
| // CHECK: TemplateArgument type 'float' | ||
| // CHECK: BuiltinType 0x{{[0-9a-f]+}} 'float' | ||
| // CHECK: CXXRecordDecl 0x{{[0-9a-f]+}} <col:22, col:29> col:29 implicit struct MyBuffer2 | ||
| // CHECK: FieldDecl 0x{{[0-9a-f]+}} <line:[[# @LINE - 7]]:3, col:51> col:51 h '__hlsl_resource_t | ||
| // CHECK-SAME{LITERAL}: [[hlsl::resource_class(UAV)]] | ||
| MyBuffer2<float> myBuffer2; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,22 @@ | ||
| // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -o - %s -verify | ||
|
|
||
| // expected-error@+1{{'resource_class' attribute cannot be applied to a declaration}} | ||
| [[hlsl::resource_class(UAV)]] __hlsl_resource_t e0; | ||
|
|
||
| // expected-error@+1{{'resource_class' attribute takes one argument}} | ||
| __hlsl_resource_t [[hlsl::resource_class()]] e1; | ||
|
|
||
| // expected-warning@+1{{ResourceClass attribute argument not supported: gibberish}} | ||
| __hlsl_resource_t [[hlsl::resource_class(gibberish)]] e2; | ||
|
|
||
| // expected-warning@+1{{attribute 'resource_class' is already applied with different arguments}} | ||
| __hlsl_resource_t [[hlsl::resource_class(SRV)]] [[hlsl::resource_class(UAV)]] e3; | ||
|
|
||
| // expected-warning@+1{{attribute 'resource_class' is already applied}} | ||
| __hlsl_resource_t [[hlsl::resource_class(SRV)]] [[hlsl::resource_class(SRV)]] e4; | ||
|
|
||
| // expected-error@+1{{'resource_class' attribute takes one argument}} | ||
| __hlsl_resource_t [[hlsl::resource_class(SRV, "aa")]] e5; | ||
|
|
||
| // expected-error@+1{{attribute 'resource_class' can be used only on HLSL intangible type '__hlsl_resource_t'}} | ||
| float [[hlsl::resource_class(UAV)]] e6; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,21 @@ | ||
| // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -ast-dump -o - %s | FileCheck %s | ||
|
|
||
| // CHECK: -ClassTemplateSpecializationDecl 0x{{[0-9a-f]+}} <<invalid sloc>> <invalid sloc> class RWBuffer definition implicit_instantiation | ||
| // CHECK: -TemplateArgument type 'float' | ||
| // CHECK: `-BuiltinType 0x{{[0-9a-f]+}} 'float' | ||
| // CHECK: -FieldDecl 0x{{[0-9a-f]+}} <<invalid sloc>> <invalid sloc> implicit h '__hlsl_resource_t | ||
| // CHECK-SAME{LITERAL}: [[hlsl::resource_class(UAV)]] | ||
| // CHECK-SAME{LITERAL}: [[hlsl::contained_type(float)]] | ||
| // CHECK: -HLSLResourceAttr 0x{{[0-9a-f]+}} <<invalid sloc>> Implicit TypedBuffer | ||
| RWBuffer<float> Buffer1; | ||
|
|
||
| // CHECK: -ClassTemplateSpecializationDecl 0x{{[0-9a-f]+}} <<invalid sloc>> <invalid sloc> class RasterizerOrderedBuffer definition implicit_instantiation | ||
| // CHECK: -TemplateArgument type 'vector<float, 4>' | ||
| // CHECK: `-ExtVectorType 0x{{[0-9a-f]+}} 'vector<float, 4>' 4 | ||
| // CHECK: `-BuiltinType 0x{{[0-9a-f]+}} 'float' | ||
| // CHECK: -FieldDecl 0x{{[0-9a-f]+}} <<invalid sloc>> <invalid sloc> implicit h '__hlsl_resource_t | ||
| // CHECK-SAME{LITERAL}: [[hlsl::resource_class(UAV)] | ||
| // CHECK-SAME{LITERAL}: [[hlsl::is_rov]] | ||
| // CHECK-SAME{LITERAL}: [[hlsl::contained_type(vector<float, 4>)]] | ||
| // CHECK: -HLSLResourceAttr 0x{{[0-9a-f]+}} <<invalid sloc>> Implicit TypedBuffer | ||
| RasterizerOrderedBuffer<vector<float, 4> > BufferArray3[4]; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,65 +1,65 @@ | ||
| // RUN: %clang_cc1 -triple aarch64 -target-feature +sve \ | ||
| // RUN: -disable-O0-optnone -o - -fsyntax-only %s -verify | ||
| // REQUIRES: aarch64-registered-target | ||
|
|
||
| #include <arm_sve.h> | ||
|
|
||
| svfloat32_t test_asin_vv_i8mf8(svfloat32_t v) { | ||
|
|
||
| return __builtin_elementwise_asin(v); | ||
| // expected-error@-1 {{1st argument must be a vector, integer or floating point type}} | ||
| } | ||
|
|
||
| svfloat32_t test_acos_vv_i8mf8(svfloat32_t v) { | ||
|
|
||
| return __builtin_elementwise_acos(v); | ||
| // expected-error@-1 {{1st argument must be a vector, integer or floating point type}} | ||
| } | ||
|
|
||
| svfloat32_t test_atan_vv_i8mf8(svfloat32_t v) { | ||
|
|
||
| return __builtin_elementwise_atan(v); | ||
| // expected-error@-1 {{1st argument must be a vector, integer or floating point type}} | ||
| } | ||
|
|
||
| svfloat32_t test_atan2_vv_i8mf8(svfloat32_t v) { | ||
|
|
||
| return __builtin_elementwise_atan2(v, v); | ||
| // expected-error@-1 {{1st argument must be a floating point type}} | ||
| } | ||
|
|
||
| svfloat32_t test_sin_vv_i8mf8(svfloat32_t v) { | ||
|
|
||
| return __builtin_elementwise_sin(v); | ||
| // expected-error@-1 {{1st argument must be a vector, integer or floating point type}} | ||
| } | ||
|
|
||
| svfloat32_t test_cos_vv_i8mf8(svfloat32_t v) { | ||
|
|
||
| return __builtin_elementwise_cos(v); | ||
| // expected-error@-1 {{1st argument must be a vector, integer or floating point type}} | ||
| } | ||
|
|
||
| svfloat32_t test_tan_vv_i8mf8(svfloat32_t v) { | ||
|
|
||
| return __builtin_elementwise_tan(v); | ||
| // expected-error@-1 {{1st argument must be a vector, integer or floating point type}} | ||
| } | ||
|
|
||
| svfloat32_t test_sinh_vv_i8mf8(svfloat32_t v) { | ||
|
|
||
| return __builtin_elementwise_sinh(v); | ||
| // expected-error@-1 {{1st argument must be a vector, integer or floating point type}} | ||
| } | ||
|
|
||
| svfloat32_t test_cosh_vv_i8mf8(svfloat32_t v) { | ||
|
|
||
| return __builtin_elementwise_cosh(v); | ||
| // expected-error@-1 {{1st argument must be a vector, integer or floating point type}} | ||
| } | ||
|
|
||
| svfloat32_t test_tanh_vv_i8mf8(svfloat32_t v) { | ||
|
|
||
| return __builtin_elementwise_tanh(v); | ||
| // expected-error@-1 {{1st argument must be a vector, integer or floating point type}} | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| // RUN: %clang_cc1 -triple aarch64-linux-gnu -target-feature +neon -target-feature +v8.3a -ffreestanding -fsyntax-only -verify -verify-ignore-unexpected=note %s | ||
|
|
||
| // REQUIRES: aarch64-registered-target | ||
|
|
||
| #include <arm_neon.h> | ||
|
|
||
| void test(float64x1_t v1f64, float64x2_t v2f64) { | ||
| vcmla_f64(v1f64, v1f64, v1f64); // expected-error {{call to undeclared function 'vcmla_f64'}} | ||
| vcmla_lane_f64(v1f64, v1f64, v1f64, 0); // expected-error {{call to undeclared function 'vcmla_lane_f64'}} | ||
| vcmla_laneq_f64(v1f64, v1f64, v2f64, 0); // expected-error {{call to undeclared function 'vcmla_laneq_f64'}} | ||
| vcmlaq_lane_f64(v2f64, v2f64, v1f64, 0); // expected-error {{call to undeclared function 'vcmlaq_lane_f64'}} | ||
| vcmlaq_laneq_f64(v2f64, v2f64, v2f64, 0); // expected-error {{call to undeclared function 'vcmlaq_laneq_f64'}} | ||
|
|
||
| vcmla_rot90_f64(v1f64, v1f64, v1f64); // expected-error {{call to undeclared function 'vcmla_rot90_f64'}} | ||
| vcmla_rot90_lane_f64(v1f64, v1f64, v1f64, 0); // expected-error {{call to undeclared function 'vcmla_rot90_lane_f64'}} | ||
| vcmla_rot90_laneq_f64(v1f64, v1f64, v2f64, 0); // expected-error {{call to undeclared function 'vcmla_rot90_laneq_f64'}} | ||
| vcmlaq_rot90_lane_f64(v2f64, v2f64, v1f64, 0); // expected-error {{call to undeclared function 'vcmlaq_rot90_lane_f64'}} | ||
| vcmlaq_rot90_laneq_f64(v2f64, v2f64, v2f64, 0); // expected-error {{call to undeclared function 'vcmlaq_rot90_laneq_f64'}} | ||
|
|
||
| vcmla_rot180_f64(v1f64, v1f64, v1f64); // expected-error {{call to undeclared function 'vcmla_rot180_f64'}} | ||
| vcmla_rot180_lane_f64(v1f64, v1f64, v1f64, 0); // expected-error {{call to undeclared function 'vcmla_rot180_lane_f64'}} | ||
| vcmla_rot180_laneq_f64(v1f64, v1f64, v2f64, 0); // expected-error {{call to undeclared function 'vcmla_rot180_laneq_f64'}} | ||
| vcmlaq_rot180_lane_f64(v2f64, v2f64, v1f64, 0); // expected-error {{call to undeclared function 'vcmlaq_rot180_lane_f64'}} | ||
| vcmlaq_rot180_laneq_f64(v2f64, v2f64, v2f64, 0); // expected-error {{call to undeclared function 'vcmlaq_rot180_laneq_f64'}} | ||
|
|
||
| vcmla_rot270_f64(v1f64, v1f64, v1f64); // expected-error {{call to undeclared function 'vcmla_rot270_f64'}} | ||
| vcmla_rot270_lane_f64(v1f64, v1f64, v1f64, 0); // expected-error {{call to undeclared function 'vcmla_rot270_lane_f64'}} | ||
| vcmla_rot270_laneq_f64(v1f64, v1f64, v2f64, 0); // expected-error {{call to undeclared function 'vcmla_rot270_laneq_f64'}} | ||
| vcmlaq_rot270_lane_f64(v2f64, v2f64, v1f64, 0); // expected-error {{call to undeclared function 'vcmlaq_rot270_lane_f64'}} | ||
| vcmlaq_rot270_laneq_f64(v1f64, v1f64, v2f64, 0); // expected-error {{call to undeclared function 'vcmlaq_rot270_laneq_f64'}} | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| // RUN: %clang_cc1 -fsyntax-only -verify=sve -triple aarch64-arm-none-eabi \ | ||
| // RUN: -target-feature -fp8 -target-feature +sve %s | ||
|
|
||
| // REQUIRES: aarch64-registered-target | ||
|
|
||
| #include <arm_sve.h> | ||
| void test_vector_sve(svmfloat8_t a, svuint8_t c) { | ||
| a + c; // sve-error {{cannot convert between vector type 'svuint8_t' (aka '__SVUint8_t') and vector type 'svmfloat8_t' (aka '__SVMfloat8_t') as implicit conversion would cause truncation}} | ||
| a - c; // sve-error {{cannot convert between vector type 'svuint8_t' (aka '__SVUint8_t') and vector type 'svmfloat8_t' (aka '__SVMfloat8_t') as implicit conversion would cause truncation}} | ||
| a * c; // sve-error {{cannot convert between vector type 'svuint8_t' (aka '__SVUint8_t') and vector type 'svmfloat8_t' (aka '__SVMfloat8_t') as implicit conversion would cause truncation}} | ||
| a / c; // sve-error {{cannot convert between vector type 'svuint8_t' (aka '__SVUint8_t') and vector type 'svmfloat8_t' (aka '__SVMfloat8_t') as implicit conversion would cause truncation}} | ||
| } | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,67 +1,67 @@ | ||
| // RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-feature +d \ | ||
| // RUN: -target-feature +v -target-feature +zfh -target-feature +zvfh \ | ||
| // RUN: -disable-O0-optnone -o - -fsyntax-only %s -verify | ||
| // REQUIRES: riscv-registered-target | ||
|
|
||
| #include <riscv_vector.h> | ||
|
|
||
| vfloat32mf2_t test_asin_vv_i8mf8(vfloat32mf2_t v) { | ||
|
|
||
| return __builtin_elementwise_asin(v); | ||
| // expected-error@-1 {{1st argument must be a vector, integer or floating point type}} | ||
| } | ||
|
|
||
| vfloat32mf2_t test_acos_vv_i8mf8(vfloat32mf2_t v) { | ||
|
|
||
| return __builtin_elementwise_acos(v); | ||
| // expected-error@-1 {{1st argument must be a vector, integer or floating point type}} | ||
| } | ||
|
|
||
| vfloat32mf2_t test_atan_vv_i8mf8(vfloat32mf2_t v) { | ||
|
|
||
| return __builtin_elementwise_atan(v); | ||
| // expected-error@-1 {{1st argument must be a vector, integer or floating point type}} | ||
| } | ||
|
|
||
| vfloat32mf2_t test_atan2_vv_i8mf8(vfloat32mf2_t v) { | ||
|
|
||
| return __builtin_elementwise_atan2(v, v); | ||
| // expected-error@-1 {{1st argument must be a floating point type}} | ||
| } | ||
|
|
||
| vfloat32mf2_t test_sin_vv_i8mf8(vfloat32mf2_t v) { | ||
|
|
||
| return __builtin_elementwise_sin(v); | ||
| // expected-error@-1 {{1st argument must be a vector, integer or floating point type}} | ||
| } | ||
|
|
||
| vfloat32mf2_t test_cos_vv_i8mf8(vfloat32mf2_t v) { | ||
|
|
||
| return __builtin_elementwise_cos(v); | ||
| // expected-error@-1 {{1st argument must be a vector, integer or floating point type}} | ||
| } | ||
|
|
||
| vfloat32mf2_t test_tan_vv_i8mf8(vfloat32mf2_t v) { | ||
|
|
||
| return __builtin_elementwise_tan(v); | ||
| // expected-error@-1 {{1st argument must be a vector, integer or floating point type}} | ||
| } | ||
|
|
||
| vfloat32mf2_t test_sinh_vv_i8mf8(vfloat32mf2_t v) { | ||
|
|
||
| return __builtin_elementwise_sinh(v); | ||
| // expected-error@-1 {{1st argument must be a vector, integer or floating point type}} | ||
| } | ||
|
|
||
| vfloat32mf2_t test_cosh_vv_i8mf8(vfloat32mf2_t v) { | ||
|
|
||
| return __builtin_elementwise_cosh(v); | ||
| // expected-error@-1 {{1st argument must be a vector, integer or floating point type}} | ||
| } | ||
|
|
||
| vfloat32mf2_t test_tanh_vv_i8mf8(vfloat32mf2_t v) { | ||
|
|
||
| return __builtin_elementwise_tanh(v); | ||
| // expected-error@-1 {{1st argument must be a vector, integer or floating point type}} | ||
| } | ||
|
|