https://github.com/joaosaffran created 
https://github.com/llvm/llvm-project/pull/177507

This patch changes the run lines for cosh, exp, normalize overload test to use 
-O1 instead of -disable-llvm-passes and rewrite the tests to actually look at 
the whole function.

This work is part of https://github.com/llvm/llvm-project/issues/138016.

>From 4b10bd1ced4eb0f19b4dd9d3481d18ad60904ca5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=C3=A3o=20Saffran?= <[email protected]>
Date: Thu, 22 Jan 2026 16:53:49 -0800
Subject: [PATCH] update cosh, exp, normalize overload test

---
 .../CodeGenHLSL/builtins/cosh-overloads.hlsl  | 124 ++++++++++-----
 .../CodeGenHLSL/builtins/exp-overloads.hlsl   | 144 ++++++++++--------
 .../builtins/normalize-overloads.hlsl         | 144 ++++++++++--------
 3 files changed, 246 insertions(+), 166 deletions(-)

diff --git a/clang/test/CodeGenHLSL/builtins/cosh-overloads.hlsl 
b/clang/test/CodeGenHLSL/builtins/cosh-overloads.hlsl
index 2170f63c53d97..1161f10dfff4a 100644
--- a/clang/test/CodeGenHLSL/builtins/cosh-overloads.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/cosh-overloads.hlsl
@@ -1,123 +1,163 @@
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
-// RUN:   spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \
-// RUN:   -o - | FileCheck %s --check-prefixes=CHECK
+// RUN:   spirv-unknown-vulkan-compute %s -emit-llvm \
+// RUN:   -o - | FileCheck %s --check-prefixes=CHECK -DFNATTRS="hidden 
spir_func noundef nofpclass(nan inf)"
 
-// CHECK-LABEL: test_cosh_double
-// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.cosh.f32
+// CHECK: define [[FNATTRS]] float @_Z16test_cosh_doubled(
+// CHECK:    [[CONVI:%.*]] = fptrunc {{.*}} double %{{.*}} to float
+// CHECK:    [[V3:%.*]] = call {{.*}} float @llvm.cosh.f32(float [[CONVI]])
+// CHECK:    ret float [[V3]]
 float test_cosh_double ( double p0 ) {
   return cosh ( p0 );
 }
 
-// CHECK-LABEL: test_cosh_double2
-// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.cosh.v2f32
+// CHECK: define [[FNATTRS]] <2 x float> @_Z17test_cosh_double2Dv2_d(
+// CHECK:    [[CONVI:%.*]] = fptrunc {{.*}} <2 x double> %{{.*}} to <2 x float>
+// CHECK:    [[V3:%.*]] = call {{.*}} <2 x float> @llvm.cosh.v2f32(<2 x float> 
[[CONVI]])
+// CHECK:    ret <2 x float> [[V3]]
 float2 test_cosh_double2 ( double2 p0 ) {
   return cosh ( p0 );
 }
 
-// CHECK-LABEL: test_cosh_double3
-// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.cosh.v3f32
+// CHECK: define [[FNATTRS]] <3 x float> @_Z17test_cosh_double3Dv3_d(
+// CHECK:    [[CONVI:%.*]] = fptrunc {{.*}} <3 x double> %{{.*}} to <3 x float>
+// CHECK:    [[V3:%.*]] = call {{.*}} <3 x float> @llvm.cosh.v3f32(<3 x float> 
[[CONVI]])
+// CHECK:    ret <3 x float> [[V3]]
 float3 test_cosh_double3 ( double3 p0 ) {
   return cosh ( p0 );
 }
 
-// CHECK-LABEL: test_cosh_double4
-// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.cosh.v4f32
+// CHECK: define [[FNATTRS]] <4 x float> @_Z17test_cosh_double4Dv4_d(
+// CHECK:    [[CONVI:%.*]] = fptrunc {{.*}} <4 x double> %{{.*}} to <4 x float>
+// CHECK:    [[V3:%.*]] = call {{.*}} <4 x float> @llvm.cosh.v4f32(<4 x float> 
[[CONVI]])
+// CHECK:    ret <4 x float> [[V3]]
 float4 test_cosh_double4 ( double4 p0 ) {
   return cosh ( p0 );
 }
 
-// CHECK-LABEL: test_cosh_int
-// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.cosh.f32
+// CHECK: define [[FNATTRS]] float @_Z13test_cosh_inti(
+// CHECK:    [[CONVI:%.*]] = sitofp i32 %{{.*}} to float
+// CHECK:    [[V3:%.*]] = call {{.*}} float @llvm.cosh.f32(float [[CONVI]])
+// CHECK:    ret float [[V3]]
 float test_cosh_int ( int p0 ) {
   return cosh ( p0 );
 }
 
-// CHECK-LABEL: test_cosh_int2
-// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.cosh.v2f32
+// CHECK: define [[FNATTRS]] <2 x float> @_Z14test_cosh_int2Dv2_i(
+// CHECK:    [[CONVI:%.*]] = sitofp <2 x i32> %{{.*}} to <2 x float>
+// CHECK:    [[V3:%.*]] = call {{.*}} <2 x float> @llvm.cosh.v2f32(<2 x float> 
[[CONVI]])
+// CHECK:    ret <2 x float> [[V3]]
 float2 test_cosh_int2 ( int2 p0 ) {
   return cosh ( p0 );
 }
 
-// CHECK-LABEL: test_cosh_int3
-// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.cosh.v3f32
+// CHECK: define [[FNATTRS]] <3 x float> @_Z14test_cosh_int3Dv3_i(
+// CHECK:    [[CONVI:%.*]] = sitofp <3 x i32> %{{.*}} to <3 x float>
+// CHECK:    [[V3:%.*]] = call {{.*}} <3 x float> @llvm.cosh.v3f32(<3 x float> 
[[CONVI]])
+// CHECK:    ret <3 x float> [[V3]]
 float3 test_cosh_int3 ( int3 p0 ) {
   return cosh ( p0 );
 }
 
-// CHECK-LABEL: test_cosh_int4
-// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.cosh.v4f32
+// CHECK: define [[FNATTRS]] <4 x float> @_Z14test_cosh_int4Dv4_i(
+// CHECK:    [[CONVI:%.*]] = sitofp <4 x i32> %{{.*}} to <4 x float>
+// CHECK:    [[V3:%.*]] = call {{.*}} <4 x float> @llvm.cosh.v4f32(<4 x float> 
[[CONVI]])
+// CHECK:    ret <4 x float> [[V3]]
 float4 test_cosh_int4 ( int4 p0 ) {
   return cosh ( p0 );
 }
 
-// CHECK-LABEL: test_cosh_uint
-// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.cosh.f32
+// CHECK: define [[FNATTRS]] float @_Z14test_cosh_uintj(
+// CHECK:    [[CONVI:%.*]] = uitofp i32 %{{.*}} to float
+// CHECK:    [[V3:%.*]] = call {{.*}} float @llvm.cosh.f32(float [[CONVI]])
+// CHECK:    ret float [[V3]]
 float test_cosh_uint ( uint p0 ) {
   return cosh ( p0 );
 }
 
-// CHECK-LABEL: test_cosh_uint2
-// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.cosh.v2f32
+// CHECK: define [[FNATTRS]] <2 x float> @_Z15test_cosh_uint2Dv2_j(
+// CHECK:    [[CONVI:%.*]] = uitofp <2 x i32> %{{.*}} to <2 x float>
+// CHECK:    [[V3:%.*]] = call {{.*}} <2 x float> @llvm.cosh.v2f32(<2 x float> 
[[CONVI]])
+// CHECK:    ret <2 x float> [[V3]]
 float2 test_cosh_uint2 ( uint2 p0 ) {
   return cosh ( p0 );
 }
 
-// CHECK-LABEL: test_cosh_uint3
-// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.cosh.v3f32
+// CHECK: define [[FNATTRS]] <3 x float> @_Z15test_cosh_uint3Dv3_j(
+// CHECK:    [[CONVI:%.*]] = uitofp <3 x i32> %{{.*}} to <3 x float>
+// CHECK:    [[V3:%.*]] = call {{.*}} <3 x float> @llvm.cosh.v3f32(<3 x float> 
[[CONVI]])
+// CHECK:    ret <3 x float> [[V3]]
 float3 test_cosh_uint3 ( uint3 p0 ) {
   return cosh ( p0 );
 }
 
-// CHECK-LABEL: test_cosh_uint4
-// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.cosh.v4f32
+// CHECK: define [[FNATTRS]] <4 x float> @_Z15test_cosh_uint4Dv4_j(
+// CHECK:    [[CONVI:%.*]] = uitofp <4 x i32> %{{.*}} to <4 x float>
+// CHECK:    [[V3:%.*]] = call {{.*}} <4 x float> @llvm.cosh.v4f32(<4 x float> 
[[CONVI]])
+// CHECK:    ret <4 x float> [[V3]]
 float4 test_cosh_uint4 ( uint4 p0 ) {
   return cosh ( p0 );
 }
 
-// CHECK-LABEL: test_cosh_int64_t
-// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.cosh.f32
+// CHECK: define [[FNATTRS]] float @_Z17test_cosh_int64_tl(
+// CHECK:    [[CONVI:%.*]] = sitofp i64 %{{.*}} to float
+// CHECK:    [[V3:%.*]] = call {{.*}} float @llvm.cosh.f32(float [[CONVI]])
+// CHECK:    ret float [[V3]]
 float test_cosh_int64_t ( int64_t p0 ) {
   return cosh ( p0 );
 }
 
-// CHECK-LABEL: test_cosh_int64_t2
-// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.cosh.v2f32
+// CHECK: define [[FNATTRS]] <2 x float> @_Z18test_cosh_int64_t2Dv2_l(
+// CHECK:    [[CONVI:%.*]] = sitofp <2 x i64> %{{.*}} to <2 x float>
+// CHECK:    [[V3:%.*]] = call {{.*}} <2 x float> @llvm.cosh.v2f32(<2 x float> 
[[CONVI]])
+// CHECK:    ret <2 x float> [[V3]]
 float2 test_cosh_int64_t2 ( int64_t2 p0 ) {
   return cosh ( p0 );
 }
 
-// CHECK-LABEL: test_cosh_int64_t3
-// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.cosh.v3f32
+// CHECK: define [[FNATTRS]] <3 x float> @_Z18test_cosh_int64_t3Dv3_l(
+// CHECK:    [[CONVI:%.*]] = sitofp <3 x i64> %{{.*}} to <3 x float>
+// CHECK:    [[V3:%.*]] = call {{.*}} <3 x float> @llvm.cosh.v3f32(<3 x float> 
[[CONVI]])
+// CHECK:    ret <3 x float> [[V3]]
 float3 test_cosh_int64_t3 ( int64_t3 p0 ) {
   return cosh ( p0 );
 }
 
-// CHECK-LABEL: test_cosh_int64_t4
-// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.cosh.v4f32
+// CHECK: define [[FNATTRS]] <4 x float> @_Z18test_cosh_int64_t4Dv4_l(
+// CHECK:    [[CONVI:%.*]] = sitofp <4 x i64> %{{.*}} to <4 x float>
+// CHECK:    [[V3:%.*]] = call {{.*}} <4 x float> @llvm.cosh.v4f32(<4 x float> 
[[CONVI]])
+// CHECK:    ret <4 x float> [[V3]]
 float4 test_cosh_int64_t4 ( int64_t4 p0 ) {
   return cosh ( p0 );
 }
 
-// CHECK-LABEL: test_cosh_uint64_t
-// CHECK: call reassoc nnan ninf nsz arcp afn float @llvm.cosh.f32
+// CHECK: define [[FNATTRS]] float @_Z18test_cosh_uint64_tm(
+// CHECK:    [[CONVI:%.*]] = uitofp i64 %{{.*}} to float
+// CHECK:    [[V3:%.*]] = call {{.*}} float @llvm.cosh.f32(float [[CONVI]])
+// CHECK:    ret float [[V3]]
 float test_cosh_uint64_t ( uint64_t p0 ) {
   return cosh ( p0 );
 }
 
-// CHECK-LABEL: test_cosh_uint64_t2
-// CHECK: call reassoc nnan ninf nsz arcp afn <2 x float> @llvm.cosh.v2f32
+// CHECK: define [[FNATTRS]] <2 x float> @_Z19test_cosh_uint64_t2Dv2_m(
+// CHECK:    [[CONVI:%.*]] = uitofp <2 x i64> %{{.*}} to <2 x float>
+// CHECK:    [[V3:%.*]] = call {{.*}} <2 x float> @llvm.cosh.v2f32(<2 x float> 
[[CONVI]])
+// CHECK:    ret <2 x float> [[V3]]
 float2 test_cosh_uint64_t2 ( uint64_t2 p0 ) {
   return cosh ( p0 );
 }
 
-// CHECK-LABEL: test_cosh_uint64_t3
-// CHECK: call reassoc nnan ninf nsz arcp afn <3 x float> @llvm.cosh.v3f32
+// CHECK: define [[FNATTRS]] <3 x float> @_Z19test_cosh_uint64_t3Dv3_m(
+// CHECK:    [[CONVI:%.*]] = uitofp <3 x i64> %{{.*}} to <3 x float>
+// CHECK:    [[V3:%.*]] = call {{.*}} <3 x float> @llvm.cosh.v3f32(<3 x float> 
[[CONVI]])
+// CHECK:    ret <3 x float> [[V3]]
 float3 test_cosh_uint64_t3 ( uint64_t3 p0 ) {
   return cosh ( p0 );
 }
 
-// CHECK-LABEL: test_cosh_uint64_t4
-// CHECK: call reassoc nnan ninf nsz arcp afn <4 x float> @llvm.cosh.v4f32
+// CHECK: define [[FNATTRS]] <4 x float> @_Z19test_cosh_uint64_t4Dv4_m(
+// CHECK:    [[CONVI:%.*]] = uitofp <4 x i64> %{{.*}} to <4 x float>
+// CHECK:    [[V3:%.*]] = call {{.*}} <4 x float> @llvm.cosh.v4f32(<4 x float> 
[[CONVI]])
+// CHECK:    ret <4 x float> [[V3]]
 float4 test_cosh_uint64_t4 ( uint64_t4 p0 ) {
   return cosh ( p0 );
 }
diff --git a/clang/test/CodeGenHLSL/builtins/exp-overloads.hlsl 
b/clang/test/CodeGenHLSL/builtins/exp-overloads.hlsl
index c22f012421e3a..3c1bab0ddbc2d 100644
--- a/clang/test/CodeGenHLSL/builtins/exp-overloads.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/exp-overloads.hlsl
@@ -1,88 +1,108 @@
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -triple 
dxil-pc-shadermodel6.3-library %s \
-// RUN:  -emit-llvm -disable-llvm-passes -o - | \
-// RUN:  FileCheck %s --check-prefixes=CHECK
+// RUN:  -emit-llvm -o - | \
+// RUN:  FileCheck %s --check-prefixes=CHECK -DFNATTRS="hidden noundef 
nofpclass(nan inf)"
 
-// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float 
{{.*}}test_exp_double
-// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn float 
@llvm.exp.f32(
-// CHECK: ret float [[EXP]]
+// CHECK: define [[FNATTRS]] float @_Z15test_exp_doubled(
+// CHECK:    [[CONVI:%.*]] = fptrunc {{.*}} double %{{.*}} to float
+// CHECK:    [[V2:%.*]] = call {{.*}} float @llvm.exp.f32(float [[CONVI]])
+// CHECK:    ret float [[V2]]
 float test_exp_double(double p0) { return exp(p0); }
-// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> 
{{.*}}test_exp_double2
-// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <2 x float> 
@llvm.exp.v2f32
-// CHECK: ret <2 x float> [[EXP]]
+// CHECK: define [[FNATTRS]] <2 x float> @_Z16test_exp_double2Dv2_d(
+// CHECK:    [[CONVI:%.*]] = fptrunc {{.*}} <2 x double> %{{.*}} to <2 x float>
+// CHECK:    [[V2:%.*]] = call {{.*}} <2 x float> @llvm.exp.v2f32(<2 x float> 
[[CONVI]])
+// CHECK:    ret <2 x float> [[V2]]
 float2 test_exp_double2(double2 p0) { return exp(p0); }
-// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> 
{{.*}}test_exp_double3
-// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <3 x float> 
@llvm.exp.v3f32
-// CHECK: ret <3 x float> [[EXP]]
+// CHECK: define [[FNATTRS]] <3 x float> @_Z16test_exp_double3Dv3_d(
+// CHECK:    [[CONVI:%.*]] = fptrunc {{.*}} <3 x double> %{{.*}} to <3 x float>
+// CHECK:    [[V2:%.*]] = call {{.*}} <3 x float> @llvm.exp.v3f32(<3 x float> 
[[CONVI]])
+// CHECK:    ret <3 x float> [[V2]]
 float3 test_exp_double3(double3 p0) { return exp(p0); }
-// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> 
{{.*}}test_exp_double4
-// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <4 x float> 
@llvm.exp.v4f32
-// CHECK: ret <4 x float> [[EXP]]
+// CHECK: define [[FNATTRS]] <4 x float> @_Z16test_exp_double4Dv4_d(
+// CHECK:    [[CONVI:%.*]] = fptrunc {{.*}} <4 x double> %{{.*}} to <4 x float>
+// CHECK:    [[V2:%.*]] = call {{.*}} <4 x float> @llvm.exp.v4f32(<4 x float> 
[[CONVI]])
+// CHECK:    ret <4 x float> [[V2]]
 float4 test_exp_double4(double4 p0) { return exp(p0); }
 
-// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float 
{{.*}}test_exp_int
-// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn float 
@llvm.exp.f32(
-// CHECK: ret float [[EXP]]
+// CHECK: define [[FNATTRS]] float @_Z12test_exp_inti(
+// CHECK:    [[CONVI:%.*]] = sitofp i32 %{{.*}} to float
+// CHECK:    [[V2:%.*]] = call {{.*}} float @llvm.exp.f32(float [[CONVI]])
+// CHECK:    ret float [[V2]]
 float test_exp_int(int p0) { return exp(p0); }
-// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> 
{{.*}}test_exp_int2
-// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <2 x float> 
@llvm.exp.v2f32
-// CHECK: ret <2 x float> [[EXP]]
+// CHECK: define [[FNATTRS]] <2 x float> @_Z13test_exp_int2Dv2_i(
+// CHECK:    [[CONVI:%.*]] = sitofp <2 x i32> %{{.*}} to <2 x float>
+// CHECK:    [[V2:%.*]] = call {{.*}} <2 x float> @llvm.exp.v2f32(<2 x float> 
[[CONVI]])
+// CHECK:    ret <2 x float> [[V2]]
 float2 test_exp_int2(int2 p0) { return exp(p0); }
-// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> 
{{.*}}test_exp_int3
-// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <3 x float> 
@llvm.exp.v3f32
-// CHECK: ret <3 x float> [[EXP]]
+// CHECK: define [[FNATTRS]] <3 x float> @_Z13test_exp_int3Dv3_i(
+// CHECK:    [[CONVI:%.*]] = sitofp <3 x i32> %{{.*}} to <3 x float>
+// CHECK:    [[V2:%.*]] = call {{.*}} <3 x float> @llvm.exp.v3f32(<3 x float> 
[[CONVI]])
+// CHECK:    ret <3 x float> [[V2]]
 float3 test_exp_int3(int3 p0) { return exp(p0); }
-// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> 
{{.*}}test_exp_int4
-// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <4 x float> 
@llvm.exp.v4f32
-// CHECK: ret <4 x float> [[EXP]]
+// CHECK: define [[FNATTRS]] <4 x float> @_Z13test_exp_int4Dv4_i(
+// CHECK:    [[CONVI:%.*]] = sitofp <4 x i32> %{{.*}} to <4 x float>
+// CHECK:    [[V2:%.*]] = call {{.*}} <4 x float> @llvm.exp.v4f32(<4 x float> 
[[CONVI]])
+// CHECK:    ret <4 x float> [[V2]]
 float4 test_exp_int4(int4 p0) { return exp(p0); }
 
-// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float 
{{.*}}test_exp_uint
-// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn float 
@llvm.exp.f32(
-// CHECK: ret float [[EXP]]
+// CHECK: define [[FNATTRS]] float @_Z13test_exp_uintj(
+// CHECK:    [[CONVI:%.*]] = uitofp i32 %{{.*}} to float
+// CHECK:    [[V2:%.*]] = call {{.*}} float @llvm.exp.f32(float [[CONVI]])
+// CHECK:    ret float [[V2]]
 float test_exp_uint(uint p0) { return exp(p0); }
-// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> 
{{.*}}test_exp_uint2
-// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <2 x float> 
@llvm.exp.v2f32
-// CHECK: ret <2 x float> [[EXP]]
+// CHECK: define [[FNATTRS]] <2 x float> @_Z14test_exp_uint2Dv2_j(
+// CHECK:    [[CONVI:%.*]] = uitofp <2 x i32> %{{.*}} to <2 x float>
+// CHECK:    [[V2:%.*]] = call {{.*}} <2 x float> @llvm.exp.v2f32(<2 x float> 
[[CONVI]])
+// CHECK:    ret <2 x float> [[V2]]
 float2 test_exp_uint2(uint2 p0) { return exp(p0); }
-// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> 
{{.*}}test_exp_uint3
-// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <3 x float> 
@llvm.exp.v3f32
-// CHECK: ret <3 x float> [[EXP]]
+// CHECK: define [[FNATTRS]] <3 x float> @_Z14test_exp_uint3Dv3_j(
+// CHECK:    [[CONVI:%.*]] = uitofp <3 x i32> %{{.*}} to <3 x float>
+// CHECK:    [[V2:%.*]] = call {{.*}} <3 x float> @llvm.exp.v3f32(<3 x float> 
[[CONVI]])
+// CHECK:    ret <3 x float> [[V2]]
 float3 test_exp_uint3(uint3 p0) { return exp(p0); }
-// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> 
{{.*}}test_exp_uint4
-// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <4 x float> 
@llvm.exp.v4f32
-// CHECK: ret <4 x float> [[EXP]]
+// CHECK: define [[FNATTRS]] <4 x float> @_Z14test_exp_uint4Dv4_j(
+// CHECK:    [[CONVI:%.*]] = uitofp <4 x i32> %{{.*}} to <4 x float>
+// CHECK:    [[V2:%.*]] = call {{.*}} <4 x float> @llvm.exp.v4f32(<4 x float> 
[[CONVI]])
+// CHECK:    ret <4 x float> [[V2]]
 float4 test_exp_uint4(uint4 p0) { return exp(p0); }
 
-// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float 
{{.*}}test_exp_int64_t
-// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn float 
@llvm.exp.f32(
-// CHECK: ret float [[EXP]]
+// CHECK: define [[FNATTRS]] float @_Z16test_exp_int64_tl(
+// CHECK:    [[CONVI:%.*]] = sitofp i64 %{{.*}} to float
+// CHECK:    [[V2:%.*]] = call {{.*}} float @llvm.exp.f32(float [[CONVI]])
+// CHECK:    ret float [[V2]]
 float test_exp_int64_t(int64_t p0) { return exp(p0); }
-// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> 
{{.*}}test_exp_int64_t2
-// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <2 x float> 
@llvm.exp.v2f32
-// CHECK: ret <2 x float> [[EXP]]
+// CHECK: define [[FNATTRS]] <2 x float> @_Z17test_exp_int64_t2Dv2_l(
+// CHECK:    [[CONVI:%.*]] = sitofp <2 x i64> %{{.*}} to <2 x float>
+// CHECK:    [[V2:%.*]] = call {{.*}} <2 x float> @llvm.exp.v2f32(<2 x float> 
[[CONVI]])
+// CHECK:    ret <2 x float> [[V2]]
 float2 test_exp_int64_t2(int64_t2 p0) { return exp(p0); }
-// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> 
{{.*}}test_exp_int64_t3
-// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <3 x float> 
@llvm.exp.v3f32
-// CHECK: ret <3 x float> [[EXP]]
+// CHECK: define [[FNATTRS]] <3 x float> @_Z17test_exp_int64_t3Dv3_l(
+// CHECK:    [[CONVI:%.*]] = sitofp <3 x i64> %{{.*}} to <3 x float>
+// CHECK:    [[V2:%.*]] = call {{.*}} <3 x float> @llvm.exp.v3f32(<3 x float> 
[[CONVI]])
+// CHECK:    ret <3 x float> [[V2]]
 float3 test_exp_int64_t3(int64_t3 p0) { return exp(p0); }
-// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> 
{{.*}}test_exp_int64_t4
-// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <4 x float> 
@llvm.exp.v4f32
-// CHECK: ret <4 x float> [[EXP]]
+// CHECK: define [[FNATTRS]] <4 x float> @_Z17test_exp_int64_t4Dv4_l(
+// CHECK:    [[CONVI:%.*]] = sitofp <4 x i64> %{{.*}} to <4 x float>
+// CHECK:    [[V2:%.*]] = call {{.*}} <4 x float> @llvm.exp.v4f32(<4 x float> 
[[CONVI]])
+// CHECK:    ret <4 x float> [[V2]]
 float4 test_exp_int64_t4(int64_t4 p0) { return exp(p0); }
 
-// CHECK-LABEL: define hidden noundef nofpclass(nan inf) float 
{{.*}}test_exp_uint64_t
-// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn float 
@llvm.exp.f32(
-// CHECK: ret float [[EXP]]
+// CHECK: define [[FNATTRS]] float @_Z17test_exp_uint64_tm(
+// CHECK:    [[CONVI:%.*]] = uitofp i64 %{{.*}} to float
+// CHECK:    [[V2:%.*]] = call {{.*}} float @llvm.exp.f32(float [[CONVI]])
+// CHECK:    ret float [[V2]]
 float test_exp_uint64_t(uint64_t p0) { return exp(p0); }
-// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <2 x float> 
{{.*}}test_exp_uint64_t2
-// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <2 x float> 
@llvm.exp.v2f32
-// CHECK: ret <2 x float> [[EXP]]
+// CHECK: define [[FNATTRS]] <2 x float> @_Z18test_exp_uint64_t2Dv2_m(
+// CHECK:    [[CONVI:%.*]] = uitofp <2 x i64> %{{.*}} to <2 x float>
+// CHECK:    [[V2:%.*]] = call {{.*}} <2 x float> @llvm.exp.v2f32(<2 x float> 
[[CONVI]])
+// CHECK:    ret <2 x float> [[V2]]
 float2 test_exp_uint64_t2(uint64_t2 p0) { return exp(p0); }
-// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <3 x float> 
{{.*}}test_exp_uint64_t3
-// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <3 x float> 
@llvm.exp.v3f32
-// CHECK: ret <3 x float> [[EXP]]
+// CHECK: define [[FNATTRS]] <3 x float> @_Z18test_exp_uint64_t3Dv3_m(
+// CHECK:    [[CONVI:%.*]] = uitofp <3 x i64> %{{.*}} to <3 x float>
+// CHECK:    [[V2:%.*]] = call {{.*}} <3 x float> @llvm.exp.v3f32(<3 x float> 
[[CONVI]])
+// CHECK:    ret <3 x float> [[V2]]
 float3 test_exp_uint64_t3(uint64_t3 p0) { return exp(p0); }
-// CHECK-LABEL: define hidden noundef nofpclass(nan inf) <4 x float> 
{{.*}}test_exp_uint64_t4
-// CHECK: [[EXP:%.*]] = call reassoc nnan ninf nsz arcp afn <4 x float> 
@llvm.exp.v4f32
-// CHECK: ret <4 x float> [[EXP]]
+// CHECK: define [[FNATTRS]] <4 x float> @_Z18test_exp_uint64_t4Dv4_m(
+// CHECK:    [[CONVI:%.*]] = uitofp <4 x i64> %{{.*}} to <4 x float>
+// CHECK:    [[V2:%.*]] = call {{.*}} <4 x float> @llvm.exp.v4f32(<4 x float> 
[[CONVI]])
+// CHECK:    ret <4 x float> [[V2]]
 float4 test_exp_uint64_t4(uint64_t4 p0) { return exp(p0); }
diff --git a/clang/test/CodeGenHLSL/builtins/normalize-overloads.hlsl 
b/clang/test/CodeGenHLSL/builtins/normalize-overloads.hlsl
index adaf69d994078..cfb2c4da3a97f 100644
--- a/clang/test/CodeGenHLSL/builtins/normalize-overloads.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/normalize-overloads.hlsl
@@ -1,155 +1,175 @@
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
-// RUN:   dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
+// RUN:   dxil-pc-shadermodel6.3-library %s -emit-llvm \
 // RUN:   -o - | FileCheck %s --check-prefixes=CHECK \
 // RUN:   -DFNATTRS="hidden noundef nofpclass(nan inf)" -DTARGET=dx
 // RUN: %clang_cc1 -std=hlsl202x -finclude-default-header -x hlsl -triple \
-// RUN:   spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \
+// RUN:   spirv-unknown-vulkan-compute %s -emit-llvm \
 // RUN:   -o - | FileCheck %s --check-prefixes=CHECK \
 // RUN:   -DFNATTRS="hidden spir_func noundef nofpclass(nan inf)" -DTARGET=spv
 
-// CHECK: define [[FNATTRS]] float @
-// CHECK: call reassoc nnan ninf nsz arcp afn float 
@llvm.[[TARGET]].normalize.f32(float
-// CHECK: ret float
+// CHECK: define [[FNATTRS]] float @_Z21test_normalize_doubled(
+// CHECK:    [[CONVI:%.*]] = fptrunc {{.*}} double %{{.*}} to float
+// CHECK:    [[HLSLNORMALIZEI:%.*]] = call {{.*}} float 
@llvm.[[TARGET]].normalize.f32(float [[CONVI]])
+// CHECK:    ret float [[HLSLNORMALIZEI]]
 float test_normalize_double(double p0)
 {
     return normalize(p0);
 }
-// CHECK: define [[FNATTRS]] <2 x float> @
-// CHECK: %hlsl.normalize = call reassoc nnan ninf nsz arcp afn <2 x float> 
@llvm.[[TARGET]].normalize.v2f32(<2 x float>
-// CHECK: ret <2 x float> %hlsl.normalize
+// CHECK: define [[FNATTRS]] <2 x float> @_Z22test_normalize_double2Dv2_d(
+// CHECK:    [[CONVI:%.*]] = fptrunc {{.*}} <2 x double> %{{.*}} to <2 x float>
+// CHECK:    [[HLSLNORMALIZEI:%.*]] = call {{.*}} <2 x float> 
@llvm.[[TARGET]].normalize.v2f32(<2 x float> [[CONVI]])
+// CHECK:    ret <2 x float> [[HLSLNORMALIZEI]]
 float2 test_normalize_double2(double2 p0)
 {
     return normalize(p0);
 }
-// CHECK: define [[FNATTRS]] <3 x float> @
-// CHECK: %hlsl.normalize = call reassoc nnan ninf nsz arcp afn <3 x float> 
@llvm.[[TARGET]].normalize.v3f32(
-// CHECK: ret <3 x float> %hlsl.normalize
+// CHECK: define [[FNATTRS]] <3 x float> @_Z22test_normalize_double3Dv3_d(
+// CHECK:    [[CONVI:%.*]] = fptrunc {{.*}} <3 x double> %{{.*}} to <3 x float>
+// CHECK:    [[HLSLNORMALIZEI:%.*]] = call {{.*}} <3 x float> 
@llvm.[[TARGET]].normalize.v3f32(<3 x float> [[CONVI]])
+// CHECK:    ret <3 x float> [[HLSLNORMALIZEI]]
 float3 test_normalize_double3(double3 p0)
 {
     return normalize(p0);
 }
-// CHECK: define [[FNATTRS]] <4 x float> @
-// CHECK: %hlsl.normalize = call reassoc nnan ninf nsz arcp afn <4 x float> 
@llvm.[[TARGET]].normalize.v4f32(
-// CHECK: ret <4 x float> %hlsl.normalize
+// CHECK: define [[FNATTRS]] <4 x float> @_Z19test_length_double4Dv4_d(
+// CHECK:    [[CONVI:%.*]] = fptrunc {{.*}} <4 x double> %{{.*}} to <4 x float>
+// CHECK:    [[HLSLNORMALIZEI:%.*]] = call {{.*}} <4 x float> 
@llvm.[[TARGET]].normalize.v4f32(<4 x float> [[CONVI]])
+// CHECK:    ret <4 x float> [[HLSLNORMALIZEI]]
 float4 test_length_double4(double4 p0)
 {
     return normalize(p0);
 }
 
-// CHECK: define [[FNATTRS]] float @
-// CHECK: call reassoc nnan ninf nsz arcp afn float 
@llvm.[[TARGET]].normalize.f32(float
-// CHECK: ret float
+// CHECK: define [[FNATTRS]] float @_Z18test_normalize_inti(
+// CHECK:    [[CONVI:%.*]] = sitofp i32 %{{.*}} to float
+// CHECK:    [[HLSLNORMALIZEI:%.*]] = call {{.*}} float 
@llvm.[[TARGET]].normalize.f32(float [[CONVI]])
+// CHECK:    ret float [[HLSLNORMALIZEI]]
 float test_normalize_int(int p0)
 {
     return normalize(p0);
 }
-// CHECK: define [[FNATTRS]] <2 x float> @
-// CHECK: %hlsl.normalize = call reassoc nnan ninf nsz arcp afn <2 x float> 
@llvm.[[TARGET]].normalize.v2f32(<2 x float>
-// CHECK: ret <2 x float> %hlsl.normalize
+// CHECK: define [[FNATTRS]] <2 x float> @_Z19test_normalize_int2Dv2_i(
+// CHECK:    [[CONVI:%.*]] = sitofp <2 x i32> %{{.*}} to <2 x float>
+// CHECK:    [[HLSLNORMALIZEI:%.*]] = call {{.*}} <2 x float> 
@llvm.[[TARGET]].normalize.v2f32(<2 x float> [[CONVI]])
+// CHECK:    ret <2 x float> [[HLSLNORMALIZEI]]
 float2 test_normalize_int2(int2 p0)
 {
     return normalize(p0);
 }
-// CHECK: define [[FNATTRS]] <3 x float> @
-// CHECK: %hlsl.normalize = call reassoc nnan ninf nsz arcp afn <3 x float> 
@llvm.[[TARGET]].normalize.v3f32(
-// CHECK: ret <3 x float> %hlsl.normalize
+// CHECK: define [[FNATTRS]] <3 x float> @_Z19test_normalize_int3Dv3_i(
+// CHECK:    [[CONVI:%.*]] = sitofp <3 x i32> %{{.*}} to <3 x float>
+// CHECK:    [[HLSLNORMALIZEI:%.*]] = call {{.*}} <3 x float> 
@llvm.[[TARGET]].normalize.v3f32(<3 x float> [[CONVI]])
+// CHECK:    ret <3 x float> [[HLSLNORMALIZEI]]
 float3 test_normalize_int3(int3 p0)
 {
     return normalize(p0);
 }
-// CHECK: define [[FNATTRS]] <4 x float> @
-// CHECK: %hlsl.normalize = call reassoc nnan ninf nsz arcp afn <4 x float> 
@llvm.[[TARGET]].normalize.v4f32(
-// CHECK: ret <4 x float> %hlsl.normalize
+// CHECK: define [[FNATTRS]] <4 x float> @_Z16test_length_int4Dv4_i(
+// CHECK:    [[CONVI:%.*]] = sitofp <4 x i32> %{{.*}} to <4 x float>
+// CHECK:    [[HLSLNORMALIZEI:%.*]] = call {{.*}} <4 x float> 
@llvm.[[TARGET]].normalize.v4f32(<4 x float> [[CONVI]])
+// CHECK:    ret <4 x float> [[HLSLNORMALIZEI]]
 float4 test_length_int4(int4 p0)
 {
     return normalize(p0);
 }
 
-// CHECK: define [[FNATTRS]] float @
-// CHECK: call reassoc nnan ninf nsz arcp afn float 
@llvm.[[TARGET]].normalize.f32(float
-// CHECK: ret float
+// CHECK: define [[FNATTRS]] float @_Z19test_normalize_uintj(
+// CHECK:    [[CONVI:%.*]] = uitofp i32 %{{.*}} to float
+// CHECK:    [[HLSLNORMALIZEI:%.*]] = call {{.*}} float 
@llvm.[[TARGET]].normalize.f32(float [[CONVI]])
+// CHECK:    ret float [[HLSLNORMALIZEI]]
 float test_normalize_uint(uint p0)
 {
     return normalize(p0);
 }
-// CHECK: define [[FNATTRS]] <2 x float> @
-// CHECK: %hlsl.normalize = call reassoc nnan ninf nsz arcp afn <2 x float> 
@llvm.[[TARGET]].normalize.v2f32(<2 x float>
 
-// CHECK: ret <2 x float> %hlsl.normalize
+// CHECK: define [[FNATTRS]] <2 x float> @_Z20test_normalize_uint2Dv2_j(
+// CHECK:    [[CONVI:%.*]] = uitofp <2 x i32> %{{.*}} to <2 x float>
+// CHECK:    [[HLSLNORMALIZEI:%.*]] = call {{.*}} <2 x float> 
@llvm.[[TARGET]].normalize.v2f32(<2 x float> [[CONVI]])
+// CHECK:    ret <2 x float> [[HLSLNORMALIZEI]]
 float2 test_normalize_uint2(uint2 p0)
 {
     return normalize(p0);
 }
-// CHECK: define [[FNATTRS]] <3 x float> @
-// CHECK: %hlsl.normalize = call reassoc nnan ninf nsz arcp afn <3 x float> 
@llvm.[[TARGET]].normalize.v3f32(
-// CHECK: ret <3 x float> %hlsl.normalize
+// CHECK: define [[FNATTRS]] <3 x float> @_Z20test_normalize_uint3Dv3_j(
+// CHECK:    [[CONVI:%.*]] = uitofp <3 x i32> %{{.*}} to <3 x float>
+// CHECK:    [[HLSLNORMALIZEI:%.*]] = call {{.*}} <3 x float> 
@llvm.[[TARGET]].normalize.v3f32(<3 x float> [[CONVI]])
+// CHECK:    ret <3 x float> [[HLSLNORMALIZEI]]
 float3 test_normalize_uint3(uint3 p0)
 {
     return normalize(p0);
 }
-// CHECK: define [[FNATTRS]] <4 x float> @
-// CHECK: %hlsl.normalize = call reassoc nnan ninf nsz arcp afn <4 x float> 
@llvm.[[TARGET]].normalize.v4f32(
-// CHECK: ret <4 x float> %hlsl.normalize
+// CHECK: define [[FNATTRS]] <4 x float> @_Z17test_length_uint4Dv4_j(
+// CHECK:    [[CONVI:%.*]] = uitofp <4 x i32> %{{.*}} to <4 x float>
+// CHECK:    [[HLSLNORMALIZEI:%.*]] = call {{.*}} <4 x float> 
@llvm.[[TARGET]].normalize.v4f32(<4 x float> [[CONVI]])
+// CHECK:    ret <4 x float> [[HLSLNORMALIZEI]]
 float4 test_length_uint4(uint4 p0)
 {
     return normalize(p0);
 }
 
-// CHECK: define [[FNATTRS]] float @
-// CHECK: call reassoc nnan ninf nsz arcp afn float 
@llvm.[[TARGET]].normalize.f32(float
-// CHECK: ret float
+// CHECK: define [[FNATTRS]] float @_Z22test_normalize_int64_tl(
+// CHECK:    [[CONVI:%.*]] = sitofp i64 %{{.*}} to float
+// CHECK:    [[HLSLNORMALIZEI:%.*]] = call {{.*}} float 
@llvm.[[TARGET]].normalize.f32(float [[CONVI]])
+// CHECK:    ret float [[HLSLNORMALIZEI]]
 float test_normalize_int64_t(int64_t p0)
 {
     return normalize(p0);
 }
-// CHECK: define [[FNATTRS]] <2 x float> @
-// CHECK: %hlsl.normalize = call reassoc nnan ninf nsz arcp afn <2 x float> 
@llvm.[[TARGET]].normalize.v2f32(<2 x float>
 
-// CHECK: ret <2 x float> %hlsl.normalize
+// CHECK: define [[FNATTRS]] <2 x float> @_Z23test_normalize_int64_t2Dv2_l(
+// CHECK:    [[CONVI:%.*]] = sitofp <2 x i64> %{{.*}} to <2 x float>
+// CHECK:    [[HLSLNORMALIZEI:%.*]] = call {{.*}} <2 x float> 
@llvm.[[TARGET]].normalize.v2f32(<2 x float> [[CONVI]])
+// CHECK:    ret <2 x float> [[HLSLNORMALIZEI]]
 float2 test_normalize_int64_t2(int64_t2 p0)
 {
     return normalize(p0);
 }
-// CHECK: define [[FNATTRS]] <3 x float> @
-// CHECK: %hlsl.normalize = call reassoc nnan ninf nsz arcp afn <3 x float> 
@llvm.[[TARGET]].normalize.v3f32(
-// CHECK: ret <3 x float> %hlsl.normalize
+// CHECK: define [[FNATTRS]] <3 x float> @_Z23test_normalize_int64_t3Dv3_l(
+// CHECK:    [[CONVI:%.*]] = sitofp <3 x i64> %{{.*}} to <3 x float>
+// CHECK:    [[HLSLNORMALIZEI:%.*]] = call {{.*}} <3 x float> 
@llvm.[[TARGET]].normalize.v3f32(<3 x float> [[CONVI]])
+// CHECK:    ret <3 x float> [[HLSLNORMALIZEI]]
 float3 test_normalize_int64_t3(int64_t3 p0)
 {
     return normalize(p0);
 }
-// CHECK: define [[FNATTRS]] <4 x float> @
-// CHECK: %hlsl.normalize = call reassoc nnan ninf nsz arcp afn <4 x float> 
@llvm.[[TARGET]].normalize.v4f32(
-// CHECK: ret <4 x float> %hlsl.normalize
+// CHECK: define [[FNATTRS]] <4 x float> @_Z20test_length_int64_t4Dv4_l(
+// CHECK:    [[CONVI:%.*]] = sitofp <4 x i64> %{{.*}} to <4 x float>
+// CHECK:    [[HLSLNORMALIZEI:%.*]] = call {{.*}} <4 x float> 
@llvm.[[TARGET]].normalize.v4f32(<4 x float> [[CONVI]])
+// CHECK:    ret <4 x float> [[HLSLNORMALIZEI]]
 float4 test_length_int64_t4(int64_t4 p0)
 {
     return normalize(p0);
 }
 
-// CHECK: define [[FNATTRS]] float @
-// CHECK: call reassoc nnan ninf nsz arcp afn float 
@llvm.[[TARGET]].normalize.f32(float
-// CHECK: ret float
+// CHECK: define [[FNATTRS]] float @_Z23test_normalize_uint64_tm(
+// CHECK:    [[CONVI:%.*]] = uitofp i64 %{{.*}} to float
+// CHECK:    [[HLSLNORMALIZEI:%.*]] = call {{.*}} float 
@llvm.[[TARGET]].normalize.f32(float [[CONVI]])
+// CHECK:    ret float [[HLSLNORMALIZEI]]
 float test_normalize_uint64_t(uint64_t p0)
 {
     return normalize(p0);
 }
-// CHECK: define [[FNATTRS]] <2 x float> @
-// CHECK: %hlsl.normalize = call reassoc nnan ninf nsz arcp afn <2 x float> 
@llvm.[[TARGET]].normalize.v2f32(<2 x float>
 
-// CHECK: ret <2 x float> %hlsl.normalize
+// CHECK: define [[FNATTRS]] <2 x float> @_Z24test_normalize_uint64_t2Dv2_m(
+// CHECK:    [[CONVI:%.*]] = uitofp <2 x i64> %{{.*}} to <2 x float>
+// CHECK:    [[HLSLNORMALIZEI:%.*]] = call {{.*}} <2 x float> 
@llvm.[[TARGET]].normalize.v2f32(<2 x float> [[CONVI]])
+// CHECK:    ret <2 x float> [[HLSLNORMALIZEI]]
 float2 test_normalize_uint64_t2(uint64_t2 p0)
 {
     return normalize(p0);
 }
-// CHECK: define [[FNATTRS]] <3 x float> @
-// CHECK: %hlsl.normalize = call reassoc nnan ninf nsz arcp afn <3 x float> 
@llvm.[[TARGET]].normalize.v3f32(
-// CHECK: ret <3 x float> %hlsl.normalize
+// CHECK: define [[FNATTRS]] <3 x float> @_Z24test_normalize_uint64_t3Dv3_m(
+// CHECK:    [[CONVI:%.*]] = uitofp <3 x i64> %{{.*}} to <3 x float>
+// CHECK:    [[HLSLNORMALIZEI:%.*]] = call {{.*}} <3 x float> 
@llvm.[[TARGET]].normalize.v3f32(<3 x float> [[CONVI]])
+// CHECK:    ret <3 x float> [[HLSLNORMALIZEI]]
 float3 test_normalize_uint64_t3(uint64_t3 p0)
 {
     return normalize(p0);
 }
-// CHECK: define [[FNATTRS]] <4 x float> @
-// CHECK: %hlsl.normalize = call reassoc nnan ninf nsz arcp afn <4 x float> 
@llvm.[[TARGET]].normalize.v4f32(
-// CHECK: ret <4 x float> %hlsl.normalize
+// CHECK: define [[FNATTRS]] <4 x float> @_Z21test_length_uint64_t4Dv4_m(
+// CHECK:    [[CONVI:%.*]] = uitofp <4 x i64> %{{.*}} to <4 x float>
+// CHECK:    [[HLSLNORMALIZEI:%.*]] = call {{.*}} <4 x float> 
@llvm.[[TARGET]].normalize.v4f32(<4 x float> [[CONVI]])
+// CHECK:    ret <4 x float> [[HLSLNORMALIZEI]]
 float4 test_length_uint64_t4(uint64_t4 p0)
 {
     return normalize(p0);

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to