https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/105930
>From 4568aab8bfd39be10a3df69535e083f3429e3a9e Mon Sep 17 00:00:00 2001 From: AmrDeveloper <am...@programmer.net> Date: Sat, 24 Aug 2024 10:08:23 +0200 Subject: [PATCH] [clang][HLSL] Update DXIL/SPIRV hybird CodeGen tests to use temp var Update all hybird DXIL/SPIRV codegen tests to use temp variable representing interchange target --- .../GlobalConstructorFunction.hlsl | 2 +- .../test/CodeGenHLSL/GlobalConstructors.hlsl | 2 +- clang/test/CodeGenHLSL/GlobalDestructors.hlsl | 2 +- .../builtins/RWBuffer-constructor.hlsl | 9 +- clang/test/CodeGenHLSL/builtins/all.hlsl | 176 +++++++++--------- clang/test/CodeGenHLSL/builtins/any.hlsl | 176 +++++++++--------- .../CodeGenHLSL/builtins/clamp-builtin.hlsl | 2 +- clang/test/CodeGenHLSL/builtins/clamp.hlsl | 80 ++++---- .../CodeGenHLSL/builtins/create_handle.hlsl | 2 +- clang/test/CodeGenHLSL/builtins/frac.hlsl | 48 ++--- clang/test/CodeGenHLSL/builtins/isinf.hlsl | 24 +-- clang/test/CodeGenHLSL/builtins/length.hlsl | 18 +- .../CodeGenHLSL/builtins/lerp-builtin.hlsl | 4 +- clang/test/CodeGenHLSL/builtins/lerp.hlsl | 60 +++--- clang/test/CodeGenHLSL/builtins/mad.hlsl | 48 ++--- .../test/CodeGenHLSL/builtins/normalize.hlsl | 48 ++--- clang/test/CodeGenHLSL/builtins/rsqrt.hlsl | 48 ++--- clang/test/CodeGenHLSL/builtins/saturate.hlsl | 64 +++---- .../semantics/DispatchThreadID.hlsl | 12 +- .../semantics/GroupIndex-codegen.hlsl | 2 +- 20 files changed, 414 insertions(+), 413 deletions(-) diff --git a/clang/test/CodeGenHLSL/GlobalConstructorFunction.hlsl b/clang/test/CodeGenHLSL/GlobalConstructorFunction.hlsl index f954c9d2f029f2..6856cccb3fc3eb 100644 --- a/clang/test/CodeGenHLSL/GlobalConstructorFunction.hlsl +++ b/clang/test/CodeGenHLSL/GlobalConstructorFunction.hlsl @@ -25,7 +25,7 @@ void main(unsigned GI : SV_GroupIndex) {} //CHECK-NEXT: entry: //CHECK-NEXT: call void @"?call_me_first@@YAXXZ"() //CHECK-NEXT: call void @"?then_call_me@@YAXXZ"() -//CHECK-NEXT: %0 = call i32 @llvm.dx.flattened.thread.id.in.group() +//CHECK-NEXT: %0 = call i32 @llvm.[[ICF:dx]].flattened.thread.id.in.group() //CHECK-NEXT: call void @"?main@@YAXI@Z"(i32 %0) //CHECK-NEXT: call void @"?call_me_last@@YAXXZ"( //CHECK-NEXT: ret void diff --git a/clang/test/CodeGenHLSL/GlobalConstructors.hlsl b/clang/test/CodeGenHLSL/GlobalConstructors.hlsl index 7e2f288726c954..676a24b2467c18 100644 --- a/clang/test/CodeGenHLSL/GlobalConstructors.hlsl +++ b/clang/test/CodeGenHLSL/GlobalConstructors.hlsl @@ -11,6 +11,6 @@ void main(unsigned GI : SV_GroupIndex) {} //CHECK: define void @main() //CHECK-NEXT: entry: //CHECK-NEXT: call void @_GLOBAL__sub_I_GlobalConstructors.hlsl() -//CHECK-NEXT: %0 = call i32 @llvm.dx.flattened.thread.id.in.group() +//CHECK-NEXT: %0 = call i32 @llvm.[[ICF:dx]].flattened.thread.id.in.group() //CHECK-NEXT: call void @"?main@@YAXI@Z"(i32 %0) //CHECK-NEXT: ret void diff --git a/clang/test/CodeGenHLSL/GlobalDestructors.hlsl b/clang/test/CodeGenHLSL/GlobalDestructors.hlsl index 24c3c039fc6192..d98a54bbc49fe8 100644 --- a/clang/test/CodeGenHLSL/GlobalDestructors.hlsl +++ b/clang/test/CodeGenHLSL/GlobalDestructors.hlsl @@ -52,7 +52,7 @@ void main(unsigned GI : SV_GroupIndex) { //CHECK: define void @main() //CHECK-NEXT: entry: //CHECK-NEXT: call void @_GLOBAL__sub_I_GlobalDestructors.hlsl() -//CHECK-NEXT: %0 = call i32 @llvm.dx.flattened.thread.id.in.group() +//CHECK-NEXT: %0 = call i32 @llvm.[[ICF:dx]].flattened.thread.id.in.group() //CHECK-NEXT: call void @"?main@@YAXI@Z"(i32 %0) //CHECK-NEXT: call void @_GLOBAL__D_a() //CHECK-NEXT: ret void diff --git a/clang/test/CodeGenHLSL/builtins/RWBuffer-constructor.hlsl b/clang/test/CodeGenHLSL/builtins/RWBuffer-constructor.hlsl index e51eac7f57c2d3..1a2e9aa490709c 100644 --- a/clang/test/CodeGenHLSL/builtins/RWBuffer-constructor.hlsl +++ b/clang/test/CodeGenHLSL/builtins/RWBuffer-constructor.hlsl @@ -1,12 +1,13 @@ -// RUN: %clang_cc1 -triple spirv-vulkan-library -x hlsl -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s --check-prefix=CHECK-SPIRV +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s --check-prefixes=DXCHECK + +// RUN: %clang_cc1 -triple spirv-vulkan-library -x hlsl -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s --check-prefixes=SPVCHECK RWBuffer<float> Buf; // CHECK: define linkonce_odr noundef ptr @"??0?$RWBuffer@M@hlsl@@QAA@XZ" // CHECK-NEXT: entry: -// CHECK: %[[HandleRes:[0-9]+]] = call ptr @llvm.dx.create.handle(i8 1) +// DXCHECK: %[[HandleRes:[0-9]+]] = call ptr @llvm.[[ICF:dx]].create.handle(i8 1) +// SPVCHECK: %[[HandleRes:[0-9]+]] = call ptr @llvm.[[ICF:spv]].create.handle(i8 1) // CHECK: store ptr %[[HandleRes]], ptr %h, align 4 -// CHECK-SPIRV: %[[HandleRes:[0-9]+]] = call ptr @llvm.spv.create.handle(i8 1) -// CHECK-SPIRV: store ptr %[[HandleRes]], ptr %h, align 8 diff --git a/clang/test/CodeGenHLSL/builtins/all.hlsl b/clang/test/CodeGenHLSL/builtins/all.hlsl index b48daa287480ff..5907584b639b6c 100644 --- a/clang/test/CodeGenHLSL/builtins/all.hlsl +++ b/clang/test/CodeGenHLSL/builtins/all.hlsl @@ -16,262 +16,262 @@ #ifdef __HLSL_ENABLE_16_BIT // DXIL_NATIVE_HALF: define noundef i1 @ // SPIR_NATIVE_HALF: define spir_func noundef i1 @ -// DXIL_NATIVE_HALF: %hlsl.all = call i1 @llvm.dx.all.i16 -// SPIR_NATIVE_HALF: %hlsl.all = call i1 @llvm.spv.all.i16 +// DXIL_NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.i16 +// SPIR_NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.i16 // NATIVE_HALF: ret i1 %hlsl.all bool test_all_int16_t(int16_t p0) { return all(p0); } // DXIL_NATIVE_HALF: define noundef i1 @ // SPIR_NATIVE_HALF: define spir_func noundef i1 @ -// DXIL_NATIVE_HALF: %hlsl.all = call i1 @llvm.dx.all.v2i16 -// SPIR_NATIVE_HALF: %hlsl.all = call i1 @llvm.spv.all.v2i16 +// DXIL_NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v2i16 +// SPIR_NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v2i16 // NATIVE_HALF: ret i1 %hlsl.all bool test_all_int16_t2(int16_t2 p0) { return all(p0); } // DXIL_NATIVE_HALF: define noundef i1 @ // SPIR_NATIVE_HALF: define spir_func noundef i1 @ -// DXIL_NATIVE_HALF: %hlsl.all = call i1 @llvm.dx.all.v3i16 -// SPIR_NATIVE_HALF: %hlsl.all = call i1 @llvm.spv.all.v3i16 +// DXIL_NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v3i16 +// SPIR_NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v3i16 // NATIVE_HALF: ret i1 %hlsl.all bool test_all_int16_t3(int16_t3 p0) { return all(p0); } // DXIL_NATIVE_HALF: define noundef i1 @ // SPIR_NATIVE_HALF: define spir_func noundef i1 @ -// DXIL_NATIVE_HALF: %hlsl.all = call i1 @llvm.dx.all.v4i16 -// SPIR_NATIVE_HALF: %hlsl.all = call i1 @llvm.spv.all.v4i16 +// DXIL_NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v4i16 +// SPIR_NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v4i16 // NATIVE_HALF: ret i1 %hlsl.all bool test_all_int16_t4(int16_t4 p0) { return all(p0); } // DXIL_NATIVE_HALF: define noundef i1 @ // SPIR_NATIVE_HALF: define spir_func noundef i1 @ -// DXIL_NATIVE_HALF: %hlsl.all = call i1 @llvm.dx.all.i16 -// SPIR_NATIVE_HALF: %hlsl.all = call i1 @llvm.spv.all.i16 +// DXIL_NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.i16 +// SPIR_NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.i16 // NATIVE_HALF: ret i1 %hlsl.all bool test_all_uint16_t(uint16_t p0) { return all(p0); } // DXIL_NATIVE_HALF: define noundef i1 @ // SPIR_NATIVE_HALF: define spir_func noundef i1 @ -// DXIL_NATIVE_HALF: %hlsl.all = call i1 @llvm.dx.all.v2i16 -// SPIR_NATIVE_HALF: %hlsl.all = call i1 @llvm.spv.all.v2i16 +// DXIL_NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v2i16 +// SPIR_NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v2i16 // NATIVE_HALF: ret i1 %hlsl.all bool test_all_uint16_t2(uint16_t2 p0) { return all(p0); } // DXIL_NATIVE_HALF: define noundef i1 @ // SPIR_NATIVE_HALF: define spir_func noundef i1 @ -// DXIL_NATIVE_HALF: %hlsl.all = call i1 @llvm.dx.all.v3i16 -// SPIR_NATIVE_HALF: %hlsl.all = call i1 @llvm.spv.all.v3i16 +// DXIL_NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v3i16 +// SPIR_NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v3i16 // NATIVE_HALF: ret i1 %hlsl.all bool test_all_uint16_t3(uint16_t3 p0) { return all(p0); } // DXIL_NATIVE_HALF: define noundef i1 @ // SPIR_NATIVE_HALF: define spir_func noundef i1 @ -// DXIL_NATIVE_HALF: %hlsl.all = call i1 @llvm.dx.all.v4i16 -// SPIR_NATIVE_HALF: %hlsl.all = call i1 @llvm.spv.all.v4i16 +// DXIL_NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v4i16 +// SPIR_NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v4i16 // NATIVE_HALF: ret i1 %hlsl.all bool test_all_uint16_t4(uint16_t4 p0) { return all(p0); } #endif // __HLSL_ENABLE_16_BIT // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_NATIVE_HALF: %hlsl.all = call i1 @llvm.dx.all.f16 -// SPIR_NATIVE_HALF: %hlsl.all = call i1 @llvm.spv.all.f16 -// DXIL_NO_HALF: %hlsl.all = call i1 @llvm.dx.all.f32 -// SPIR_NO_HALF: %hlsl.all = call i1 @llvm.spv.all.f32 +// DXIL_NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.f16 +// SPIR_NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.f16 +// DXIL_NO_HALF: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.f32 +// SPIR_NO_HALF: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.f32 // CHECK: ret i1 %hlsl.all bool test_all_half(half p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_NATIVE_HALF: %hlsl.all = call i1 @llvm.dx.all.v2f16 -// SPIR_NATIVE_HALF: %hlsl.all = call i1 @llvm.spv.all.v2f16 -// DXIL_NO_HALF: %hlsl.all = call i1 @llvm.dx.all.v2f32 -// SPIR_NO_HALF: %hlsl.all = call i1 @llvm.spv.all.v2f32 +// DXIL_NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v2f16 +// SPIR_NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v2f16 +// DXIL_NO_HALF: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v2f32 +// SPIR_NO_HALF: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v2f32 // CHECK: ret i1 %hlsl.all bool test_all_half2(half2 p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_NATIVE_HALF: %hlsl.all = call i1 @llvm.dx.all.v3f16 -// SPIR_NATIVE_HALF: %hlsl.all = call i1 @llvm.spv.all.v3f16 -// DXIL_NO_HALF: %hlsl.all = call i1 @llvm.dx.all.v3f32 -// SPIR_NO_HALF: %hlsl.all = call i1 @llvm.spv.all.v3f32 +// DXIL_NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v3f16 +// SPIR_NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v3f16 +// DXIL_NO_HALF: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v3f32 +// SPIR_NO_HALF: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v3f32 // CHECK: ret i1 %hlsl.all bool test_all_half3(half3 p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_NATIVE_HALF: %hlsl.all = call i1 @llvm.dx.all.v4f16 -// SPIR_NATIVE_HALF: %hlsl.all = call i1 @llvm.spv.all.v4f16 -// DXIL_NO_HALF: %hlsl.all = call i1 @llvm.dx.all.v4f32 -// SPIR_NO_HALF: %hlsl.all = call i1 @llvm.spv.all.v4f32 +// DXIL_NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v4f16 +// SPIR_NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v4f16 +// DXIL_NO_HALF: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v4f32 +// SPIR_NO_HALF: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v4f32 // CHECK: ret i1 %hlsl.all bool test_all_half4(half4 p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.all = call i1 @llvm.dx.all.f32 -// SPIR_CHECK: %hlsl.all = call i1 @llvm.spv.all.f32 +// DXIL_CHECK: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.f32 +// SPIR_CHECK: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.f32 // CHECK: ret i1 %hlsl.all bool test_all_float(float p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.all = call i1 @llvm.dx.all.v2f32 -// SPIR_CHECK: %hlsl.all = call i1 @llvm.spv.all.v2f32 +// DXIL_CHECK: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v2f32 +// SPIR_CHECK: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v2f32 // CHECK: ret i1 %hlsl.all bool test_all_float2(float2 p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.all = call i1 @llvm.dx.all.v3f32 -// SPIR_CHECK: %hlsl.all = call i1 @llvm.spv.all.v3f32 +// DXIL_CHECK: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v3f32 +// SPIR_CHECK: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v3f32 // CHECK: ret i1 %hlsl.all bool test_all_float3(float3 p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.all = call i1 @llvm.dx.all.v4f32 -// SPIR_CHECK: %hlsl.all = call i1 @llvm.spv.all.v4f32 +// DXIL_CHECK: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v4f32 +// SPIR_CHECK: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v4f32 // CHECK: ret i1 %hlsl.all bool test_all_float4(float4 p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.all = call i1 @llvm.dx.all.f64 -// SPIR_CHECK: %hlsl.all = call i1 @llvm.spv.all.f64 +// DXIL_CHECK: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.f64 +// SPIR_CHECK: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.f64 // CHECK: ret i1 %hlsl.all bool test_all_double(double p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.all = call i1 @llvm.dx.all.v2f64 -// SPIR_CHECK: %hlsl.all = call i1 @llvm.spv.all.v2f64 +// DXIL_CHECK: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v2f64 +// SPIR_CHECK: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v2f64 // CHECK: ret i1 %hlsl.all bool test_all_double2(double2 p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.all = call i1 @llvm.dx.all.v3f64 -// SPIR_CHECK: %hlsl.all = call i1 @llvm.spv.all.v3f64 +// DXIL_CHECK: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v3f64 +// SPIR_CHECK: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v3f64 // CHECK: ret i1 %hlsl.all bool test_all_double3(double3 p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.all = call i1 @llvm.dx.all.v4f64 -// SPIR_CHECK: %hlsl.all = call i1 @llvm.spv.all.v4f64 +// DXIL_CHECK: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v4f64 +// SPIR_CHECK: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v4f64 // CHECK: ret i1 %hlsl.all bool test_all_double4(double4 p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.all = call i1 @llvm.dx.all.i32 -// SPIR_CHECK: %hlsl.all = call i1 @llvm.spv.all.i32 +// DXIL_CHECK: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.i32 +// SPIR_CHECK: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.i32 // CHECK: ret i1 %hlsl.all bool test_all_int(int p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.all = call i1 @llvm.dx.all.v2i32 -// SPIR_CHECK: %hlsl.all = call i1 @llvm.spv.all.v2i32 +// DXIL_CHECK: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v2i32 +// SPIR_CHECK: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v2i32 // CHECK: ret i1 %hlsl.all bool test_all_int2(int2 p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.all = call i1 @llvm.dx.all.v3i32 -// SPIR_CHECK: %hlsl.all = call i1 @llvm.spv.all.v3i32 +// DXIL_CHECK: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v3i32 +// SPIR_CHECK: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v3i32 // CHECK: ret i1 %hlsl.all bool test_all_int3(int3 p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.all = call i1 @llvm.dx.all.v4i32 -// SPIR_CHECK: %hlsl.all = call i1 @llvm.spv.all.v4i32 +// DXIL_CHECK: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v4i32 +// SPIR_CHECK: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v4i32 // CHECK: ret i1 %hlsl.all bool test_all_int4(int4 p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.all = call i1 @llvm.dx.all.i32 -// SPIR_CHECK: %hlsl.all = call i1 @llvm.spv.all.i32 +// DXIL_CHECK: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.i32 +// SPIR_CHECK: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.i32 // CHECK: ret i1 %hlsl.all bool test_all_uint(uint p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.all = call i1 @llvm.dx.all.v2i32 -// SPIR_CHECK: %hlsl.all = call i1 @llvm.spv.all.v2i32 +// DXIL_CHECK: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v2i32 +// SPIR_CHECK: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v2i32 // CHECK: ret i1 %hlsl.all bool test_all_uint2(uint2 p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.all = call i1 @llvm.dx.all.v3i32 -// SPIR_CHECK: %hlsl.all = call i1 @llvm.spv.all.v3i32 +// DXIL_CHECK: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v3i32 +// SPIR_CHECK: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v3i32 // CHECK: ret i1 %hlsl.all bool test_all_uint3(uint3 p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.all = call i1 @llvm.dx.all.v4i32 -// SPIR_CHECK: %hlsl.all = call i1 @llvm.spv.all.v4i32 +// DXIL_CHECK: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v4i32 +// SPIR_CHECK: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v4i32 // CHECK: ret i1 %hlsl.all bool test_all_uint4(uint4 p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.all = call i1 @llvm.dx.all.i64 -// SPIR_CHECK: %hlsl.all = call i1 @llvm.spv.all.i64 +// DXIL_CHECK: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.i64 +// SPIR_CHECK: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.i64 // CHECK: ret i1 %hlsl.all bool test_all_int64_t(int64_t p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.all = call i1 @llvm.dx.all.v2i64 -// SPIR_CHECK: %hlsl.all = call i1 @llvm.spv.all.v2i64 +// DXIL_CHECK: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v2i64 +// SPIR_CHECK: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v2i64 // CHECK: ret i1 %hlsl.all bool test_all_int64_t2(int64_t2 p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.all = call i1 @llvm.dx.all.v3i64 -// SPIR_CHECK: %hlsl.all = call i1 @llvm.spv.all.v3i64 +// DXIL_CHECK: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v3i64 +// SPIR_CHECK: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v3i64 // CHECK: ret i1 %hlsl.all bool test_all_int64_t3(int64_t3 p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.all = call i1 @llvm.dx.all.v4i64 -// SPIR_CHECK: %hlsl.all = call i1 @llvm.spv.all.v4i64 +// DXIL_CHECK: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v4i64 +// SPIR_CHECK: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v4i64 // CHECK: ret i1 %hlsl.all bool test_all_int64_t4(int64_t4 p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.all = call i1 @llvm.dx.all.i64 -// SPIR_CHECK: %hlsl.all = call i1 @llvm.spv.all.i64 +// DXIL_CHECK: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.i64 +// SPIR_CHECK: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.i64 // CHECK: ret i1 %hlsl.all bool test_all_uint64_t(uint64_t p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.all = call i1 @llvm.dx.all.v2i64 -// SPIR_CHECK: %hlsl.all = call i1 @llvm.spv.all.v2i64 +// DXIL_CHECK: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v2i64 +// SPIR_CHECK: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v2i64 // CHECK: ret i1 %hlsl.all bool test_all_uint64_t2(uint64_t2 p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.all = call i1 @llvm.dx.all.v3i64 -// SPIR_CHECK: %hlsl.all = call i1 @llvm.spv.all.v3i64 +// DXIL_CHECK: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v3i64 +// SPIR_CHECK: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v3i64 // CHECK: ret i1 %hlsl.all bool test_all_uint64_t3(uint64_t3 p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.all = call i1 @llvm.dx.all.v4i64 -// SPIR_CHECK: %hlsl.all = call i1 @llvm.spv.all.v4i64 +// DXIL_CHECK: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v4i64 +// SPIR_CHECK: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v4i64 // CHECK: ret i1 %hlsl.all bool test_all_uint64_t4(uint64_t4 p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.all = call i1 @llvm.dx.all.i1 -// SPIR_CHECK: %hlsl.all = call i1 @llvm.spv.all.i1 +// DXIL_CHECK: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.i1 +// SPIR_CHECK: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.i1 // CHECK: ret i1 %hlsl.all bool test_all_bool(bool p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.all = call i1 @llvm.dx.all.v2i1 -// SPIR_CHECK: %hlsl.all = call i1 @llvm.spv.all.v2i1 +// DXIL_CHECK: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v2i1 +// SPIR_CHECK: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v2i1 // CHECK: ret i1 %hlsl.all bool test_all_bool2(bool2 p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.all = call i1 @llvm.dx.all.v3i1 -// SPIR_CHECK: %hlsl.all = call i1 @llvm.spv.all.v3i1 +// DXIL_CHECK: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v3i1 +// SPIR_CHECK: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v3i1 // CHECK: ret i1 %hlsl.all bool test_all_bool3(bool3 p0) { return all(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.all = call i1 @llvm.dx.all.v4i1 -// SPIR_CHECK: %hlsl.all = call i1 @llvm.spv.all.v4i1 +// DXIL_CHECK: %hlsl.all = call i1 @llvm.[[ICF:dx]].all.v4i1 +// SPIR_CHECK: %hlsl.all = call i1 @llvm.[[ICF:spv]].all.v4i1 // CHECK: ret i1 %hlsl.all bool test_all_bool4(bool4 p0) { return all(p0); } diff --git a/clang/test/CodeGenHLSL/builtins/any.hlsl b/clang/test/CodeGenHLSL/builtins/any.hlsl index 84584281a3b7d2..82c8ec73e437ec 100644 --- a/clang/test/CodeGenHLSL/builtins/any.hlsl +++ b/clang/test/CodeGenHLSL/builtins/any.hlsl @@ -16,289 +16,289 @@ #ifdef __HLSL_ENABLE_16_BIT // DXIL_NATIVE_HALF: define noundef i1 @ // SPIR_NATIVE_HALF: define spir_func noundef i1 @ -// DXIL_NATIVE_HALF: %hlsl.any = call i1 @llvm.dx.any.i16 -// SPIR_NATIVE_HALF: %hlsl.any = call i1 @llvm.spv.any.i16 +// DXIL_NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.i16 +// SPIR_NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.i16 // NATIVE_HALF: ret i1 %hlsl.any bool test_any_int16_t(int16_t p0) { return any(p0); } // DXIL_NATIVE_HALF: define noundef i1 @ // SPIR_NATIVE_HALF: define spir_func noundef i1 @ -// DXIL_NATIVE_HALF: %hlsl.any = call i1 @llvm.dx.any.v2i16 -// SPIR_NATIVE_HALF: %hlsl.any = call i1 @llvm.spv.any.v2i16 +// DXIL_NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v2i16 +// SPIR_NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v2i16 // NATIVE_HALF: ret i1 %hlsl.any bool test_any_int16_t2(int16_t2 p0) { return any(p0); } // DXIL_NATIVE_HALF: define noundef i1 @ // SPIR_NATIVE_HALF: define spir_func noundef i1 @ -// DXIL_NATIVE_HALF: %hlsl.any = call i1 @llvm.dx.any.v3i16 -// SPIR_NATIVE_HALF: %hlsl.any = call i1 @llvm.spv.any.v3i16 +// DXIL_NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v3i16 +// SPIR_NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v3i16 // NATIVE_HALF: ret i1 %hlsl.any bool test_any_int16_t3(int16_t3 p0) { return any(p0); } // DXIL_NATIVE_HALF: define noundef i1 @ // SPIR_NATIVE_HALF: define spir_func noundef i1 @ -// DXIL_NATIVE_HALF: %hlsl.any = call i1 @llvm.dx.any.v4i16 -// SPIR_NATIVE_HALF: %hlsl.any = call i1 @llvm.spv.any.v4i16 +// DXIL_NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v4i16 +// SPIR_NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v4i16 // NATIVE_HALF: ret i1 %hlsl.any bool test_any_int16_t4(int16_t4 p0) { return any(p0); } // DXIL_NATIVE_HALF: define noundef i1 @ // SPIR_NATIVE_HALF: define spir_func noundef i1 @ -// DXIL_NATIVE_HALF: %hlsl.any = call i1 @llvm.dx.any.i16 -// SPIR_NATIVE_HALF: %hlsl.any = call i1 @llvm.spv.any.i16 +// DXIL_NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.i16 +// SPIR_NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.i16 // NATIVE_HALF: ret i1 %hlsl.any bool test_any_uint16_t(uint16_t p0) { return any(p0); } // DXIL_NATIVE_HALF: define noundef i1 @ // SPIR_NATIVE_HALF: define spir_func noundef i1 @ -// DXIL_NATIVE_HALF: %hlsl.any = call i1 @llvm.dx.any.v2i16 -// SPIR_NATIVE_HALF: %hlsl.any = call i1 @llvm.spv.any.v2i16 +// DXIL_NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v2i16 +// SPIR_NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v2i16 // NATIVE_HALF: ret i1 %hlsl.any bool test_any_uint16_t2(uint16_t2 p0) { return any(p0); } // DXIL_NATIVE_HALF: define noundef i1 @ // SPIR_NATIVE_HALF: define spir_func noundef i1 @ -// DXIL_NATIVE_HALF: %hlsl.any = call i1 @llvm.dx.any.v3i16 -// SPIR_NATIVE_HALF: %hlsl.any = call i1 @llvm.spv.any.v3i16 +// DXIL_NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v3i16 +// SPIR_NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v3i16 // NATIVE_HALF: ret i1 %hlsl.any bool test_any_uint16_t3(uint16_t3 p0) { return any(p0); } // DXIL_NATIVE_HALF: define noundef i1 @ // SPIR_NATIVE_HALF: define spir_func noundef i1 @ -// DXIL_NATIVE_HALF: %hlsl.any = call i1 @llvm.dx.any.v4i16 -// SPIR_NATIVE_HALF: %hlsl.any = call i1 @llvm.spv.any.v4i16 +// DXIL_NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v4i16 +// SPIR_NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v4i16 // NATIVE_HALF: ret i1 %hlsl.any bool test_any_uint16_t4(uint16_t4 p0) { return any(p0); } #endif // __HLSL_ENABLE_16_BIT // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_NATIVE_HALF: %hlsl.any = call i1 @llvm.dx.any.f16 -// SPIR_NATIVE_HALF: %hlsl.any = call i1 @llvm.spv.any.f16 -// DXIL_NO_HALF: %hlsl.any = call i1 @llvm.dx.any.f32 -// SPIR_NO_HALF: %hlsl.any = call i1 @llvm.spv.any.f32 +// DXIL_NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.f16 +// SPIR_NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.f16 +// DXIL_NO_HALF: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.f32 +// SPIR_NO_HALF: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.f32 // CHECK: ret i1 %hlsl.any bool test_any_half(half p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_NATIVE_HALF: %hlsl.any = call i1 @llvm.dx.any.v2f16 -// SPIR_NATIVE_HALF: %hlsl.any = call i1 @llvm.spv.any.v2f16 -// DXIL_NO_HALF: %hlsl.any = call i1 @llvm.dx.any.v2f32 -// SPIR_NO_HALF: %hlsl.any = call i1 @llvm.spv.any.v2f32 +// DXIL_NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v2f16 +// SPIR_NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v2f16 +// DXIL_NO_HALF: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v2f32 +// SPIR_NO_HALF: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v2f32 // CHECK: ret i1 %hlsl.any bool test_any_half2(half2 p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_NATIVE_HALF: %hlsl.any = call i1 @llvm.dx.any.v3f16 -// SPIR_NATIVE_HALF: %hlsl.any = call i1 @llvm.spv.any.v3f16 -// DXIL_NO_HALF: %hlsl.any = call i1 @llvm.dx.any.v3f32 -// SPIR_NO_HALF: %hlsl.any = call i1 @llvm.spv.any.v3f32 +// DXIL_NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v3f16 +// SPIR_NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v3f16 +// DXIL_NO_HALF: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v3f32 +// SPIR_NO_HALF: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v3f32 // CHECK: ret i1 %hlsl.any bool test_any_half3(half3 p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_NATIVE_HALF: %hlsl.any = call i1 @llvm.dx.any.v4f16 -// SPIR_NATIVE_HALF: %hlsl.any = call i1 @llvm.spv.any.v4f16 -// DXIL_NO_HALF: %hlsl.any = call i1 @llvm.dx.any.v4f32 -// SPIR_NO_HALF: %hlsl.any = call i1 @llvm.spv.any.v4f32 +// DXIL_NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v4f16 +// SPIR_NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v4f16 +// DXIL_NO_HALF: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v4f32 +// SPIR_NO_HALF: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v4f32 // CHECK: ret i1 %hlsl.any bool test_any_half4(half4 p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.any = call i1 @llvm.dx.any.f32 -// SPIR_CHECK: %hlsl.any = call i1 @llvm.spv.any.f32 +// DXIL_CHECK: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.f32 +// SPIR_CHECK: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.f32 // CHECK: ret i1 %hlsl.any bool test_any_float(float p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.any = call i1 @llvm.dx.any.v2f32 -// SPIR_CHECK: %hlsl.any = call i1 @llvm.spv.any.v2f32 +// DXIL_CHECK: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v2f32 +// SPIR_CHECK: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v2f32 // CHECK: ret i1 %hlsl.any bool test_any_float2(float2 p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.any = call i1 @llvm.dx.any.v3f32 -// SPIR_CHECK: %hlsl.any = call i1 @llvm.spv.any.v3f32 +// DXIL_CHECK: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v3f32 +// SPIR_CHECK: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v3f32 // CHECK: ret i1 %hlsl.any bool test_any_float3(float3 p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.any = call i1 @llvm.dx.any.v4f32 -// SPIR_CHECK: %hlsl.any = call i1 @llvm.spv.any.v4f32 +// DXIL_CHECK: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v4f32 +// SPIR_CHECK: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v4f32 // CHECK: ret i1 %hlsl.any bool test_any_float4(float4 p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.any = call i1 @llvm.dx.any.f64 -// SPIR_CHECK: %hlsl.any = call i1 @llvm.spv.any.f64 +// DXIL_CHECK: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.f64 +// SPIR_CHECK: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.f64 // CHECK: ret i1 %hlsl.any bool test_any_double(double p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.any = call i1 @llvm.dx.any.v2f64 -// SPIR_CHECK: %hlsl.any = call i1 @llvm.spv.any.v2f64 +// DXIL_CHECK: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v2f64 +// SPIR_CHECK: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v2f64 // CHECK: ret i1 %hlsl.any bool test_any_double2(double2 p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.any = call i1 @llvm.dx.any.v3f64 -// SPIR_CHECK: %hlsl.any = call i1 @llvm.spv.any.v3f64 +// DXIL_CHECK: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v3f64 +// SPIR_CHECK: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v3f64 // CHECK: ret i1 %hlsl.any bool test_any_double3(double3 p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.any = call i1 @llvm.dx.any.v4f64 -// SPIR_CHECK: %hlsl.any = call i1 @llvm.spv.any.v4f64 +// DXIL_CHECK: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v4f64 +// SPIR_CHECK: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v4f64 // CHECK: ret i1 %hlsl.any bool test_any_double4(double4 p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.any = call i1 @llvm.dx.any.i32 -// SPIR_CHECK: %hlsl.any = call i1 @llvm.spv.any.i32 +// DXIL_CHECK: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.i32 +// SPIR_CHECK: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.i32 // CHECK: ret i1 %hlsl.any bool test_any_int(int p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.any = call i1 @llvm.dx.any.v2i32 -// SPIR_CHECK: %hlsl.any = call i1 @llvm.spv.any.v2i32 +// DXIL_CHECK: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v2i32 +// SPIR_CHECK: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v2i32 // CHECK: ret i1 %hlsl.any bool test_any_int2(int2 p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.any = call i1 @llvm.dx.any.v3i32 -// SPIR_CHECK: %hlsl.any = call i1 @llvm.spv.any.v3i32 +// DXIL_CHECK: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v3i32 +// SPIR_CHECK: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v3i32 // CHECK: ret i1 %hlsl.any bool test_any_int3(int3 p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.any = call i1 @llvm.dx.any.v4i32 -// SPIR_CHECK: %hlsl.any = call i1 @llvm.spv.any.v4i32 +// DXIL_CHECK: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v4i32 +// SPIR_CHECK: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v4i32 // CHECK: ret i1 %hlsl.any bool test_any_int4(int4 p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.any = call i1 @llvm.dx.any.i32 -// SPIR_CHECK: %hlsl.any = call i1 @llvm.spv.any.i32 +// DXIL_CHECK: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.i32 +// SPIR_CHECK: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.i32 // CHECK: ret i1 %hlsl.any bool test_any_uint(uint p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.any = call i1 @llvm.dx.any.v2i32 -// SPIR_CHECK: %hlsl.any = call i1 @llvm.spv.any.v2i32 +// DXIL_CHECK: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v2i32 +// SPIR_CHECK: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v2i32 // CHECK: ret i1 %hlsl.any bool test_any_uint2(uint2 p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.any = call i1 @llvm.dx.any.v3i32 -// SPIR_CHECK: %hlsl.any = call i1 @llvm.spv.any.v3i32 +// DXIL_CHECK: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v3i32 +// SPIR_CHECK: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v3i32 // CHECK: ret i1 %hlsl.any bool test_any_uint3(uint3 p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.any = call i1 @llvm.dx.any.v4i32 -// SPIR_CHECK: %hlsl.any = call i1 @llvm.spv.any.v4i32 +// DXIL_CHECK: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v4i32 +// SPIR_CHECK: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v4i32 // CHECK: ret i1 %hlsl.any bool test_any_uint4(uint4 p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.any = call i1 @llvm.dx.any.i64 -// SPIR_CHECK: %hlsl.any = call i1 @llvm.spv.any.i64 +// DXIL_CHECK: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.i64 +// SPIR_CHECK: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.i64 // CHECK: ret i1 %hlsl.any bool test_any_int64_t(int64_t p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.any = call i1 @llvm.dx.any.v2i64 -// SPIR_CHECK: %hlsl.any = call i1 @llvm.spv.any.v2i64 +// DXIL_CHECK: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v2i64 +// SPIR_CHECK: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v2i64 // CHECK: ret i1 %hlsl.any bool test_any_int64_t2(int64_t2 p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.any = call i1 @llvm.dx.any.v3i64 -// SPIR_CHECK: %hlsl.any = call i1 @llvm.spv.any.v3i64 +// DXIL_CHECK: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v3i64 +// SPIR_CHECK: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v3i64 // CHECK: ret i1 %hlsl.any bool test_any_int64_t3(int64_t3 p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.any = call i1 @llvm.dx.any.v4i64 -// SPIR_CHECK: %hlsl.any = call i1 @llvm.spv.any.v4i64 +// DXIL_CHECK: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v4i64 +// SPIR_CHECK: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v4i64 // CHECK: ret i1 %hlsl.any bool test_any_int64_t4(int64_t4 p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.any = call i1 @llvm.dx.any.i64 -// SPIR_CHECK: %hlsl.any = call i1 @llvm.spv.any.i64 +// DXIL_CHECK: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.i64 +// SPIR_CHECK: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.i64 // CHECK: ret i1 %hlsl.any bool test_any_uint64_t(uint64_t p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.any = call i1 @llvm.dx.any.v2i64 -// SPIR_CHECK: %hlsl.any = call i1 @llvm.spv.any.v2i64 +// DXIL_CHECK: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v2i64 +// SPIR_CHECK: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v2i64 // CHECK: ret i1 %hlsl.any bool test_any_uint64_t2(uint64_t2 p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.any = call i1 @llvm.dx.any.v3i64 -// SPIR_CHECK: %hlsl.any = call i1 @llvm.spv.any.v3i64 +// DXIL_CHECK: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v3i64 +// SPIR_CHECK: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v3i64 // CHECK: ret i1 %hlsl.any bool test_any_uint64_t3(uint64_t3 p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.any = call i1 @llvm.dx.any.v4i64 -// SPIR_CHECK: %hlsl.any = call i1 @llvm.spv.any.v4i64 +// DXIL_CHECK: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v4i64 +// SPIR_CHECK: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v4i64 // CHECK: ret i1 %hlsl.any bool test_any_uint64_t4(uint64_t4 p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.any = call i1 @llvm.dx.any.i1 -// SPIR_CHECK: %hlsl.any = call i1 @llvm.spv.any.i1 +// DXIL_CHECK: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.i1 +// SPIR_CHECK: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.i1 // CHECK: ret i1 %hlsl.any bool test_any_bool(bool p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.any = call i1 @llvm.dx.any.v2i1 -// SPIR_CHECK: %hlsl.any = call i1 @llvm.spv.any.v2i1 +// DXIL_CHECK: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v2i1 +// SPIR_CHECK: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v2i1 // CHECK: ret i1 %hlsl.any bool test_any_bool2(bool2 p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.any = call i1 @llvm.dx.any.v3i1 -// SPIR_CHECK: %hlsl.any = call i1 @llvm.spv.any.v3i1 +// DXIL_CHECK: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v3i1 +// SPIR_CHECK: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v3i1 // CHECK: ret i1 %hlsl.any bool test_any_bool3(bool3 p0) { return any(p0); } // DXIL_CHECK: define noundef i1 @ // SPIR_CHECK: define spir_func noundef i1 @ -// DXIL_CHECK: %hlsl.any = call i1 @llvm.dx.any.v4i1 -// SPIR_CHECK: %hlsl.any = call i1 @llvm.spv.any.v4i1 +// DXIL_CHECK: %hlsl.any = call i1 @llvm.[[ICF:dx]].any.v4i1 +// SPIR_CHECK: %hlsl.any = call i1 @llvm.[[ICF:spv]].any.v4i1 // CHECK: ret i1 %hlsl.any bool test_any_bool4(bool4 p0) { return any(p0); } diff --git a/clang/test/CodeGenHLSL/builtins/clamp-builtin.hlsl b/clang/test/CodeGenHLSL/builtins/clamp-builtin.hlsl index e3ef26429e7e40..de9e9f24898818 100644 --- a/clang/test/CodeGenHLSL/builtins/clamp-builtin.hlsl +++ b/clang/test/CodeGenHLSL/builtins/clamp-builtin.hlsl @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm -disable-llvm-passes -o - | FileCheck %s // CHECK-LABEL: builtin_test_clamp_int4 -// CHECK: %dx.clamp = call <4 x i32> @llvm.dx.clamp.v4i32(<4 x i32> %0, <4 x i32> %1, <4 x i32> %2) +// CHECK: %dx.clamp = call <4 x i32> @llvm.[[ICF:dx]].clamp.v4i32(<4 x i32> %0, <4 x i32> %1, <4 x i32> %2) // CHECK: ret <4 x i32> %dx.clamp int4 builtin_test_clamp_int4(int4 p0, int4 p1, int4 p2) { return __builtin_hlsl_elementwise_clamp(p0, p1, p2); diff --git a/clang/test/CodeGenHLSL/builtins/clamp.hlsl b/clang/test/CodeGenHLSL/builtins/clamp.hlsl index 186114581e9c18..740b9abd05857d 100644 --- a/clang/test/CodeGenHLSL/builtins/clamp.hlsl +++ b/clang/test/CodeGenHLSL/builtins/clamp.hlsl @@ -8,127 +8,127 @@ #ifdef __HLSL_ENABLE_16_BIT // NATIVE_HALF: define noundef i16 @ -// NATIVE_HALF: call i16 @llvm.dx.clamp.i16( +// NATIVE_HALF: call i16 @llvm.[[ICF:dx]].clamp.i16( int16_t test_clamp_short(int16_t p0, int16_t p1) { return clamp(p0, p1,p1); } // NATIVE_HALF: define noundef <2 x i16> @ -// NATIVE_HALF: call <2 x i16> @llvm.dx.clamp.v2i16( +// NATIVE_HALF: call <2 x i16> @llvm.[[ICF:dx]].clamp.v2i16( int16_t2 test_clamp_short2(int16_t2 p0, int16_t2 p1) { return clamp(p0, p1,p1); } // NATIVE_HALF: define noundef <3 x i16> @ -// NATIVE_HALF: call <3 x i16> @llvm.dx.clamp.v3i16 +// NATIVE_HALF: call <3 x i16> @llvm.[[ICF:dx]].clamp.v3i16 int16_t3 test_clamp_short3(int16_t3 p0, int16_t3 p1) { return clamp(p0, p1,p1); } // NATIVE_HALF: define noundef <4 x i16> @ -// NATIVE_HALF: call <4 x i16> @llvm.dx.clamp.v4i16 +// NATIVE_HALF: call <4 x i16> @llvm.[[ICF:dx]].clamp.v4i16 int16_t4 test_clamp_short4(int16_t4 p0, int16_t4 p1) { return clamp(p0, p1,p1); } // NATIVE_HALF: define noundef i16 @ -// NATIVE_HALF: call i16 @llvm.dx.uclamp.i16( +// NATIVE_HALF: call i16 @llvm.[[ICF:dx]].uclamp.i16( uint16_t test_clamp_ushort(uint16_t p0, uint16_t p1) { return clamp(p0, p1,p1); } // NATIVE_HALF: define noundef <2 x i16> @ -// NATIVE_HALF: call <2 x i16> @llvm.dx.uclamp.v2i16 +// NATIVE_HALF: call <2 x i16> @llvm.[[ICF:dx]].uclamp.v2i16 uint16_t2 test_clamp_ushort2(uint16_t2 p0, uint16_t2 p1) { return clamp(p0, p1,p1); } // NATIVE_HALF: define noundef <3 x i16> @ -// NATIVE_HALF: call <3 x i16> @llvm.dx.uclamp.v3i16 +// NATIVE_HALF: call <3 x i16> @llvm.[[ICF:dx]].uclamp.v3i16 uint16_t3 test_clamp_ushort3(uint16_t3 p0, uint16_t3 p1) { return clamp(p0, p1,p1); } // NATIVE_HALF: define noundef <4 x i16> @ -// NATIVE_HALF: call <4 x i16> @llvm.dx.uclamp.v4i16 +// NATIVE_HALF: call <4 x i16> @llvm.[[ICF:dx]].uclamp.v4i16 uint16_t4 test_clamp_ushort4(uint16_t4 p0, uint16_t4 p1) { return clamp(p0, p1,p1); } #endif // CHECK: define noundef i32 @ -// CHECK: call i32 @llvm.dx.clamp.i32( +// CHECK: call i32 @llvm.[[ICF:dx]].clamp.i32( int test_clamp_int(int p0, int p1) { return clamp(p0, p1,p1); } // CHECK: define noundef <2 x i32> @ -// CHECK: call <2 x i32> @llvm.dx.clamp.v2i32 +// CHECK: call <2 x i32> @llvm.[[ICF:dx]].clamp.v2i32 int2 test_clamp_int2(int2 p0, int2 p1) { return clamp(p0, p1,p1); } // CHECK: define noundef <3 x i32> @ -// CHECK: call <3 x i32> @llvm.dx.clamp.v3i32 +// CHECK: call <3 x i32> @llvm.[[ICF:dx]].clamp.v3i32 int3 test_clamp_int3(int3 p0, int3 p1) { return clamp(p0, p1,p1); } // CHECK: define noundef <4 x i32> @ -// CHECK: call <4 x i32> @llvm.dx.clamp.v4i32 +// CHECK: call <4 x i32> @llvm.[[ICF:dx]].clamp.v4i32 int4 test_clamp_int4(int4 p0, int4 p1) { return clamp(p0, p1,p1); } // CHECK: define noundef i32 @ -// CHECK: call i32 @llvm.dx.uclamp.i32( +// CHECK: call i32 @llvm.[[ICF:dx]].uclamp.i32( int test_clamp_uint(uint p0, uint p1) { return clamp(p0, p1,p1); } // CHECK: define noundef <2 x i32> @ -// CHECK: call <2 x i32> @llvm.dx.uclamp.v2i32 +// CHECK: call <2 x i32> @llvm.[[ICF:dx]].uclamp.v2i32 uint2 test_clamp_uint2(uint2 p0, uint2 p1) { return clamp(p0, p1,p1); } // CHECK: define noundef <3 x i32> @ -// CHECK: call <3 x i32> @llvm.dx.uclamp.v3i32 +// CHECK: call <3 x i32> @llvm.[[ICF:dx]].uclamp.v3i32 uint3 test_clamp_uint3(uint3 p0, uint3 p1) { return clamp(p0, p1,p1); } // CHECK: define noundef <4 x i32> @ -// CHECK: call <4 x i32> @llvm.dx.uclamp.v4i32 +// CHECK: call <4 x i32> @llvm.[[ICF:dx]].uclamp.v4i32 uint4 test_clamp_uint4(uint4 p0, uint4 p1) { return clamp(p0, p1,p1); } // CHECK: define noundef i64 @ -// CHECK: call i64 @llvm.dx.clamp.i64( +// CHECK: call i64 @llvm.[[ICF:dx]].clamp.i64( int64_t test_clamp_long(int64_t p0, int64_t p1) { return clamp(p0, p1,p1); } // CHECK: define noundef <2 x i64> @ -// CHECK: call <2 x i64> @llvm.dx.clamp.v2i64 +// CHECK: call <2 x i64> @llvm.[[ICF:dx]].clamp.v2i64 int64_t2 test_clamp_long2(int64_t2 p0, int64_t2 p1) { return clamp(p0, p1,p1); } // CHECK: define noundef <3 x i64> @ -// CHECK: call <3 x i64> @llvm.dx.clamp.v3i64 +// CHECK: call <3 x i64> @llvm.[[ICF:dx]].clamp.v3i64 int64_t3 test_clamp_long3(int64_t3 p0, int64_t3 p1) { return clamp(p0, p1,p1); } // CHECK: define noundef <4 x i64> @ -// CHECK: call <4 x i64> @llvm.dx.clamp.v4i64 +// CHECK: call <4 x i64> @llvm.[[ICF:dx]].clamp.v4i64 int64_t4 test_clamp_long4(int64_t4 p0, int64_t4 p1) { return clamp(p0, p1,p1); } // CHECK: define noundef i64 @ -// CHECK: call i64 @llvm.dx.uclamp.i64( +// CHECK: call i64 @llvm.[[ICF:dx]].uclamp.i64( uint64_t test_clamp_long(uint64_t p0, uint64_t p1) { return clamp(p0, p1,p1); } // CHECK: define noundef <2 x i64> @ -// CHECK: call <2 x i64> @llvm.dx.uclamp.v2i64 +// CHECK: call <2 x i64> @llvm.[[ICF:dx]].uclamp.v2i64 uint64_t2 test_clamp_long2(uint64_t2 p0, uint64_t2 p1) { return clamp(p0, p1,p1); } // CHECK: define noundef <3 x i64> @ -// CHECK: call <3 x i64> @llvm.dx.uclamp.v3i64 +// CHECK: call <3 x i64> @llvm.[[ICF:dx]].uclamp.v3i64 uint64_t3 test_clamp_long3(uint64_t3 p0, uint64_t3 p1) { return clamp(p0, p1,p1); } // CHECK: define noundef <4 x i64> @ -// CHECK: call <4 x i64> @llvm.dx.uclamp.v4i64 +// CHECK: call <4 x i64> @llvm.[[ICF:dx]].uclamp.v4i64 uint64_t4 test_clamp_long4(uint64_t4 p0, uint64_t4 p1) { return clamp(p0, p1,p1); } // NATIVE_HALF: define noundef half @ -// NATIVE_HALF: call half @llvm.dx.clamp.f16( +// NATIVE_HALF: call half @llvm.[[ICF:dx]].clamp.f16( // NO_HALF: define noundef float @"?test_clamp_half -// NO_HALF: call float @llvm.dx.clamp.f32( +// NO_HALF: call float @llvm.[[ICF:dx]].clamp.f32( half test_clamp_half(half p0, half p1) { return clamp(p0, p1,p1); } // NATIVE_HALF: define noundef <2 x half> @ -// NATIVE_HALF: call <2 x half> @llvm.dx.clamp.v2f16 +// NATIVE_HALF: call <2 x half> @llvm.[[ICF:dx]].clamp.v2f16 // NO_HALF: define noundef <2 x float> @"?test_clamp_half2 -// NO_HALF: call <2 x float> @llvm.dx.clamp.v2f32( +// NO_HALF: call <2 x float> @llvm.[[ICF:dx]].clamp.v2f32( half2 test_clamp_half2(half2 p0, half2 p1) { return clamp(p0, p1,p1); } // NATIVE_HALF: define noundef <3 x half> @ -// NATIVE_HALF: call <3 x half> @llvm.dx.clamp.v3f16 +// NATIVE_HALF: call <3 x half> @llvm.[[ICF:dx]].clamp.v3f16 // NO_HALF: define noundef <3 x float> @"?test_clamp_half3 -// NO_HALF: call <3 x float> @llvm.dx.clamp.v3f32( +// NO_HALF: call <3 x float> @llvm.[[ICF:dx]].clamp.v3f32( half3 test_clamp_half3(half3 p0, half3 p1) { return clamp(p0, p1,p1); } // NATIVE_HALF: define noundef <4 x half> @ -// NATIVE_HALF: call <4 x half> @llvm.dx.clamp.v4f16 +// NATIVE_HALF: call <4 x half> @llvm.[[ICF:dx]].clamp.v4f16 // NO_HALF: define noundef <4 x float> @"?test_clamp_half4 -// NO_HALF: call <4 x float> @llvm.dx.clamp.v4f32( +// NO_HALF: call <4 x float> @llvm.[[ICF:dx]].clamp.v4f32( half4 test_clamp_half4(half4 p0, half4 p1) { return clamp(p0, p1,p1); } // CHECK: define noundef float @"?test_clamp_float -// CHECK: call float @llvm.dx.clamp.f32( +// CHECK: call float @llvm.[[ICF:dx]].clamp.f32( float test_clamp_float(float p0, float p1) { return clamp(p0, p1,p1); } // CHECK: define noundef <2 x float> @"?test_clamp_float2 -// CHECK: call <2 x float> @llvm.dx.clamp.v2f32 +// CHECK: call <2 x float> @llvm.[[ICF:dx]].clamp.v2f32 float2 test_clamp_float2(float2 p0, float2 p1) { return clamp(p0, p1,p1); } // CHECK: define noundef <3 x float> @"?test_clamp_float3 -// CHECK: call <3 x float> @llvm.dx.clamp.v3f32 +// CHECK: call <3 x float> @llvm.[[ICF:dx]].clamp.v3f32 float3 test_clamp_float3(float3 p0, float3 p1) { return clamp(p0, p1,p1); } // CHECK: define noundef <4 x float> @"?test_clamp_float4 -// CHECK: call <4 x float> @llvm.dx.clamp.v4f32 +// CHECK: call <4 x float> @llvm.[[ICF:dx]].clamp.v4f32 float4 test_clamp_float4(float4 p0, float4 p1) { return clamp(p0, p1,p1); } // CHECK: define noundef double @ -// CHECK: call double @llvm.dx.clamp.f64( +// CHECK: call double @llvm.[[ICF:dx]].clamp.f64( double test_clamp_double(double p0, double p1) { return clamp(p0, p1,p1); } // CHECK: define noundef <2 x double> @ -// CHECK: call <2 x double> @llvm.dx.clamp.v2f64 +// CHECK: call <2 x double> @llvm.[[ICF:dx]].clamp.v2f64 double2 test_clamp_double2(double2 p0, double2 p1) { return clamp(p0, p1,p1); } // CHECK: define noundef <3 x double> @ -// CHECK: call <3 x double> @llvm.dx.clamp.v3f64 +// CHECK: call <3 x double> @llvm.[[ICF:dx]].clamp.v3f64 double3 test_clamp_double3(double3 p0, double3 p1) { return clamp(p0, p1,p1); } // CHECK: define noundef <4 x double> @ -// CHECK: call <4 x double> @llvm.dx.clamp.v4f64 +// CHECK: call <4 x double> @llvm.[[ICF:dx]].clamp.v4f64 double4 test_clamp_double4(double4 p0, double4 p1) { return clamp(p0, p1,p1); } diff --git a/clang/test/CodeGenHLSL/builtins/create_handle.hlsl b/clang/test/CodeGenHLSL/builtins/create_handle.hlsl index 61226c2b54e726..628aa030286586 100644 --- a/clang/test/CodeGenHLSL/builtins/create_handle.hlsl +++ b/clang/test/CodeGenHLSL/builtins/create_handle.hlsl @@ -4,4 +4,4 @@ void fn() { (void)__builtin_hlsl_create_handle(0); } -// CHECK: call ptr @llvm.dx.create.handle(i8 0) +// CHECK: call ptr @llvm.[[ICF:dx]].create.handle(i8 0) diff --git a/clang/test/CodeGenHLSL/builtins/frac.hlsl b/clang/test/CodeGenHLSL/builtins/frac.hlsl index b457f5c2787918..1908fab6e782aa 100644 --- a/clang/test/CodeGenHLSL/builtins/frac.hlsl +++ b/clang/test/CodeGenHLSL/builtins/frac.hlsl @@ -15,70 +15,70 @@ // DXIL_NATIVE_HALF: define noundef half @ // SPIR_NATIVE_HALF: define spir_func noundef half @ -// DXIL_NATIVE_HALF: %hlsl.frac = call half @llvm.dx.frac.f16( -// SPIR_NATIVE_HALF: %hlsl.frac = call half @llvm.spv.frac.f16( +// DXIL_NATIVE_HALF: %hlsl.frac = call half @llvm.[[ICF:dx]].frac.f16( +// SPIR_NATIVE_HALF: %hlsl.frac = call half @llvm.[[ICF:spv]].frac.f16( // NATIVE_HALF: ret half %hlsl.frac // DXIL_NO_HALF: define noundef float @ // SPIR_NO_HALF: define spir_func noundef float @ -// DXIL_NO_HALF: %hlsl.frac = call float @llvm.dx.frac.f32( -// SPIR_NO_HALF: %hlsl.frac = call float @llvm.spv.frac.f32( +// DXIL_NO_HALF: %hlsl.frac = call float @llvm.[[ICF:dx]].frac.f32( +// SPIR_NO_HALF: %hlsl.frac = call float @llvm.[[ICF:spv]].frac.f32( // NO_HALF: ret float %hlsl.frac half test_frac_half(half p0) { return frac(p0); } // DXIL_NATIVE_HALF: define noundef <2 x half> @ // SPIR_NATIVE_HALF: define spir_func noundef <2 x half> @ -// DXIL_NATIVE_HALF: %hlsl.frac = call <2 x half> @llvm.dx.frac.v2f16 -// SPIR_NATIVE_HALF: %hlsl.frac = call <2 x half> @llvm.spv.frac.v2f16 +// DXIL_NATIVE_HALF: %hlsl.frac = call <2 x half> @llvm.[[ICF:dx]].frac.v2f16 +// SPIR_NATIVE_HALF: %hlsl.frac = call <2 x half> @llvm.[[ICF:spv]].frac.v2f16 // NATIVE_HALF: ret <2 x half> %hlsl.frac // DXIL_NO_HALF: define noundef <2 x float> @ // SPIR_NO_HALF: define spir_func noundef <2 x float> @ -// DXIL_NO_HALF: %hlsl.frac = call <2 x float> @llvm.dx.frac.v2f32( -// SPIR_NO_HALF: %hlsl.frac = call <2 x float> @llvm.spv.frac.v2f32( +// DXIL_NO_HALF: %hlsl.frac = call <2 x float> @llvm.[[ICF:dx]].frac.v2f32( +// SPIR_NO_HALF: %hlsl.frac = call <2 x float> @llvm.[[ICF:spv]].frac.v2f32( // NO_HALF: ret <2 x float> %hlsl.frac half2 test_frac_half2(half2 p0) { return frac(p0); } // DXIL_NATIVE_HALF: define noundef <3 x half> @ // SPIR_NATIVE_HALF: define spir_func noundef <3 x half> @ -// DXIL_NATIVE_HALF: %hlsl.frac = call <3 x half> @llvm.dx.frac.v3f16 -// SPIR_NATIVE_HALF: %hlsl.frac = call <3 x half> @llvm.spv.frac.v3f16 +// DXIL_NATIVE_HALF: %hlsl.frac = call <3 x half> @llvm.[[ICF:dx]].frac.v3f16 +// SPIR_NATIVE_HALF: %hlsl.frac = call <3 x half> @llvm.[[ICF:spv]].frac.v3f16 // NATIVE_HALF: ret <3 x half> %hlsl.frac // DXIL_NO_HALF: define noundef <3 x float> @ // SPIR_NO_HALF: define spir_func noundef <3 x float> @ -// DXIL_NO_HALF: %hlsl.frac = call <3 x float> @llvm.dx.frac.v3f32( -// SPIR_NO_HALF: %hlsl.frac = call <3 x float> @llvm.spv.frac.v3f32( +// DXIL_NO_HALF: %hlsl.frac = call <3 x float> @llvm.[[ICF:dx]].frac.v3f32( +// SPIR_NO_HALF: %hlsl.frac = call <3 x float> @llvm.[[ICF:spv]].frac.v3f32( // NO_HALF: ret <3 x float> %hlsl.frac half3 test_frac_half3(half3 p0) { return frac(p0); } // DXIL_NATIVE_HALF: define noundef <4 x half> @ // SPIR_NATIVE_HALF: define spir_func noundef <4 x half> @ -// DXIL_NATIVE_HALF: %hlsl.frac = call <4 x half> @llvm.dx.frac.v4f16 -// SPIR_NATIVE_HALF: %hlsl.frac = call <4 x half> @llvm.spv.frac.v4f16 +// DXIL_NATIVE_HALF: %hlsl.frac = call <4 x half> @llvm.[[ICF:dx]].frac.v4f16 +// SPIR_NATIVE_HALF: %hlsl.frac = call <4 x half> @llvm.[[ICF:spv]].frac.v4f16 // NATIVE_HALF: ret <4 x half> %hlsl.frac // DXIL_NO_HALF: define noundef <4 x float> @ // SPIR_NO_HALF: define spir_func noundef <4 x float> @ -// DXIL_NO_HALF: %hlsl.frac = call <4 x float> @llvm.dx.frac.v4f32( -// SPIR_NO_HALF: %hlsl.frac = call <4 x float> @llvm.spv.frac.v4f32( +// DXIL_NO_HALF: %hlsl.frac = call <4 x float> @llvm.[[ICF:dx]].frac.v4f32( +// SPIR_NO_HALF: %hlsl.frac = call <4 x float> @llvm.[[ICF:spv]].frac.v4f32( // NO_HALF: ret <4 x float> %hlsl.frac half4 test_frac_half4(half4 p0) { return frac(p0); } // DXIL_CHECK: define noundef float @ // SPIR_CHECK: define spir_func noundef float @ -// DXIL_CHECK: %hlsl.frac = call float @llvm.dx.frac.f32( -// SPIR_CHECK: %hlsl.frac = call float @llvm.spv.frac.f32( +// DXIL_CHECK: %hlsl.frac = call float @llvm.[[ICF:dx]].frac.f32( +// SPIR_CHECK: %hlsl.frac = call float @llvm.[[ICF:spv]].frac.f32( // CHECK: ret float %hlsl.frac float test_frac_float(float p0) { return frac(p0); } // DXIL_CHECK: define noundef <2 x float> @ // SPIR_CHECK: define spir_func noundef <2 x float> @ -// DXIL_CHECK: %hlsl.frac = call <2 x float> @llvm.dx.frac.v2f32 -// SPIR_CHECK: %hlsl.frac = call <2 x float> @llvm.spv.frac.v2f32 +// DXIL_CHECK: %hlsl.frac = call <2 x float> @llvm.[[ICF:dx]].frac.v2f32 +// SPIR_CHECK: %hlsl.frac = call <2 x float> @llvm.[[ICF:spv]].frac.v2f32 // CHECK: ret <2 x float> %hlsl.frac float2 test_frac_float2(float2 p0) { return frac(p0); } // DXIL_CHECK: define noundef <3 x float> @ // SPIR_CHECK: define spir_func noundef <3 x float> @ -// DXIL_CHECK: %hlsl.frac = call <3 x float> @llvm.dx.frac.v3f32 -// SPIR_CHECK: %hlsl.frac = call <3 x float> @llvm.spv.frac.v3f32 +// DXIL_CHECK: %hlsl.frac = call <3 x float> @llvm.[[ICF:dx]].frac.v3f32 +// SPIR_CHECK: %hlsl.frac = call <3 x float> @llvm.[[ICF:spv]].frac.v3f32 // CHECK: ret <3 x float> %hlsl.frac float3 test_frac_float3(float3 p0) { return frac(p0); } // DXIL_CHECK: define noundef <4 x float> @ // SPIR_CHECK: define spir_func noundef <4 x float> @ -// DXIL_CHECK: %hlsl.frac = call <4 x float> @llvm.dx.frac.v4f32 -// SPIR_CHECK: %hlsl.frac = call <4 x float> @llvm.spv.frac.v4f32 +// DXIL_CHECK: %hlsl.frac = call <4 x float> @llvm.[[ICF:dx]].frac.v4f32 +// SPIR_CHECK: %hlsl.frac = call <4 x float> @llvm.[[ICF:spv]].frac.v4f32 // CHECK: ret <4 x float> %hlsl.frac float4 test_frac_float4(float4 p0) { return frac(p0); } diff --git a/clang/test/CodeGenHLSL/builtins/isinf.hlsl b/clang/test/CodeGenHLSL/builtins/isinf.hlsl index df44fc4a91dfd0..1f22b760864781 100644 --- a/clang/test/CodeGenHLSL/builtins/isinf.hlsl +++ b/clang/test/CodeGenHLSL/builtins/isinf.hlsl @@ -7,39 +7,39 @@ // RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF // CHECK: define noundef i1 @ -// NATIVE_HALF: %dx.isinf = call i1 @llvm.dx.isinf.f16( -// NO_HALF: %dx.isinf = call i1 @llvm.dx.isinf.f32( +// NATIVE_HALF: %dx.isinf = call i1 @llvm.[[ICF:dx]].isinf.f16( +// NO_HALF: %dx.isinf = call i1 @llvm.[[ICF:dx]].isinf.f32( // CHECK: ret i1 %dx.isinf bool test_isinf_half(half p0) { return isinf(p0); } // CHECK: define noundef <2 x i1> @ -// NATIVE_HALF: %dx.isinf = call <2 x i1> @llvm.dx.isinf.v2f16 -// NO_HALF: %dx.isinf = call <2 x i1> @llvm.dx.isinf.v2f32( +// NATIVE_HALF: %dx.isinf = call <2 x i1> @llvm.[[ICF:dx]].isinf.v2f16 +// NO_HALF: %dx.isinf = call <2 x i1> @llvm.[[ICF:dx]].isinf.v2f32( // CHECK: ret <2 x i1> %dx.isinf bool2 test_isinf_half2(half2 p0) { return isinf(p0); } // NATIVE_HALF: define noundef <3 x i1> @ -// NATIVE_HALF: %dx.isinf = call <3 x i1> @llvm.dx.isinf.v3f16 -// NO_HALF: %dx.isinf = call <3 x i1> @llvm.dx.isinf.v3f32( +// NATIVE_HALF: %dx.isinf = call <3 x i1> @llvm.[[ICF:dx]].isinf.v3f16 +// NO_HALF: %dx.isinf = call <3 x i1> @llvm.[[ICF:dx]].isinf.v3f32( // CHECK: ret <3 x i1> %dx.isinf bool3 test_isinf_half3(half3 p0) { return isinf(p0); } // NATIVE_HALF: define noundef <4 x i1> @ -// NATIVE_HALF: %dx.isinf = call <4 x i1> @llvm.dx.isinf.v4f16 -// NO_HALF: %dx.isinf = call <4 x i1> @llvm.dx.isinf.v4f32( +// NATIVE_HALF: %dx.isinf = call <4 x i1> @llvm.[[ICF:dx]].isinf.v4f16 +// NO_HALF: %dx.isinf = call <4 x i1> @llvm.[[ICF:dx]].isinf.v4f32( // CHECK: ret <4 x i1> %dx.isinf bool4 test_isinf_half4(half4 p0) { return isinf(p0); } // CHECK: define noundef i1 @ -// CHECK: %dx.isinf = call i1 @llvm.dx.isinf.f32( +// CHECK: %dx.isinf = call i1 @llvm.[[ICF:dx]].isinf.f32( // CHECK: ret i1 %dx.isinf bool test_isinf_float(float p0) { return isinf(p0); } // CHECK: define noundef <2 x i1> @ -// CHECK: %dx.isinf = call <2 x i1> @llvm.dx.isinf.v2f32 +// CHECK: %dx.isinf = call <2 x i1> @llvm.[[ICF:dx]].isinf.v2f32 // CHECK: ret <2 x i1> %dx.isinf bool2 test_isinf_float2(float2 p0) { return isinf(p0); } // CHECK: define noundef <3 x i1> @ -// CHECK: %dx.isinf = call <3 x i1> @llvm.dx.isinf.v3f32 +// CHECK: %dx.isinf = call <3 x i1> @llvm.[[ICF:dx]].isinf.v3f32 // CHECK: ret <3 x i1> %dx.isinf bool3 test_isinf_float3(float3 p0) { return isinf(p0); } // CHECK: define noundef <4 x i1> @ -// CHECK: %dx.isinf = call <4 x i1> @llvm.dx.isinf.v4f32 +// CHECK: %dx.isinf = call <4 x i1> @llvm.[[ICF:dx]].isinf.v4f32 // CHECK: ret <4 x i1> %dx.isinf bool4 test_isinf_float4(float4 p0) { return isinf(p0); } diff --git a/clang/test/CodeGenHLSL/builtins/length.hlsl b/clang/test/CodeGenHLSL/builtins/length.hlsl index 1c23b0df04df98..72d43bc78c7b40 100644 --- a/clang/test/CodeGenHLSL/builtins/length.hlsl +++ b/clang/test/CodeGenHLSL/builtins/length.hlsl @@ -16,8 +16,8 @@ half test_length_half(half p0) return length(p0); } // NATIVE_HALF: define noundef half @ -// NATIVE_HALF: %hlsl.length = call half @llvm.dx.length.v2f16 -// NO_HALF: %hlsl.length = call float @llvm.dx.length.v2f32( +// NATIVE_HALF: %hlsl.length = call half @llvm.[[ICF:dx]].length.v2f16 +// NO_HALF: %hlsl.length = call float @llvm.[[ICF:dx]].length.v2f32( // NATIVE_HALF: ret half %hlsl.length // NO_HALF: ret float %hlsl.length half test_length_half2(half2 p0) @@ -25,8 +25,8 @@ half test_length_half2(half2 p0) return length(p0); } // NATIVE_HALF: define noundef half @ -// NATIVE_HALF: %hlsl.length = call half @llvm.dx.length.v3f16 -// NO_HALF: %hlsl.length = call float @llvm.dx.length.v3f32( +// NATIVE_HALF: %hlsl.length = call half @llvm.[[ICF:dx]].length.v3f16 +// NO_HALF: %hlsl.length = call float @llvm.[[ICF:dx]].length.v3f32( // NATIVE_HALF: ret half %hlsl.length // NO_HALF: ret float %hlsl.length half test_length_half3(half3 p0) @@ -34,8 +34,8 @@ half test_length_half3(half3 p0) return length(p0); } // NATIVE_HALF: define noundef half @ -// NATIVE_HALF: %hlsl.length = call half @llvm.dx.length.v4f16 -// NO_HALF: %hlsl.length = call float @llvm.dx.length.v4f32( +// NATIVE_HALF: %hlsl.length = call half @llvm.[[ICF:dx]].length.v4f16 +// NO_HALF: %hlsl.length = call float @llvm.[[ICF:dx]].length.v4f32( // NATIVE_HALF: ret half %hlsl.length // NO_HALF: ret float %hlsl.length half test_length_half4(half4 p0) @@ -51,21 +51,21 @@ float test_length_float(float p0) return length(p0); } // CHECK: define noundef float @ -// CHECK: %hlsl.length = call float @llvm.dx.length.v2f32( +// CHECK: %hlsl.length = call float @llvm.[[ICF:dx]].length.v2f32( // CHECK: ret float %hlsl.length float test_length_float2(float2 p0) { return length(p0); } // CHECK: define noundef float @ -// CHECK: %hlsl.length = call float @llvm.dx.length.v3f32( +// CHECK: %hlsl.length = call float @llvm.[[ICF:dx]].length.v3f32( // CHECK: ret float %hlsl.length float test_length_float3(float3 p0) { return length(p0); } // CHECK: define noundef float @ -// CHECK: %hlsl.length = call float @llvm.dx.length.v4f32( +// CHECK: %hlsl.length = call float @llvm.[[ICF:dx]].length.v4f32( // CHECK: ret float %hlsl.length float test_length_float4(float4 p0) { diff --git a/clang/test/CodeGenHLSL/builtins/lerp-builtin.hlsl b/clang/test/CodeGenHLSL/builtins/lerp-builtin.hlsl index f9b3cbcddfb695..a682378fd2f9c6 100644 --- a/clang/test/CodeGenHLSL/builtins/lerp-builtin.hlsl +++ b/clang/test/CodeGenHLSL/builtins/lerp-builtin.hlsl @@ -1,14 +1,14 @@ // RUN: %clang_cc1 -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm -disable-llvm-passes -o - | FileCheck %s // CHECK-LABEL: builtin_lerp_half_vector -// CHECK: %hlsl.lerp = call <3 x half> @llvm.dx.lerp.v3f16(<3 x half> %0, <3 x half> %1, <3 x half> %2) +// CHECK: %hlsl.lerp = call <3 x half> @llvm.[[ICF:dx]].lerp.v3f16(<3 x half> %0, <3 x half> %1, <3 x half> %2) // CHECK: ret <3 x half> %hlsl.lerp half3 builtin_lerp_half_vector (half3 p0) { return __builtin_hlsl_lerp ( p0, p0, p0 ); } // CHECK-LABEL: builtin_lerp_floar_vector -// CHECK: %hlsl.lerp = call <2 x float> @llvm.dx.lerp.v2f32(<2 x float> %0, <2 x float> %1, <2 x float> %2) +// CHECK: %hlsl.lerp = call <2 x float> @llvm.[[ICF:dx]].lerp.v2f32(<2 x float> %0, <2 x float> %1, <2 x float> %2) // CHECK: ret <2 x float> %hlsl.lerp float2 builtin_lerp_floar_vector ( float2 p0) { return __builtin_hlsl_lerp ( p0, p0, p0 ); diff --git a/clang/test/CodeGenHLSL/builtins/lerp.hlsl b/clang/test/CodeGenHLSL/builtins/lerp.hlsl index 53ac24dd456930..3988bc8ef673a5 100644 --- a/clang/test/CodeGenHLSL/builtins/lerp.hlsl +++ b/clang/test/CodeGenHLSL/builtins/lerp.hlsl @@ -14,75 +14,75 @@ // RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF,SPIR_NO_HALF,SPIR_CHECK -// DXIL_NATIVE_HALF: %hlsl.lerp = call half @llvm.dx.lerp.f16(half %{{.*}}, half %{{.*}}, half %{{.*}}) -// SPIR_NATIVE_HALF: %hlsl.lerp = call half @llvm.spv.lerp.f16(half %{{.*}}, half %{{.*}}, half %{{.*}}) +// DXIL_NATIVE_HALF: %hlsl.lerp = call half @llvm.[[ICF:dx]].lerp.f16(half %{{.*}}, half %{{.*}}, half %{{.*}}) +// SPIR_NATIVE_HALF: %hlsl.lerp = call half @llvm.[[ICF:spv]].lerp.f16(half %{{.*}}, half %{{.*}}, half %{{.*}}) // NATIVE_HALF: ret half %hlsl.lerp -// DXIL_NO_HALF: %hlsl.lerp = call float @llvm.dx.lerp.f32(float %{{.*}}, float %{{.*}}, float %{{.*}}) -// SPIR_NO_HALF: %hlsl.lerp = call float @llvm.spv.lerp.f32(float %{{.*}}, float %{{.*}}, float %{{.*}}) +// DXIL_NO_HALF: %hlsl.lerp = call float @llvm.[[ICF:dx]].lerp.f32(float %{{.*}}, float %{{.*}}, float %{{.*}}) +// SPIR_NO_HALF: %hlsl.lerp = call float @llvm.[[ICF:spv]].lerp.f32(float %{{.*}}, float %{{.*}}, float %{{.*}}) // NO_HALF: ret float %hlsl.lerp half test_lerp_half(half p0) { return lerp(p0, p0, p0); } -// DXIL_NATIVE_HALF: %hlsl.lerp = call <2 x half> @llvm.dx.lerp.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}, <2 x half> %{{.*}}) -// SPIR_NATIVE_HALF: %hlsl.lerp = call <2 x half> @llvm.spv.lerp.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}, <2 x half> %{{.*}}) +// DXIL_NATIVE_HALF: %hlsl.lerp = call <2 x half> @llvm.[[ICF:dx]].lerp.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}, <2 x half> %{{.*}}) +// SPIR_NATIVE_HALF: %hlsl.lerp = call <2 x half> @llvm.[[ICF:spv]].lerp.v2f16(<2 x half> %{{.*}}, <2 x half> %{{.*}}, <2 x half> %{{.*}}) // NATIVE_HALF: ret <2 x half> %hlsl.lerp -// DXIL_NO_HALF: %hlsl.lerp = call <2 x float> @llvm.dx.lerp.v2f32(<2 x float> %{{.*}}, <2 x float> %{{.*}}, <2 x float> %{{.*}}) -// SPIR_NO_HALF: %hlsl.lerp = call <2 x float> @llvm.spv.lerp.v2f32(<2 x float> %{{.*}}, <2 x float> %{{.*}}, <2 x float> %{{.*}}) +// DXIL_NO_HALF: %hlsl.lerp = call <2 x float> @llvm.[[ICF:dx]].lerp.v2f32(<2 x float> %{{.*}}, <2 x float> %{{.*}}, <2 x float> %{{.*}}) +// SPIR_NO_HALF: %hlsl.lerp = call <2 x float> @llvm.[[ICF:spv]].lerp.v2f32(<2 x float> %{{.*}}, <2 x float> %{{.*}}, <2 x float> %{{.*}}) // NO_HALF: ret <2 x float> %hlsl.lerp half2 test_lerp_half2(half2 p0) { return lerp(p0, p0, p0); } -// DXIL_NATIVE_HALF: %hlsl.lerp = call <3 x half> @llvm.dx.lerp.v3f16(<3 x half> %{{.*}}, <3 x half> %{{.*}}, <3 x half> %{{.*}}) -// SPIR_NATIVE_HALF: %hlsl.lerp = call <3 x half> @llvm.spv.lerp.v3f16(<3 x half> %{{.*}}, <3 x half> %{{.*}}, <3 x half> %{{.*}}) +// DXIL_NATIVE_HALF: %hlsl.lerp = call <3 x half> @llvm.[[ICF:dx]].lerp.v3f16(<3 x half> %{{.*}}, <3 x half> %{{.*}}, <3 x half> %{{.*}}) +// SPIR_NATIVE_HALF: %hlsl.lerp = call <3 x half> @llvm.[[ICF:spv]].lerp.v3f16(<3 x half> %{{.*}}, <3 x half> %{{.*}}, <3 x half> %{{.*}}) // NATIVE_HALF: ret <3 x half> %hlsl.lerp -// DXIL_NO_HALF: %hlsl.lerp = call <3 x float> @llvm.dx.lerp.v3f32(<3 x float> %{{.*}}, <3 x float> %{{.*}}, <3 x float> %{{.*}}) -// SPIR_NO_HALF: %hlsl.lerp = call <3 x float> @llvm.spv.lerp.v3f32(<3 x float> %{{.*}}, <3 x float> %{{.*}}, <3 x float> %{{.*}}) +// DXIL_NO_HALF: %hlsl.lerp = call <3 x float> @llvm.[[ICF:dx]].lerp.v3f32(<3 x float> %{{.*}}, <3 x float> %{{.*}}, <3 x float> %{{.*}}) +// SPIR_NO_HALF: %hlsl.lerp = call <3 x float> @llvm.[[ICF:spv]].lerp.v3f32(<3 x float> %{{.*}}, <3 x float> %{{.*}}, <3 x float> %{{.*}}) // NO_HALF: ret <3 x float> %hlsl.lerp half3 test_lerp_half3(half3 p0) { return lerp(p0, p0, p0); } -// DXIL_NATIVE_HALF: %hlsl.lerp = call <4 x half> @llvm.dx.lerp.v4f16(<4 x half> %{{.*}}, <4 x half> %{{.*}}, <4 x half> %{{.*}}) -// SPIR_NATIVE_HALF: %hlsl.lerp = call <4 x half> @llvm.spv.lerp.v4f16(<4 x half> %{{.*}}, <4 x half> %{{.*}}, <4 x half> %{{.*}}) +// DXIL_NATIVE_HALF: %hlsl.lerp = call <4 x half> @llvm.[[ICF:dx]].lerp.v4f16(<4 x half> %{{.*}}, <4 x half> %{{.*}}, <4 x half> %{{.*}}) +// SPIR_NATIVE_HALF: %hlsl.lerp = call <4 x half> @llvm.[[ICF:spv]].lerp.v4f16(<4 x half> %{{.*}}, <4 x half> %{{.*}}, <4 x half> %{{.*}}) // NATIVE_HALF: ret <4 x half> %hlsl.lerp -// DXIL_NO_HALF: %hlsl.lerp = call <4 x float> @llvm.dx.lerp.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, <4 x float> %{{.*}}) -// SPIR_NO_HALF: %hlsl.lerp = call <4 x float> @llvm.spv.lerp.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, <4 x float> %{{.*}}) +// DXIL_NO_HALF: %hlsl.lerp = call <4 x float> @llvm.[[ICF:dx]].lerp.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, <4 x float> %{{.*}}) +// SPIR_NO_HALF: %hlsl.lerp = call <4 x float> @llvm.[[ICF:spv]].lerp.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, <4 x float> %{{.*}}) // NO_HALF: ret <4 x float> %hlsl.lerp half4 test_lerp_half4(half4 p0) { return lerp(p0, p0, p0); } -// DXIL_CHECK: %hlsl.lerp = call float @llvm.dx.lerp.f32(float %{{.*}}, float %{{.*}}, float %{{.*}}) -// SPIR_CHECK: %hlsl.lerp = call float @llvm.spv.lerp.f32(float %{{.*}}, float %{{.*}}, float %{{.*}}) +// DXIL_CHECK: %hlsl.lerp = call float @llvm.[[ICF:dx]].lerp.f32(float %{{.*}}, float %{{.*}}, float %{{.*}}) +// SPIR_CHECK: %hlsl.lerp = call float @llvm.[[ICF:spv]].lerp.f32(float %{{.*}}, float %{{.*}}, float %{{.*}}) // CHECK: ret float %hlsl.lerp float test_lerp_float(float p0) { return lerp(p0, p0, p0); } -// DXIL_CHECK: %hlsl.lerp = call <2 x float> @llvm.dx.lerp.v2f32(<2 x float> %{{.*}}, <2 x float> %{{.*}}, <2 x float> %{{.*}}) -// SPIR_CHECK: %hlsl.lerp = call <2 x float> @llvm.spv.lerp.v2f32(<2 x float> %{{.*}}, <2 x float> %{{.*}}, <2 x float> %{{.*}}) +// DXIL_CHECK: %hlsl.lerp = call <2 x float> @llvm.[[ICF:dx]].lerp.v2f32(<2 x float> %{{.*}}, <2 x float> %{{.*}}, <2 x float> %{{.*}}) +// SPIR_CHECK: %hlsl.lerp = call <2 x float> @llvm.[[ICF:spv]].lerp.v2f32(<2 x float> %{{.*}}, <2 x float> %{{.*}}, <2 x float> %{{.*}}) // CHECK: ret <2 x float> %hlsl.lerp float2 test_lerp_float2(float2 p0) { return lerp(p0, p0, p0); } -// DXIL_CHECK: %hlsl.lerp = call <3 x float> @llvm.dx.lerp.v3f32(<3 x float> %{{.*}}, <3 x float> %{{.*}}, <3 x float> %{{.*}}) -// SPIR_CHECK: %hlsl.lerp = call <3 x float> @llvm.spv.lerp.v3f32(<3 x float> %{{.*}}, <3 x float> %{{.*}}, <3 x float> %{{.*}}) +// DXIL_CHECK: %hlsl.lerp = call <3 x float> @llvm.[[ICF:dx]].lerp.v3f32(<3 x float> %{{.*}}, <3 x float> %{{.*}}, <3 x float> %{{.*}}) +// SPIR_CHECK: %hlsl.lerp = call <3 x float> @llvm.[[ICF:spv]].lerp.v3f32(<3 x float> %{{.*}}, <3 x float> %{{.*}}, <3 x float> %{{.*}}) // CHECK: ret <3 x float> %hlsl.lerp float3 test_lerp_float3(float3 p0) { return lerp(p0, p0, p0); } -// DXIL_CHECK: %hlsl.lerp = call <4 x float> @llvm.dx.lerp.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, <4 x float> %{{.*}}) -// SPIR_CHECK: %hlsl.lerp = call <4 x float> @llvm.spv.lerp.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, <4 x float> %{{.*}}) +// DXIL_CHECK: %hlsl.lerp = call <4 x float> @llvm.[[ICF:dx]].lerp.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, <4 x float> %{{.*}}) +// SPIR_CHECK: %hlsl.lerp = call <4 x float> @llvm.[[ICF:spv]].lerp.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, <4 x float> %{{.*}}) // CHECK: ret <4 x float> %hlsl.lerp float4 test_lerp_float4(float4 p0) { return lerp(p0, p0, p0); } // CHECK: %[[b:.*]] = load <2 x float>, ptr %p1.addr, align 8 // CHECK: %[[c:.*]] = load <2 x float>, ptr %p1.addr, align 8 -// DXIL_CHECK: %hlsl.lerp = call <2 x float> @llvm.dx.lerp.v2f32(<2 x float> %splat.splat, <2 x float> %[[b]], <2 x float> %[[c]]) -// SPIR_CHECK: %hlsl.lerp = call <2 x float> @llvm.spv.lerp.v2f32(<2 x float> %splat.splat, <2 x float> %[[b]], <2 x float> %[[c]]) +// DXIL_CHECK: %hlsl.lerp = call <2 x float> @llvm.[[ICF:dx]].lerp.v2f32(<2 x float> %splat.splat, <2 x float> %[[b]], <2 x float> %[[c]]) +// SPIR_CHECK: %hlsl.lerp = call <2 x float> @llvm.[[ICF:spv]].lerp.v2f32(<2 x float> %splat.splat, <2 x float> %[[b]], <2 x float> %[[c]]) // CHECK: ret <2 x float> %hlsl.lerp float2 test_lerp_float2_splat(float p0, float2 p1) { return lerp(p0, p1, p1); } // CHECK: %[[b:.*]] = load <3 x float>, ptr %p1.addr, align 16 // CHECK: %[[c:.*]] = load <3 x float>, ptr %p1.addr, align 16 -// DXIL_CHECK: %hlsl.lerp = call <3 x float> @llvm.dx.lerp.v3f32(<3 x float> %splat.splat, <3 x float> %[[b]], <3 x float> %[[c]]) -// SPIR_CHECK: %hlsl.lerp = call <3 x float> @llvm.spv.lerp.v3f32(<3 x float> %splat.splat, <3 x float> %[[b]], <3 x float> %[[c]]) +// DXIL_CHECK: %hlsl.lerp = call <3 x float> @llvm.[[ICF:dx]].lerp.v3f32(<3 x float> %splat.splat, <3 x float> %[[b]], <3 x float> %[[c]]) +// SPIR_CHECK: %hlsl.lerp = call <3 x float> @llvm.[[ICF:spv]].lerp.v3f32(<3 x float> %splat.splat, <3 x float> %[[b]], <3 x float> %[[c]]) // CHECK: ret <3 x float> %hlsl.lerp float3 test_lerp_float3_splat(float p0, float3 p1) { return lerp(p0, p1, p1); } // CHECK: %[[b:.*]] = load <4 x float>, ptr %p1.addr, align 16 // CHECK: %[[c:.*]] = load <4 x float>, ptr %p1.addr, align 16 -// DXIL_CHECK: %hlsl.lerp = call <4 x float> @llvm.dx.lerp.v4f32(<4 x float> %splat.splat, <4 x float> %[[b]], <4 x float> %[[c]]) -// SPIR_CHECK: %hlsl.lerp = call <4 x float> @llvm.spv.lerp.v4f32(<4 x float> %splat.splat, <4 x float> %[[b]], <4 x float> %[[c]]) +// DXIL_CHECK: %hlsl.lerp = call <4 x float> @llvm.[[ICF:dx]].lerp.v4f32(<4 x float> %splat.splat, <4 x float> %[[b]], <4 x float> %[[c]]) +// SPIR_CHECK: %hlsl.lerp = call <4 x float> @llvm.[[ICF:spv]].lerp.v4f32(<4 x float> %splat.splat, <4 x float> %[[b]], <4 x float> %[[c]]) // CHECK: ret <4 x float> %hlsl.lerp float4 test_lerp_float4_splat(float p0, float4 p1) { return lerp(p0, p1, p1); } diff --git a/clang/test/CodeGenHLSL/builtins/mad.hlsl b/clang/test/CodeGenHLSL/builtins/mad.hlsl index 449a793caf93b7..d5766677899747 100644 --- a/clang/test/CodeGenHLSL/builtins/mad.hlsl +++ b/clang/test/CodeGenHLSL/builtins/mad.hlsl @@ -15,49 +15,49 @@ // RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF,SPIR_CHECK #ifdef __HLSL_ENABLE_16_BIT -// DXIL_NATIVE_HALF: %dx.umad = call i16 @llvm.dx.umad.i16(i16 %0, i16 %1, i16 %2) +// DXIL_NATIVE_HALF: %dx.umad = call i16 @llvm.[[ICF:dx]].umad.i16(i16 %0, i16 %1, i16 %2) // DXIL_NATIVE_HALF: ret i16 %dx.umad // SPIR_NATIVE_HALF: mul nuw i16 %{{.*}}, %{{.*}} // SPIR_NATIVE_HALF: add nuw i16 %{{.*}}, %{{.*}} uint16_t test_mad_uint16_t(uint16_t p0, uint16_t p1, uint16_t p2) { return mad(p0, p1, p2); } -// DXIL_NATIVE_HALF: %dx.umad = call <2 x i16> @llvm.dx.umad.v2i16(<2 x i16> %0, <2 x i16> %1, <2 x i16> %2) +// DXIL_NATIVE_HALF: %dx.umad = call <2 x i16> @llvm.[[ICF:dx]].umad.v2i16(<2 x i16> %0, <2 x i16> %1, <2 x i16> %2) // DXIL_NATIVE_HALF: ret <2 x i16> %dx.umad // SPIR_NATIVE_HALF: mul nuw <2 x i16> %{{.*}}, %{{.*}} // SPIR_NATIVE_HALF: add nuw <2 x i16> %{{.*}}, %{{.*}} uint16_t2 test_mad_uint16_t2(uint16_t2 p0, uint16_t2 p1, uint16_t2 p2) { return mad(p0, p1, p2); } -// DXIL_NATIVE_HALF: %dx.umad = call <3 x i16> @llvm.dx.umad.v3i16(<3 x i16> %0, <3 x i16> %1, <3 x i16> %2) +// DXIL_NATIVE_HALF: %dx.umad = call <3 x i16> @llvm.[[ICF:dx]].umad.v3i16(<3 x i16> %0, <3 x i16> %1, <3 x i16> %2) // DXIL_NATIVE_HALF: ret <3 x i16> %dx.umad // SPIR_NATIVE_HALF: mul nuw <3 x i16> %{{.*}}, %{{.*}} // SPIR_NATIVE_HALF: add nuw <3 x i16> %{{.*}}, %{{.*}} uint16_t3 test_mad_uint16_t3(uint16_t3 p0, uint16_t3 p1, uint16_t3 p2) { return mad(p0, p1, p2); } -// DXIL_NATIVE_HALF: %dx.umad = call <4 x i16> @llvm.dx.umad.v4i16(<4 x i16> %0, <4 x i16> %1, <4 x i16> %2) +// DXIL_NATIVE_HALF: %dx.umad = call <4 x i16> @llvm.[[ICF:dx]].umad.v4i16(<4 x i16> %0, <4 x i16> %1, <4 x i16> %2) // DXIL_NATIVE_HALF: ret <4 x i16> %dx.umad // SPIR_NATIVE_HALF: mul nuw <4 x i16> %{{.*}}, %{{.*}} // SPIR_NATIVE_HALF: add nuw <4 x i16> %{{.*}}, %{{.*}} uint16_t4 test_mad_uint16_t4(uint16_t4 p0, uint16_t4 p1, uint16_t4 p2) { return mad(p0, p1, p2); } -// DXIL_NATIVE_HALF: %dx.imad = call i16 @llvm.dx.imad.i16(i16 %0, i16 %1, i16 %2) +// DXIL_NATIVE_HALF: %dx.imad = call i16 @llvm.[[ICF:dx]].imad.i16(i16 %0, i16 %1, i16 %2) // DXIL_NATIVE_HALF: ret i16 %dx.imad // SPIR_NATIVE_HALF: mul nsw i16 %{{.*}}, %{{.*}} // SPIR_NATIVE_HALF: add nsw i16 %{{.*}}, %{{.*}} int16_t test_mad_int16_t(int16_t p0, int16_t p1, int16_t p2) { return mad(p0, p1, p2); } -// DXIL_NATIVE_HALF: %dx.imad = call <2 x i16> @llvm.dx.imad.v2i16(<2 x i16> %0, <2 x i16> %1, <2 x i16> %2) +// DXIL_NATIVE_HALF: %dx.imad = call <2 x i16> @llvm.[[ICF:dx]].imad.v2i16(<2 x i16> %0, <2 x i16> %1, <2 x i16> %2) // DXIL_NATIVE_HALF: ret <2 x i16> %dx.imad // SPIR_NATIVE_HALF: mul nsw <2 x i16> %{{.*}}, %{{.*}} // SPIR_NATIVE_HALF: add nsw <2 x i16> %{{.*}}, %{{.*}} int16_t2 test_mad_int16_t2(int16_t2 p0, int16_t2 p1, int16_t2 p2) { return mad(p0, p1, p2); } -// DXIL_NATIVE_HALF: %dx.imad = call <3 x i16> @llvm.dx.imad.v3i16(<3 x i16> %0, <3 x i16> %1, <3 x i16> %2) +// DXIL_NATIVE_HALF: %dx.imad = call <3 x i16> @llvm.[[ICF:dx]].imad.v3i16(<3 x i16> %0, <3 x i16> %1, <3 x i16> %2) // DXIL_NATIVE_HALF: ret <3 x i16> %dx.imad // SPIR_NATIVE_HALF: mul nsw <3 x i16> %{{.*}}, %{{.*}} // SPIR_NATIVE_HALF: add nsw <3 x i16> %{{.*}}, %{{.*}} int16_t3 test_mad_int16_t3(int16_t3 p0, int16_t3 p1, int16_t3 p2) { return mad(p0, p1, p2); } -// DXIL_NATIVE_HALF: %dx.imad = call <4 x i16> @llvm.dx.imad.v4i16(<4 x i16> %0, <4 x i16> %1, <4 x i16> %2) +// DXIL_NATIVE_HALF: %dx.imad = call <4 x i16> @llvm.[[ICF:dx]].imad.v4i16(<4 x i16> %0, <4 x i16> %1, <4 x i16> %2) // DXIL_NATIVE_HALF: ret <4 x i16> %dx.imad // SPIR_NATIVE_HALF: mul nsw <4 x i16> %{{.*}}, %{{.*}} // SPIR_NATIVE_HALF: add nsw <4 x i16> %{{.*}}, %{{.*}} @@ -168,97 +168,97 @@ double3 test_mad_double3(double3 p0, double3 p1, double3 p2) { return mad(p0, p1 // CHECK: ret <4 x double> %hlsl.fmad double4 test_mad_double4(double4 p0, double4 p1, double4 p2) { return mad(p0, p1, p2); } -// DXIL_CHECK: %dx.imad = call i32 @llvm.dx.imad.i32(i32 %0, i32 %1, i32 %2) +// DXIL_CHECK: %dx.imad = call i32 @llvm.[[ICF:dx]].imad.i32(i32 %0, i32 %1, i32 %2) // DXIL_CHECK: ret i32 %dx.imad // SPIR_CHECK: mul nsw i32 %{{.*}}, %{{.*}} // SPIR_CHECK: add nsw i32 %{{.*}}, %{{.*}} int test_mad_int(int p0, int p1, int p2) { return mad(p0, p1, p2); } -// DXIL_CHECK: %dx.imad = call <2 x i32> @llvm.dx.imad.v2i32(<2 x i32> %0, <2 x i32> %1, <2 x i32> %2) +// DXIL_CHECK: %dx.imad = call <2 x i32> @llvm.[[ICF:dx]].imad.v2i32(<2 x i32> %0, <2 x i32> %1, <2 x i32> %2) // DXIL_CHECK: ret <2 x i32> %dx.imad // SPIR_CHECK: mul nsw <2 x i32> %{{.*}}, %{{.*}} // SPIR_CHECK: add nsw <2 x i32> %{{.*}}, %{{.*}} int2 test_mad_int2(int2 p0, int2 p1, int2 p2) { return mad(p0, p1, p2); } -// DXIL_CHECK: %dx.imad = call <3 x i32> @llvm.dx.imad.v3i32(<3 x i32> %0, <3 x i32> %1, <3 x i32> %2) +// DXIL_CHECK: %dx.imad = call <3 x i32> @llvm.[[ICF:dx]].imad.v3i32(<3 x i32> %0, <3 x i32> %1, <3 x i32> %2) // DXIL_CHECK: ret <3 x i32> %dx.imad // SPIR_CHECK: mul nsw <3 x i32> %{{.*}}, %{{.*}} // SPIR_CHECK: add nsw <3 x i32> %{{.*}}, %{{.*}} int3 test_mad_int3(int3 p0, int3 p1, int3 p2) { return mad(p0, p1, p2); } -// DXIL_CHECK: %dx.imad = call <4 x i32> @llvm.dx.imad.v4i32(<4 x i32> %0, <4 x i32> %1, <4 x i32> %2) +// DXIL_CHECK: %dx.imad = call <4 x i32> @llvm.[[ICF:dx]].imad.v4i32(<4 x i32> %0, <4 x i32> %1, <4 x i32> %2) // DXIL_CHECK: ret <4 x i32> %dx.imad // SPIR_CHECK: mul nsw <4 x i32> %{{.*}}, %{{.*}} // SPIR_CHECK: add nsw <4 x i32> %{{.*}}, %{{.*}} int4 test_mad_int4(int4 p0, int4 p1, int4 p2) { return mad(p0, p1, p2); } -// DXIL_CHECK: %dx.imad = call i64 @llvm.dx.imad.i64(i64 %0, i64 %1, i64 %2) +// DXIL_CHECK: %dx.imad = call i64 @llvm.[[ICF:dx]].imad.i64(i64 %0, i64 %1, i64 %2) // DXIL_CHECK: ret i64 %dx.imad // SPIR_CHECK: mul nsw i64 %{{.*}}, %{{.*}} // SPIR_CHECK: add nsw i64 %{{.*}}, %{{.*}} int64_t test_mad_int64_t(int64_t p0, int64_t p1, int64_t p2) { return mad(p0, p1, p2); } -// DXIL_CHECK: %dx.imad = call <2 x i64> @llvm.dx.imad.v2i64(<2 x i64> %0, <2 x i64> %1, <2 x i64> %2) +// DXIL_CHECK: %dx.imad = call <2 x i64> @llvm.[[ICF:dx]].imad.v2i64(<2 x i64> %0, <2 x i64> %1, <2 x i64> %2) // DXIL_CHECK: ret <2 x i64> %dx.imad // SPIR_CHECK: mul nsw <2 x i64> %{{.*}}, %{{.*}} // SPIR_CHECK: add nsw <2 x i64> %{{.*}}, %{{.*}} int64_t2 test_mad_int64_t2(int64_t2 p0, int64_t2 p1, int64_t2 p2) { return mad(p0, p1, p2); } -// DXIL_CHECK: %dx.imad = call <3 x i64> @llvm.dx.imad.v3i64(<3 x i64> %0, <3 x i64> %1, <3 x i64> %2) +// DXIL_CHECK: %dx.imad = call <3 x i64> @llvm.[[ICF:dx]].imad.v3i64(<3 x i64> %0, <3 x i64> %1, <3 x i64> %2) // DXIL_CHECK: ret <3 x i64> %dx.imad // SPIR_CHECK: mul nsw <3 x i64> %{{.*}}, %{{.*}} // SPIR_CHECK: add nsw <3 x i64> %{{.*}}, %{{.*}} int64_t3 test_mad_int64_t3(int64_t3 p0, int64_t3 p1, int64_t3 p2) { return mad(p0, p1, p2); } -// DXIL_CHECK: %dx.imad = call <4 x i64> @llvm.dx.imad.v4i64(<4 x i64> %0, <4 x i64> %1, <4 x i64> %2) +// DXIL_CHECK: %dx.imad = call <4 x i64> @llvm.[[ICF:dx]].imad.v4i64(<4 x i64> %0, <4 x i64> %1, <4 x i64> %2) // DXIL_CHECK: ret <4 x i64> %dx.imad // SPIR_CHECK: mul nsw <4 x i64> %{{.*}}, %{{.*}} // SPIR_CHECK: add nsw <4 x i64> %{{.*}}, %{{.*}} int64_t4 test_mad_int64_t4(int64_t4 p0, int64_t4 p1, int64_t4 p2) { return mad(p0, p1, p2); } -// DXIL_CHECK: %dx.umad = call i32 @llvm.dx.umad.i32(i32 %0, i32 %1, i32 %2) +// DXIL_CHECK: %dx.umad = call i32 @llvm.[[ICF:dx]].umad.i32(i32 %0, i32 %1, i32 %2) // DXIL_CHECK: ret i32 %dx.umad // SPIR_CHECK: mul nuw i32 %{{.*}}, %{{.*}} // SPIR_CHECK: add nuw i32 %{{.*}}, %{{.*}} uint test_mad_uint(uint p0, uint p1, uint p2) { return mad(p0, p1, p2); } -// DXIL_CHECK: %dx.umad = call <2 x i32> @llvm.dx.umad.v2i32(<2 x i32> %0, <2 x i32> %1, <2 x i32> %2) +// DXIL_CHECK: %dx.umad = call <2 x i32> @llvm.[[ICF:dx]].umad.v2i32(<2 x i32> %0, <2 x i32> %1, <2 x i32> %2) // DXIL_CHECK: ret <2 x i32> %dx.umad // SPIR_CHECK: mul nuw <2 x i32> %{{.*}}, %{{.*}} // SPIR_CHECK: add nuw <2 x i32> %{{.*}}, %{{.*}} uint2 test_mad_uint2(uint2 p0, uint2 p1, uint2 p2) { return mad(p0, p1, p2); } -// DXIL_CHECK: %dx.umad = call <3 x i32> @llvm.dx.umad.v3i32(<3 x i32> %0, <3 x i32> %1, <3 x i32> %2) +// DXIL_CHECK: %dx.umad = call <3 x i32> @llvm.[[ICF:dx]].umad.v3i32(<3 x i32> %0, <3 x i32> %1, <3 x i32> %2) // DXIL_CHECK: ret <3 x i32> %dx.umad // SPIR_CHECK: mul nuw <3 x i32> %{{.*}}, %{{.*}} // SPIR_CHECK: add nuw <3 x i32> %{{.*}}, %{{.*}} uint3 test_mad_uint3(uint3 p0, uint3 p1, uint3 p2) { return mad(p0, p1, p2); } -// DXIL_CHECK: %dx.umad = call <4 x i32> @llvm.dx.umad.v4i32(<4 x i32> %0, <4 x i32> %1, <4 x i32> %2) +// DXIL_CHECK: %dx.umad = call <4 x i32> @llvm.[[ICF:dx]].umad.v4i32(<4 x i32> %0, <4 x i32> %1, <4 x i32> %2) // DXIL_CHECK: ret <4 x i32> %dx.umad // SPIR_CHECK: mul nuw <4 x i32> %{{.*}}, %{{.*}} // SPIR_CHECK: add nuw <4 x i32> %{{.*}}, %{{.*}} uint4 test_mad_uint4(uint4 p0, uint4 p1, uint4 p2) { return mad(p0, p1, p2); } -// DXIL_CHECK: %dx.umad = call i64 @llvm.dx.umad.i64(i64 %0, i64 %1, i64 %2) +// DXIL_CHECK: %dx.umad = call i64 @llvm.[[ICF:dx]].umad.i64(i64 %0, i64 %1, i64 %2) // DXIL_CHECK: ret i64 %dx.umad // SPIR_CHECK: mul nuw i64 %{{.*}}, %{{.*}} // SPIR_CHECK: add nuw i64 %{{.*}}, %{{.*}} uint64_t test_mad_uint64_t(uint64_t p0, uint64_t p1, uint64_t p2) { return mad(p0, p1, p2); } -// DXIL_CHECK: %dx.umad = call <2 x i64> @llvm.dx.umad.v2i64(<2 x i64> %0, <2 x i64> %1, <2 x i64> %2) +// DXIL_CHECK: %dx.umad = call <2 x i64> @llvm.[[ICF:dx]].umad.v2i64(<2 x i64> %0, <2 x i64> %1, <2 x i64> %2) // DXIL_CHECK: ret <2 x i64> %dx.umad // SPIR_CHECK: mul nuw <2 x i64> %{{.*}}, %{{.*}} // SPIR_CHECK: add nuw <2 x i64> %{{.*}}, %{{.*}} uint64_t2 test_mad_uint64_t2(uint64_t2 p0, uint64_t2 p1, uint64_t2 p2) { return mad(p0, p1, p2); } -// DXIL_CHECK: %dx.umad = call <3 x i64> @llvm.dx.umad.v3i64(<3 x i64> %0, <3 x i64> %1, <3 x i64> %2) +// DXIL_CHECK: %dx.umad = call <3 x i64> @llvm.[[ICF:dx]].umad.v3i64(<3 x i64> %0, <3 x i64> %1, <3 x i64> %2) // DXIL_CHECK: ret <3 x i64> %dx.umad // SPIR_CHECK: mul nuw <3 x i64> %{{.*}}, %{{.*}} // SPIR_CHECK: add nuw <3 x i64> %{{.*}}, %{{.*}} uint64_t3 test_mad_uint64_t3(uint64_t3 p0, uint64_t3 p1, uint64_t3 p2) { return mad(p0, p1, p2); } -// DXIL_CHECK: %dx.umad = call <4 x i64> @llvm.dx.umad.v4i64(<4 x i64> %0, <4 x i64> %1, <4 x i64> %2) +// DXIL_CHECK: %dx.umad = call <4 x i64> @llvm.[[ICF:dx]].umad.v4i64(<4 x i64> %0, <4 x i64> %1, <4 x i64> %2) // DXIL_CHECK: ret <4 x i64> %dx.umad // SPIR_CHECK: mul nuw <4 x i64> %{{.*}}, %{{.*}} // SPIR_CHECK: add nuw <4 x i64> %{{.*}}, %{{.*}} diff --git a/clang/test/CodeGenHLSL/builtins/normalize.hlsl b/clang/test/CodeGenHLSL/builtins/normalize.hlsl index 213959e77e7e1e..4adbf74e93f9de 100644 --- a/clang/test/CodeGenHLSL/builtins/normalize.hlsl +++ b/clang/test/CodeGenHLSL/builtins/normalize.hlsl @@ -15,10 +15,10 @@ // DXIL_NATIVE_HALF: define noundef half @ // SPIR_NATIVE_HALF: define spir_func noundef half @ -// DXIL_NATIVE_HALF: call half @llvm.dx.normalize.f16(half -// SPIR_NATIVE_HALF: call half @llvm.spv.normalize.f16(half -// DXIL_NO_HALF: call float @llvm.dx.normalize.f32(float -// SPIR_NO_HALF: call float @llvm.spv.normalize.f32(float +// DXIL_NATIVE_HALF: call half @llvm.[[ICF:dx]].normalize.f16(half +// SPIR_NATIVE_HALF: call half @llvm.[[ICF:spv]].normalize.f16(half +// DXIL_NO_HALF: call float @llvm.[[ICF:dx]].normalize.f32(float +// SPIR_NO_HALF: call float @llvm.[[ICF:spv]].normalize.f32(float // NATIVE_HALF: ret half // NO_HALF: ret float half test_normalize_half(half p0) @@ -27,10 +27,10 @@ half test_normalize_half(half p0) } // DXIL_NATIVE_HALF: define noundef <2 x half> @ // SPIR_NATIVE_HALF: define spir_func noundef <2 x half> @ -// DXIL_NATIVE_HALF: call <2 x half> @llvm.dx.normalize.v2f16(<2 x half> -// SPIR_NATIVE_HALF: call <2 x half> @llvm.spv.normalize.v2f16(<2 x half> -// DXIL_NO_HALF: call <2 x float> @llvm.dx.normalize.v2f32(<2 x float> -// SPIR_NO_HALF: call <2 x float> @llvm.spv.normalize.v2f32(<2 x float> +// DXIL_NATIVE_HALF: call <2 x half> @llvm.[[ICF:dx]].normalize.v2f16(<2 x half> +// SPIR_NATIVE_HALF: call <2 x half> @llvm.[[ICF:spv]].normalize.v2f16(<2 x half> +// DXIL_NO_HALF: call <2 x float> @llvm.[[ICF:dx]].normalize.v2f32(<2 x float> +// SPIR_NO_HALF: call <2 x float> @llvm.[[ICF:spv]].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) @@ -39,10 +39,10 @@ half2 test_normalize_half2(half2 p0) } // DXIL_NATIVE_HALF: define noundef <3 x half> @ // SPIR_NATIVE_HALF: define spir_func noundef <3 x half> @ -// DXIL_NATIVE_HALF: call <3 x half> @llvm.dx.normalize.v3f16(<3 x half> -// SPIR_NATIVE_HALF: call <3 x half> @llvm.spv.normalize.v3f16(<3 x half> -// DXIL_NO_HALF: call <3 x float> @llvm.dx.normalize.v3f32(<3 x float> -// SPIR_NO_HALF: call <3 x float> @llvm.spv.normalize.v3f32(<3 x float> +// DXIL_NATIVE_HALF: call <3 x half> @llvm.[[ICF:dx]].normalize.v3f16(<3 x half> +// SPIR_NATIVE_HALF: call <3 x half> @llvm.[[ICF:spv]].normalize.v3f16(<3 x half> +// DXIL_NO_HALF: call <3 x float> @llvm.[[ICF:dx]].normalize.v3f32(<3 x float> +// SPIR_NO_HALF: call <3 x float> @llvm.[[ICF:spv]].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) @@ -51,10 +51,10 @@ half3 test_normalize_half3(half3 p0) } // DXIL_NATIVE_HALF: define noundef <4 x half> @ // SPIR_NATIVE_HALF: define spir_func noundef <4 x half> @ -// DXIL_NATIVE_HALF: call <4 x half> @llvm.dx.normalize.v4f16(<4 x half> -// SPIR_NATIVE_HALF: call <4 x half> @llvm.spv.normalize.v4f16(<4 x half> -// DXIL_NO_HALF: call <4 x float> @llvm.dx.normalize.v4f32(<4 x float> -// SPIR_NO_HALF: call <4 x float> @llvm.spv.normalize.v4f32(<4 x float> +// DXIL_NATIVE_HALF: call <4 x half> @llvm.[[ICF:dx]].normalize.v4f16(<4 x half> +// SPIR_NATIVE_HALF: call <4 x half> @llvm.[[ICF:spv]].normalize.v4f16(<4 x half> +// DXIL_NO_HALF: call <4 x float> @llvm.[[ICF:dx]].normalize.v4f32(<4 x float> +// SPIR_NO_HALF: call <4 x float> @llvm.[[ICF:spv]].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) @@ -64,8 +64,8 @@ half4 test_normalize_half4(half4 p0) // DXIL_CHECK: define noundef float @ // SPIR_CHECK: define spir_func noundef float @ -// DXIL_CHECK: call float @llvm.dx.normalize.f32(float -// SPIR_CHECK: call float @llvm.spv.normalize.f32(float +// DXIL_CHECK: call float @llvm.[[ICF:dx]].normalize.f32(float +// SPIR_CHECK: call float @llvm.[[ICF:spv]].normalize.f32(float // CHECK: ret float float test_normalize_float(float p0) { @@ -73,8 +73,8 @@ float test_normalize_float(float p0) } // DXIL_CHECK: define noundef <2 x float> @ // SPIR_CHECK: define spir_func noundef <2 x float> @ -// DXIL_CHECK: %hlsl.normalize = call <2 x float> @llvm.dx.normalize.v2f32( -// SPIR_CHECK: %hlsl.normalize = call <2 x float> @llvm.spv.normalize.v2f32(<2 x float> +// DXIL_CHECK: %hlsl.normalize = call <2 x float> @llvm.[[ICF:dx]].normalize.v2f32( +// SPIR_CHECK: %hlsl.normalize = call <2 x float> @llvm.[[ICF:spv]].normalize.v2f32(<2 x float> // CHECK: ret <2 x float> %hlsl.normalize float2 test_normalize_float2(float2 p0) { @@ -82,8 +82,8 @@ float2 test_normalize_float2(float2 p0) } // DXIL_CHECK: define noundef <3 x float> @ // SPIR_CHECK: define spir_func noundef <3 x float> @ -// DXIL_CHECK: %hlsl.normalize = call <3 x float> @llvm.dx.normalize.v3f32( -// SPIR_CHECK: %hlsl.normalize = call <3 x float> @llvm.spv.normalize.v3f32(<3 x float> +// DXIL_CHECK: %hlsl.normalize = call <3 x float> @llvm.[[ICF:dx]].normalize.v3f32( +// SPIR_CHECK: %hlsl.normalize = call <3 x float> @llvm.[[ICF:spv]].normalize.v3f32(<3 x float> // CHECK: ret <3 x float> %hlsl.normalize float3 test_normalize_float3(float3 p0) { @@ -91,8 +91,8 @@ float3 test_normalize_float3(float3 p0) } // DXIL_CHECK: define noundef <4 x float> @ // SPIR_CHECK: define spir_func noundef <4 x float> @ -// DXIL_CHECK: %hlsl.normalize = call <4 x float> @llvm.dx.normalize.v4f32( -// SPIR_CHECK: %hlsl.normalize = call <4 x float> @llvm.spv.normalize.v4f32( +// DXIL_CHECK: %hlsl.normalize = call <4 x float> @llvm.[[ICF:dx]].normalize.v4f32( +// SPIR_CHECK: %hlsl.normalize = call <4 x float> @llvm.[[ICF:spv]].normalize.v4f32( // CHECK: ret <4 x float> %hlsl.normalize float4 test_length_float4(float4 p0) { diff --git a/clang/test/CodeGenHLSL/builtins/rsqrt.hlsl b/clang/test/CodeGenHLSL/builtins/rsqrt.hlsl index bb96ad8ea0fc6e..c0f2c8f89c1741 100644 --- a/clang/test/CodeGenHLSL/builtins/rsqrt.hlsl +++ b/clang/test/CodeGenHLSL/builtins/rsqrt.hlsl @@ -15,70 +15,70 @@ // DXIL_NATIVE_HALF: define noundef half @ // SPIR_NATIVE_HALF: define spir_func noundef half @ -// DXIL_NATIVE_HALF: %hlsl.rsqrt = call half @llvm.dx.rsqrt.f16( -// SPIR_NATIVE_HALF: %hlsl.rsqrt = call half @llvm.spv.rsqrt.f16( +// DXIL_NATIVE_HALF: %hlsl.rsqrt = call half @llvm.[[ICF:dx]].rsqrt.f16( +// SPIR_NATIVE_HALF: %hlsl.rsqrt = call half @llvm.[[ICF:spv]].rsqrt.f16( // NATIVE_HALF: ret half %hlsl.rsqrt // DXIL_NO_HALF: define noundef float @ // SPIR_NO_HALF: define spir_func noundef float @ -// DXIL_NO_HALF: %hlsl.rsqrt = call float @llvm.dx.rsqrt.f32( -// SPIR_NO_HALF: %hlsl.rsqrt = call float @llvm.spv.rsqrt.f32( +// DXIL_NO_HALF: %hlsl.rsqrt = call float @llvm.[[ICF:dx]].rsqrt.f32( +// SPIR_NO_HALF: %hlsl.rsqrt = call float @llvm.[[ICF:spv]].rsqrt.f32( // NO_HALF: ret float %hlsl.rsqrt half test_rsqrt_half(half p0) { return rsqrt(p0); } // DXIL_NATIVE_HALF: define noundef <2 x half> @ // SPIR_NATIVE_HALF: define spir_func noundef <2 x half> @ -// DXIL_NATIVE_HALF: %hlsl.rsqrt = call <2 x half> @llvm.dx.rsqrt.v2f16 -// SPIR_NATIVE_HALF: %hlsl.rsqrt = call <2 x half> @llvm.spv.rsqrt.v2f16 +// DXIL_NATIVE_HALF: %hlsl.rsqrt = call <2 x half> @llvm.[[ICF:dx]].rsqrt.v2f16 +// SPIR_NATIVE_HALF: %hlsl.rsqrt = call <2 x half> @llvm.[[ICF:spv]].rsqrt.v2f16 // NATIVE_HALF: ret <2 x half> %hlsl.rsqrt // DXIL_NO_HALF: define noundef <2 x float> @ // SPIR_NO_HALF: define spir_func noundef <2 x float> @ -// DXIL_NO_HALF: %hlsl.rsqrt = call <2 x float> @llvm.dx.rsqrt.v2f32( -// SPIR_NO_HALF: %hlsl.rsqrt = call <2 x float> @llvm.spv.rsqrt.v2f32( +// DXIL_NO_HALF: %hlsl.rsqrt = call <2 x float> @llvm.[[ICF:dx]].rsqrt.v2f32( +// SPIR_NO_HALF: %hlsl.rsqrt = call <2 x float> @llvm.[[ICF:spv]].rsqrt.v2f32( // NO_HALF: ret <2 x float> %hlsl.rsqrt half2 test_rsqrt_half2(half2 p0) { return rsqrt(p0); } // DXIL_NATIVE_HALF: define noundef <3 x half> @ // SPIR_NATIVE_HALF: define spir_func noundef <3 x half> @ -// DXIL_NATIVE_HALF: %hlsl.rsqrt = call <3 x half> @llvm.dx.rsqrt.v3f16 -// SPIR_NATIVE_HALF: %hlsl.rsqrt = call <3 x half> @llvm.spv.rsqrt.v3f16 +// DXIL_NATIVE_HALF: %hlsl.rsqrt = call <3 x half> @llvm.[[ICF:dx]].rsqrt.v3f16 +// SPIR_NATIVE_HALF: %hlsl.rsqrt = call <3 x half> @llvm.[[ICF:spv]].rsqrt.v3f16 // NATIVE_HALF: ret <3 x half> %hlsl.rsqrt // DXIL_NO_HALF: define noundef <3 x float> @ // SPIR_NO_HALF: define spir_func noundef <3 x float> @ -// DXIL_NO_HALF: %hlsl.rsqrt = call <3 x float> @llvm.dx.rsqrt.v3f32( -// SPIR_NO_HALF: %hlsl.rsqrt = call <3 x float> @llvm.spv.rsqrt.v3f32( +// DXIL_NO_HALF: %hlsl.rsqrt = call <3 x float> @llvm.[[ICF:dx]].rsqrt.v3f32( +// SPIR_NO_HALF: %hlsl.rsqrt = call <3 x float> @llvm.[[ICF:spv]].rsqrt.v3f32( // NO_HALF: ret <3 x float> %hlsl.rsqrt half3 test_rsqrt_half3(half3 p0) { return rsqrt(p0); } // DXIL_NATIVE_HALF: define noundef <4 x half> @ // SPIR_NATIVE_HALF: define spir_func noundef <4 x half> @ -// DXIL_NATIVE_HALF: %hlsl.rsqrt = call <4 x half> @llvm.dx.rsqrt.v4f16 -// SPIR_NATIVE_HALF: %hlsl.rsqrt = call <4 x half> @llvm.spv.rsqrt.v4f16 +// DXIL_NATIVE_HALF: %hlsl.rsqrt = call <4 x half> @llvm.[[ICF:dx]].rsqrt.v4f16 +// SPIR_NATIVE_HALF: %hlsl.rsqrt = call <4 x half> @llvm.[[ICF:spv]].rsqrt.v4f16 // NATIVE_HALF: ret <4 x half> %hlsl.rsqrt // DXIL_NO_HALF: define noundef <4 x float> @ // SPIR_NO_HALF: define spir_func noundef <4 x float> @ -// DXIL_NO_HALF: %hlsl.rsqrt = call <4 x float> @llvm.dx.rsqrt.v4f32( -// SPIR_NO_HALF: %hlsl.rsqrt = call <4 x float> @llvm.spv.rsqrt.v4f32( +// DXIL_NO_HALF: %hlsl.rsqrt = call <4 x float> @llvm.[[ICF:dx]].rsqrt.v4f32( +// SPIR_NO_HALF: %hlsl.rsqrt = call <4 x float> @llvm.[[ICF:spv]].rsqrt.v4f32( // NO_HALF: ret <4 x float> %hlsl.rsqrt half4 test_rsqrt_half4(half4 p0) { return rsqrt(p0); } // DXIL_CHECK: define noundef float @ // SPIR_CHECK: define spir_func noundef float @ -// DXIL_CHECK: %hlsl.rsqrt = call float @llvm.dx.rsqrt.f32( -// SPIR_CHECK: %hlsl.rsqrt = call float @llvm.spv.rsqrt.f32( +// DXIL_CHECK: %hlsl.rsqrt = call float @llvm.[[ICF:dx]].rsqrt.f32( +// SPIR_CHECK: %hlsl.rsqrt = call float @llvm.[[ICF:spv]].rsqrt.f32( // CHECK: ret float %hlsl.rsqrt float test_rsqrt_float(float p0) { return rsqrt(p0); } // DXIL_CHECK: define noundef <2 x float> @ // SPIR_CHECK: define spir_func noundef <2 x float> @ -// DXIL_CHECK: %hlsl.rsqrt = call <2 x float> @llvm.dx.rsqrt.v2f32 -// SPIR_CHECK: %hlsl.rsqrt = call <2 x float> @llvm.spv.rsqrt.v2f32 +// DXIL_CHECK: %hlsl.rsqrt = call <2 x float> @llvm.[[ICF:dx]].rsqrt.v2f32 +// SPIR_CHECK: %hlsl.rsqrt = call <2 x float> @llvm.[[ICF:spv]].rsqrt.v2f32 // CHECK: ret <2 x float> %hlsl.rsqrt float2 test_rsqrt_float2(float2 p0) { return rsqrt(p0); } // DXIL_CHECK: define noundef <3 x float> @ // SPIR_CHECK: define spir_func noundef <3 x float> @ -// DXIL_CHECK: %hlsl.rsqrt = call <3 x float> @llvm.dx.rsqrt.v3f32 -// SPIR_CHECK: %hlsl.rsqrt = call <3 x float> @llvm.spv.rsqrt.v3f32 +// DXIL_CHECK: %hlsl.rsqrt = call <3 x float> @llvm.[[ICF:dx]].rsqrt.v3f32 +// SPIR_CHECK: %hlsl.rsqrt = call <3 x float> @llvm.[[ICF:spv]].rsqrt.v3f32 // CHECK: ret <3 x float> %hlsl.rsqrt float3 test_rsqrt_float3(float3 p0) { return rsqrt(p0); } // DXIL_CHECK: define noundef <4 x float> @ // SPIR_CHECK: define spir_func noundef <4 x float> @ -// DXIL_CHECK: %hlsl.rsqrt = call <4 x float> @llvm.dx.rsqrt.v4f32 -// SPIR_CHECK: %hlsl.rsqrt = call <4 x float> @llvm.spv.rsqrt.v4f32 +// DXIL_CHECK: %hlsl.rsqrt = call <4 x float> @llvm.[[ICF:dx]].rsqrt.v4f32 +// SPIR_CHECK: %hlsl.rsqrt = call <4 x float> @llvm.[[ICF:spv]].rsqrt.v4f32 // CHECK: ret <4 x float> %hlsl.rsqrt float4 test_rsqrt_float4(float4 p0) { return rsqrt(p0); } diff --git a/clang/test/CodeGenHLSL/builtins/saturate.hlsl b/clang/test/CodeGenHLSL/builtins/saturate.hlsl index 65a3cd74621cc0..13a509c054dd7b 100644 --- a/clang/test/CodeGenHLSL/builtins/saturate.hlsl +++ b/clang/test/CodeGenHLSL/builtins/saturate.hlsl @@ -16,80 +16,80 @@ // RUN: --check-prefixes=SPIRV,SPIRV_NO_HALF // NATIVE_HALF: define noundef half @ -// NATIVE_HALF: call half @llvm.dx.saturate.f16( +// NATIVE_HALF: call half @llvm.[[ICF:dx]].saturate.f16( // NO_HALF: define noundef float @"?test_saturate_half -// NO_HALF: call float @llvm.dx.saturate.f32( +// NO_HALF: call float @llvm.[[ICF:dx]].saturate.f32( // SPIRV_HALF: define spir_func noundef half @_Z18test_saturate_halfDh(half -// SPIRV_HALF: call half @llvm.spv.saturate.f16(half +// SPIRV_HALF: call half @llvm.[[ICF:spv]].saturate.f16(half // SPIRV_NO_HALF: define spir_func noundef float @_Z18test_saturate_halfDh(float -// SPIRV_NO_HALF: call float @llvm.spv.saturate.f32(float +// SPIRV_NO_HALF: call float @llvm.[[ICF:spv]].saturate.f32(float half test_saturate_half(half p0) { return saturate(p0); } // NATIVE_HALF: define noundef <2 x half> @ -// NATIVE_HALF: call <2 x half> @llvm.dx.saturate.v2f16 +// NATIVE_HALF: call <2 x half> @llvm.[[ICF:dx]].saturate.v2f16 // NO_HALF: define noundef <2 x float> @"?test_saturate_half2 -// NO_HALF: call <2 x float> @llvm.dx.saturate.v2f32( +// NO_HALF: call <2 x float> @llvm.[[ICF:dx]].saturate.v2f32( // SPIRV_HALF: define spir_func noundef <2 x half> @_Z19test_saturate_half2Dv2_Dh( -// SPIRV_HALF: call <2 x half> @llvm.spv.saturate.v2f16(<2 x half> +// SPIRV_HALF: call <2 x half> @llvm.[[ICF:spv]].saturate.v2f16(<2 x half> // SPIRV_NO_HALF: define spir_func noundef <2 x float> @_Z19test_saturate_half2Dv2_Dh(<2 x float> -// SPIRV_NO_HALF: call <2 x float> @llvm.spv.saturate.v2f32(<2 x float> +// SPIRV_NO_HALF: call <2 x float> @llvm.[[ICF:spv]].saturate.v2f32(<2 x float> half2 test_saturate_half2(half2 p0) { return saturate(p0); } // NATIVE_HALF: define noundef <3 x half> @ -// NATIVE_HALF: call <3 x half> @llvm.dx.saturate.v3f16 +// NATIVE_HALF: call <3 x half> @llvm.[[ICF:dx]].saturate.v3f16 // NO_HALF: define noundef <3 x float> @"?test_saturate_half3 -// NO_HALF: call <3 x float> @llvm.dx.saturate.v3f32( +// NO_HALF: call <3 x float> @llvm.[[ICF:dx]].saturate.v3f32( // SPIRV_HALF: define spir_func noundef <3 x half> @_Z19test_saturate_half3Dv3_Dh( -// SPIRV_HALF: call <3 x half> @llvm.spv.saturate.v3f16(<3 x half> +// SPIRV_HALF: call <3 x half> @llvm.[[ICF:spv]].saturate.v3f16(<3 x half> // SPIRV_NO_HALF: define spir_func noundef <3 x float> @_Z19test_saturate_half3Dv3_Dh(<3 x float> -// SPIRV_NO_HALF: call <3 x float> @llvm.spv.saturate.v3f32(<3 x float> +// SPIRV_NO_HALF: call <3 x float> @llvm.[[ICF:spv]].saturate.v3f32(<3 x float> half3 test_saturate_half3(half3 p0) { return saturate(p0); } // NATIVE_HALF: define noundef <4 x half> @ -// NATIVE_HALF: call <4 x half> @llvm.dx.saturate.v4f16 +// NATIVE_HALF: call <4 x half> @llvm.[[ICF:dx]].saturate.v4f16 // NO_HALF: define noundef <4 x float> @"?test_saturate_half4 -// NO_HALF: call <4 x float> @llvm.dx.saturate.v4f32( +// NO_HALF: call <4 x float> @llvm.[[ICF:dx]].saturate.v4f32( // SPIRV_HALF: define spir_func noundef <4 x half> @_Z19test_saturate_half4Dv4_Dh( -// SPIRV_HALF: call <4 x half> @llvm.spv.saturate.v4f16(<4 x half> +// SPIRV_HALF: call <4 x half> @llvm.[[ICF:spv]].saturate.v4f16(<4 x half> // SPIRV_NO_HALF: define spir_func noundef <4 x float> @_Z19test_saturate_half4Dv4_Dh(<4 x float> -// SPIRV_NO_HALF: call <4 x float> @llvm.spv.saturate.v4f32(<4 x float> +// SPIRV_NO_HALF: call <4 x float> @llvm.[[ICF:spv]].saturate.v4f32(<4 x float> half4 test_saturate_half4(half4 p0) { return saturate(p0); } // CHECK: define noundef float @"?test_saturate_float -// CHECK: call float @llvm.dx.saturate.f32( +// CHECK: call float @llvm.[[ICF:dx]].saturate.f32( // SPIRV: define spir_func noundef float @_Z19test_saturate_floatf(float -// SPIRV: call float @llvm.spv.saturate.f32(float +// SPIRV: call float @llvm.[[ICF:spv]].saturate.f32(float float test_saturate_float(float p0) { return saturate(p0); } // CHECK: define noundef <2 x float> @"?test_saturate_float2 -// CHECK: call <2 x float> @llvm.dx.saturate.v2f32 +// CHECK: call <2 x float> @llvm.[[ICF:dx]].saturate.v2f32 // SPIRV: define spir_func noundef <2 x float> @_Z20test_saturate_float2Dv2_f(<2 x float> -// SPIRV: call <2 x float> @llvm.spv.saturate.v2f32(<2 x float> +// SPIRV: call <2 x float> @llvm.[[ICF:spv]].saturate.v2f32(<2 x float> float2 test_saturate_float2(float2 p0) { return saturate(p0); } // CHECK: define noundef <3 x float> @"?test_saturate_float3 -// CHECK: call <3 x float> @llvm.dx.saturate.v3f32 +// CHECK: call <3 x float> @llvm.[[ICF:dx]].saturate.v3f32 // SPIRV: define spir_func noundef <3 x float> @_Z20test_saturate_float3Dv3_f(<3 x float> -// SPIRV: call <3 x float> @llvm.spv.saturate.v3f32(<3 x float> +// SPIRV: call <3 x float> @llvm.[[ICF:spv]].saturate.v3f32(<3 x float> float3 test_saturate_float3(float3 p0) { return saturate(p0); } // CHECK: define noundef <4 x float> @"?test_saturate_float4 -// CHECK: call <4 x float> @llvm.dx.saturate.v4f32 +// CHECK: call <4 x float> @llvm.[[ICF:dx]].saturate.v4f32 // SPIRV: define spir_func noundef <4 x float> @_Z20test_saturate_float4Dv4_f(<4 x float> -// SPIRV: call <4 x float> @llvm.spv.saturate.v4f32(<4 x float> +// SPIRV: call <4 x float> @llvm.[[ICF:spv]].saturate.v4f32(<4 x float> float4 test_saturate_float4(float4 p0) { return saturate(p0); } // CHECK: define noundef double @ -// CHECK: call double @llvm.dx.saturate.f64( +// CHECK: call double @llvm.[[ICF:dx]].saturate.f64( // SPIRV: define spir_func noundef double @_Z20test_saturate_doubled(double -// SPIRV: call double @llvm.spv.saturate.f64(double +// SPIRV: call double @llvm.[[ICF:spv]].saturate.f64(double double test_saturate_double(double p0) { return saturate(p0); } // CHECK: define noundef <2 x double> @ -// CHECK: call <2 x double> @llvm.dx.saturate.v2f64 +// CHECK: call <2 x double> @llvm.[[ICF:dx]].saturate.v2f64 // SPIRV: define spir_func noundef <2 x double> @_Z21test_saturate_double2Dv2_d(<2 x double> -// SPIRV: call <2 x double> @llvm.spv.saturate.v2f64(<2 x double> +// SPIRV: call <2 x double> @llvm.[[ICF:spv]].saturate.v2f64(<2 x double> double2 test_saturate_double2(double2 p0) { return saturate(p0); } // CHECK: define noundef <3 x double> @ -// CHECK: call <3 x double> @llvm.dx.saturate.v3f64 +// CHECK: call <3 x double> @llvm.[[ICF:dx]].saturate.v3f64 // SPIRV: define spir_func noundef <3 x double> @_Z21test_saturate_double3Dv3_d(<3 x double> -// SPIRV: call <3 x double> @llvm.spv.saturate.v3f64(<3 x double> +// SPIRV: call <3 x double> @llvm.[[ICF:spv]].saturate.v3f64(<3 x double> double3 test_saturate_double3(double3 p0) { return saturate(p0); } // CHECK: define noundef <4 x double> @ -// CHECK: call <4 x double> @llvm.dx.saturate.v4f64 +// CHECK: call <4 x double> @llvm.[[ICF:dx]].saturate.v4f64 // SPIRV: define spir_func noundef <4 x double> @_Z21test_saturate_double4Dv4_d(<4 x double> -// SPIRV: call <4 x double> @llvm.spv.saturate.v4f64(<4 x double> +// SPIRV: call <4 x double> @llvm.[[ICF:spv]].saturate.v4f64(<4 x double> double4 test_saturate_double4(double4 p0) { return saturate(p0); } diff --git a/clang/test/CodeGenHLSL/semantics/DispatchThreadID.hlsl b/clang/test/CodeGenHLSL/semantics/DispatchThreadID.hlsl index 2004a9d894a579..5b4221f3a7c00d 100644 --- a/clang/test/CodeGenHLSL/semantics/DispatchThreadID.hlsl +++ b/clang/test/CodeGenHLSL/semantics/DispatchThreadID.hlsl @@ -4,19 +4,19 @@ // Make sure SV_DispatchThreadID translated into dx.thread.id. // CHECK: define void @foo() -// CHECK-DXIL: %[[#ID:]] = call i32 @llvm.dx.thread.id(i32 0) -// CHECK-SPIRV: %[[#ID:]] = call i32 @llvm.spv.thread.id(i32 0) +// CHECK-DXIL: %[[#ID:]] = call i32 @llvm.[[ICF:dx]].thread.id(i32 0) +// CHECK-SPIRV: %[[#ID:]] = call i32 @llvm.[[ICF:spv]].thread.id(i32 0) // CHECK: call void @{{.*}}foo{{.*}}(i32 %[[#ID]]) [shader("compute")] [numthreads(8,8,1)] void foo(uint Idx : SV_DispatchThreadID) {} // CHECK: define void @bar() -// CHECK-DXIL: %[[#ID_X:]] = call i32 @llvm.dx.thread.id(i32 0) -// CHECK-SPIRV: %[[#ID_X:]] = call i32 @llvm.spv.thread.id(i32 0) +// CHECK-DXIL: %[[#ID_X:]] = call i32 @llvm.[[ICF:dx]].thread.id(i32 0) +// CHECK-SPIRV: %[[#ID_X:]] = call i32 @llvm.[[ICF:spv]].thread.id(i32 0) // CHECK: %[[#ID_X_:]] = insertelement <2 x i32> poison, i32 %[[#ID_X]], i64 0 -// CHECK-DXIL: %[[#ID_Y:]] = call i32 @llvm.dx.thread.id(i32 1) -// CHECK-SPIRV: %[[#ID_Y:]] = call i32 @llvm.spv.thread.id(i32 1) +// CHECK-DXIL: %[[#ID_Y:]] = call i32 @llvm.[[ICF:dx]].thread.id(i32 1) +// CHECK-SPIRV: %[[#ID_Y:]] = call i32 @llvm.[[ICF:spv]].thread.id(i32 1) // CHECK: %[[#ID_XY:]] = insertelement <2 x i32> %[[#ID_X_]], i32 %[[#ID_Y]], i64 1 // CHECK-DXIL: call void @{{.*}}bar{{.*}}(<2 x i32> %[[#ID_XY]]) [shader("compute")] diff --git a/clang/test/CodeGenHLSL/semantics/GroupIndex-codegen.hlsl b/clang/test/CodeGenHLSL/semantics/GroupIndex-codegen.hlsl index 7e7ebe930bd96e..2820e219aadb07 100644 --- a/clang/test/CodeGenHLSL/semantics/GroupIndex-codegen.hlsl +++ b/clang/test/CodeGenHLSL/semantics/GroupIndex-codegen.hlsl @@ -12,7 +12,7 @@ void main(unsigned GI : SV_GroupIndex) { //CHECK: define void @main() #[[#ENTRY_ATTR:]] { //CHECK-NEXT: entry: -//CHECK-NEXT: %0 = call i32 @llvm.dx.flattened.thread.id.in.group() +//CHECK-NEXT: %0 = call i32 @llvm.[[ICF:dx]].flattened.thread.id.in.group() //CHECK-NEXT: call void @"?main@@YAXI@Z"(i32 %0) //CHECK-NEXT: ret void //CHECK-NEXT: } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits