[clang] [clang][HLSL] Update DXIL/SPIRV hybird CodeGen tests to use temp var (PR #105930)
Amr Hesham via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 26 13:05:50 PDT 2024
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/105930
>From cd1c20ce8856ca24ffea6db22a758e588f0398e2 Mon Sep 17 00:00:00 2001
From: AmrDeveloper <amr96 at 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
---
.../builtins/RWBuffer-constructor.hlsl | 10 +-
clang/test/CodeGenHLSL/builtins/all.hlsl | 134 ++++++------------
clang/test/CodeGenHLSL/builtins/any.hlsl | 134 ++++++------------
clang/test/CodeGenHLSL/builtins/frac.hlsl | 38 ++---
clang/test/CodeGenHLSL/builtins/lerp.hlsl | 56 +++-----
clang/test/CodeGenHLSL/builtins/mad.hlsl | 16 +--
.../test/CodeGenHLSL/builtins/normalize.hlsl | 39 ++---
clang/test/CodeGenHLSL/builtins/rsqrt.hlsl | 38 ++---
clang/test/CodeGenHLSL/builtins/saturate.hlsl | 64 ++++-----
.../semantics/DispatchThreadID.hlsl | 10 +-
10 files changed, 205 insertions(+), 334 deletions(-)
diff --git a/clang/test/CodeGenHLSL/builtins/RWBuffer-constructor.hlsl b/clang/test/CodeGenHLSL/builtins/RWBuffer-constructor.hlsl
index e51eac7f57c2d3..e3fa0d2c3083fd 100644
--- a/clang/test/CodeGenHLSL/builtins/RWBuffer-constructor.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/RWBuffer-constructor.hlsl
@@ -1,12 +1,12 @@
-// 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 at M@hlsl@@QAA at XZ"
// CHECK-NEXT: entry:
-// CHECK: %[[HandleRes:[0-9]+]] = call ptr @llvm.dx.create.handle(i8 1)
+// DXCHECK: %[[HandleRes:[0-9]+]] = call ptr @llvm.dx.create.handle(i8 1)
+// SPVCHECK: %[[HandleRes:[0-9]+]] = call ptr @llvm.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..f431aa8eb692dd 100644
--- a/clang/test/CodeGenHLSL/builtins/all.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/all.hlsl
@@ -16,262 +16,220 @@
#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
+// NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF]].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
+// NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF]].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
+// NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF]].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
+// NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF]].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
+// NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF]].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
+// NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF]].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
+// NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF]].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
+// NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF]].all.f16
+// NO_HALF: %hlsl.all = call i1 @llvm.[[ICF]].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
+// NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF]].all.v2f16
+// NO_HALF: %hlsl.all = call i1 @llvm.[[ICF]].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
+// NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF]].all.v3f16
+// NO_HALF: %hlsl.all = call i1 @llvm.[[ICF]].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
+// NATIVE_HALF: %hlsl.all = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.all = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.all = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.all = call i1 @llvm.[[ICF]].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
// 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
+// CHECK: %hlsl.all = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.all = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.all = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.all = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.all = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.all = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.all = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.all = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.all = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.all = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.all = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.all = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.all = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.all = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.all = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.all = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.all = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.all = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.all = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.all = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.all = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.all = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.all = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.all = call i1 @llvm.[[ICF]].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..b364345315cdac 100644
--- a/clang/test/CodeGenHLSL/builtins/any.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/any.hlsl
@@ -16,289 +16,247 @@
#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
+// NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF]].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
+// NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF]].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
+// NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF]].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
+// NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF]].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
+// NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF]].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
+// NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF]].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
+// NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF]].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
+// NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF]].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
+// NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF]].any.v2f16
+// NO_HALF: %hlsl.any = call i1 @llvm.[[ICF]].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
+// NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF]].any.v3f16
+// NO_HALF: %hlsl.any = call i1 @llvm.[[ICF]].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
+// NATIVE_HALF: %hlsl.any = call i1 @llvm.[[ICF]].any.v4f16
+// NO_HALF: %hlsl.any = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.any = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.any = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.any = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.any = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.any = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.any = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.any = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.any = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.any = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.any = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.any = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.any = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.any = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.any = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.any = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.any = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.any = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.any = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.any = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.any = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.any = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.any = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.any = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.any = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.any = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.any = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.any = call i1 @llvm.[[ICF]].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
+// CHECK: %hlsl.any = call i1 @llvm.[[ICF]].any.v4i1
// CHECK: ret i1 %hlsl.any
bool test_any_bool4(bool4 p0) { return any(p0); }
diff --git a/clang/test/CodeGenHLSL/builtins/frac.hlsl b/clang/test/CodeGenHLSL/builtins/frac.hlsl
index b457f5c2787918..4ab88bdf409b76 100644
--- a/clang/test/CodeGenHLSL/builtins/frac.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/frac.hlsl
@@ -15,70 +15,60 @@
// 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
+// NATIVE_HALF: %hlsl.frac = call <2 x half> @llvm.[[ICF]].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(
+// NO_HALF: %hlsl.frac = call <2 x float> @llvm.[[ICF]].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
+// NATIVE_HALF: %hlsl.frac = call <3 x half> @llvm.[[ICF]].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(
+// NO_HALF: %hlsl.frac = call <3 x float> @llvm.[[ICF]].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
+// NATIVE_HALF: %hlsl.frac = call <4 x half> @llvm.[[ICF]].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(
+// NO_HALF: %hlsl.frac = call <4 x float> @llvm.[[ICF]].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(
+// CHECK: %hlsl.frac = call float @llvm.[[ICF]].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
+// CHECK: %hlsl.frac = call <2 x float> @llvm.[[ICF]].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
+// CHECK: %hlsl.frac = call <3 x float> @llvm.[[ICF]].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
+// CHECK: %hlsl.frac = call <4 x float> @llvm.[[ICF]].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/lerp.hlsl b/clang/test/CodeGenHLSL/builtins/lerp.hlsl
index 53ac24dd456930..de2352aae274a1 100644
--- a/clang/test/CodeGenHLSL/builtins/lerp.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/lerp.hlsl
@@ -1,88 +1,74 @@
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
-// RUN: --check-prefixes=CHECK,DXIL_CHECK,DXIL_NATIVE_HALF,NATIVE_HALF
+// RUN: --check-prefixes=CHECK,DXIL_NATIVE_HALF,NATIVE_HALF
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
-// RUN: -o - | FileCheck %s --check-prefixes=CHECK,DXIL_CHECK,NO_HALF,DXIL_NO_HALF
+// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF,DXIL_NO_HALF
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
// RUN: spirv-unknown-vulkan-compute %s -fnative-half-type \
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
-// RUN: --check-prefixes=CHECK,NATIVE_HALF,SPIR_NATIVE_HALF,SPIR_CHECK
+// RUN: --check-prefixes=CHECK,NATIVE_HALF,SPIR_NATIVE_HALF
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
// RUN: spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \
-// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF,SPIR_NO_HALF,SPIR_CHECK
+// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF,SPIR_NO_HALF
-
-// 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> %{{.*}})
+// NATIVE_HALF: %hlsl.lerp = call <2 x half> @llvm.[[ICF]].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> %{{.*}})
+// NO_HALF: %hlsl.lerp = call <2 x float> @llvm.[[ICF]].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> %{{.*}})
+// NATIVE_HALF: %hlsl.lerp = call <3 x half> @llvm.[[ICF]].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> %{{.*}})
+// NO_HALF: %hlsl.lerp = call <3 x float> @llvm.[[ICF]].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> %{{.*}})
+// NATIVE_HALF: %hlsl.lerp = call <4 x half> @llvm.[[ICF]].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> %{{.*}})
+// NO_HALF: %hlsl.lerp = call <4 x float> @llvm.[[ICF]].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 %{{.*}})
+// CHECK: %hlsl.lerp = call float @llvm.[[ICF]].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> %{{.*}})
+// CHECK: %hlsl.lerp = call <2 x float> @llvm.[[ICF]].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> %{{.*}})
+// CHECK: %hlsl.lerp = call <3 x float> @llvm.[[ICF]].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> %{{.*}})
+// CHECK: %hlsl.lerp = call <4 x float> @llvm.[[ICF]].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]])
+// CHECK: %hlsl.lerp = call <2 x float> @llvm.[[ICF]].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]])
+// CHECK: %hlsl.lerp = call <3 x float> @llvm.[[ICF]].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]])
+// CHECK: %hlsl.lerp = call <4 x float> @llvm.[[ICF]].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..6bcde6e918537f 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> %{{.*}}, %{{.*}}
diff --git a/clang/test/CodeGenHLSL/builtins/normalize.hlsl b/clang/test/CodeGenHLSL/builtins/normalize.hlsl
index 213959e77e7e1e..ba41b0d84b786e 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,8 @@ 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>
+// NATIVE_HALF: call <2 x half> @llvm.[[ICF]].normalize.v2f16(<2 x half>
+// NO_HALF: call <2 x float> @llvm.[[ICF]].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 +37,8 @@ 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>
+// NATIVE_HALF: call <3 x half> @llvm.[[ICF]].normalize.v3f16(<3 x half>
+// NO_HALF: call <3 x float> @llvm.[[ICF]].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 +47,8 @@ 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>
+// NATIVE_HALF: call <4 x half> @llvm.[[ICF]].normalize.v4f16(<4 x half>
+// NO_HALF: call <4 x float> @llvm.[[ICF]].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 +58,7 @@ 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
+// CHECK: call float @llvm.[[ICF]].normalize.f32(float
// CHECK: ret float
float test_normalize_float(float p0)
{
@@ -73,8 +66,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 +75,7 @@ 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>
+// CHECK: %hlsl.normalize = call <3 x float> @llvm.[[ICF]].normalize.v3f32(
// CHECK: ret <3 x float> %hlsl.normalize
float3 test_normalize_float3(float3 p0)
{
@@ -91,8 +83,7 @@ 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(
+// CHECK: %hlsl.normalize = call <4 x float> @llvm.[[ICF]].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..66d182d182c2e0 100644
--- a/clang/test/CodeGenHLSL/builtins/rsqrt.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/rsqrt.hlsl
@@ -15,70 +15,60 @@
// 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
+// NATIVE_HALF: %hlsl.rsqrt = call <2 x half> @llvm.[[ICF]].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(
+// NO_HALF: %hlsl.rsqrt = call <2 x float> @llvm.[[ICF]].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
+// NATIVE_HALF: %hlsl.rsqrt = call <3 x half> @llvm.[[ICF]].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(
+// NO_HALF: %hlsl.rsqrt = call <3 x float> @llvm.[[ICF]].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
+// NATIVE_HALF: %hlsl.rsqrt = call <4 x half> @llvm.[[ICF]].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(
+// NO_HALF: %hlsl.rsqrt = call <4 x float> @llvm.[[ICF]].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(
+// CHECK: %hlsl.rsqrt = call float @llvm.[[ICF]].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
+// CHECK: %hlsl.rsqrt = call <2 x float> @llvm.[[ICF]].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
+// CHECK: %hlsl.rsqrt = call <3 x float> @llvm.[[ICF]].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
+// CHECK: %hlsl.rsqrt = call <4 x float> @llvm.[[ICF]].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..a4c8984f971f40 100644
--- a/clang/test/CodeGenHLSL/semantics/DispatchThreadID.hlsl
+++ b/clang/test/CodeGenHLSL/semantics/DispatchThreadID.hlsl
@@ -4,19 +4,17 @@
// 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: %[[#ID_X:]] = call i32 @llvm.[[ICF]].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: %[[#ID_Y:]] = call i32 @llvm.[[ICF]].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")]
More information about the cfe-commits
mailing list