From fc235e11463ee14340b2d63e5d338a82cfd2efac Mon Sep 17 00:00:00 2001 From: Jinsong Ji Date: Mon, 22 Jul 2024 18:58:36 -0400 Subject: [PATCH] [SYCL][Test] Update ap_fixed test after IR change It is named var instead of number now, update the regex. After https://github.com/llvm/llvm-project/commit/9ad72df55cb74b29193270c28f6974d2af8e0b71 From: ``` %0 = load i13, ptr addrspace(4) %a.addr.ascast, align 2, !tbaa !7 %call = call spir_func signext i5 @_Z22__spirv_FixedSqrtINTELILi13ELi5EEDBT0__DBT__biiii(i13 signext %0, i1 zeroext false, i32 2, i32 2, i32 0, i32 0) #2 ``` to: ``` %0 = load i16, ptr addrspace(4) %a.addr.ascast, align 2, !tbaa !7 %loadedv = trunc i16 %0 to i13 %call = call spir_func signext i5 @_Z22__spirv_FixedSqrtINTELILi13ELi5EEDBT0__DBT__biiii(i13 signext %loadedv, i1 zeroext false, i32 2, i32 2, i32 0, i32 0) #2 ``` --- sycl/test/check_device_code/ap_fixed.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/sycl/test/check_device_code/ap_fixed.cpp b/sycl/test/check_device_code/ap_fixed.cpp index a9e29a8e16cf0..be3a90e82aed6 100644 --- a/sycl/test/check_device_code/ap_fixed.cpp +++ b/sycl/test/check_device_code/ap_fixed.cpp @@ -12,55 +12,55 @@ SYCL_EXTERNAL auto test_sqrt(sycl::detail::ap_int<13> a) { return __spirv_FixedSqrtINTEL<13, 5>(a, false, 2, 2); - // CHECK: %{{.*}} = call spir_func signext i5 @_Z[[#]]__spirv_FixedSqrtINTEL{{.*}}(i13 signext %[[#]], i1 zeroext false, i32 2, i32 2, i32 0, i32 0) + // CHECK: %{{.*}} = call spir_func signext i5 @_Z[[#]]__spirv_FixedSqrtINTEL{{.*}}(i13 signext %{{.*}}, i1 zeroext false, i32 2, i32 2, i32 0, i32 0) } SYCL_EXTERNAL auto test_recip(sycl::detail::ap_int<3> a) { return __spirv_FixedRecipINTEL<3, 8>(a, true, 4, 4); - // CHECK: %{{.*}} = call spir_func signext i8 @_Z[[#]]__spirv_FixedRecipINTEL{{.*}}(i3 signext %[[#]], i1 zeroext true, i32 4, i32 4, i32 0, i32 0) + // CHECK: %{{.*}} = call spir_func signext i8 @_Z[[#]]__spirv_FixedRecipINTEL{{.*}}(i3 signext %{{.*}}, i1 zeroext true, i32 4, i32 4, i32 0, i32 0) } SYCL_EXTERNAL auto test_rsqrt(sycl::detail::ap_int<11> a) { return __spirv_FixedRsqrtINTEL<11, 10>(a, false, 8, 6); - // CHECK: %{{.*}} = call spir_func signext i10 @_Z[[#]]__spirv_FixedRsqrtINTEL{{.*}}(i11 signext %[[#]], i1 zeroext false, i32 8, i32 6, i32 0, i32 0) + // CHECK: %{{.*}} = call spir_func signext i10 @_Z[[#]]__spirv_FixedRsqrtINTEL{{.*}}(i11 signext %{{.*}}, i1 zeroext false, i32 8, i32 6, i32 0, i32 0) } SYCL_EXTERNAL auto test_sin(sycl::detail::ap_int<17> a) { return __spirv_FixedSinINTEL<17, 11>(a, true, 7, 5); - // CHECK: %{{.*}} = call spir_func signext i11 @_Z[[#]]__spirv_FixedSinINTEL{{.*}}(i17 signext %[[#]], i1 zeroext true, i32 7, i32 5, i32 0, i32 0) + // CHECK: %{{.*}} = call spir_func signext i11 @_Z[[#]]__spirv_FixedSinINTEL{{.*}}(i17 signext %{{.*}}, i1 zeroext true, i32 7, i32 5, i32 0, i32 0) } SYCL_EXTERNAL auto test_cos(sycl::detail::ap_int<35> a) { return __spirv_FixedCosINTEL<35, 28>(a, false, 9, 3); - // CHECK: %{{.*}} = call spir_func signext i28 @_Z[[#]]__spirv_FixedCosINTEL{{.*}}(i35 %[[#]], i1 zeroext false, i32 9, i32 3, i32 0, i32 0) + // CHECK: %{{.*}} = call spir_func signext i28 @_Z[[#]]__spirv_FixedCosINTEL{{.*}}(i35 %{{.*}}, i1 zeroext false, i32 9, i32 3, i32 0, i32 0) } SYCL_EXTERNAL auto test_sin_cos(sycl::detail::ap_int<31> a) { return __spirv_FixedSinCosINTEL<31, 20>(a, true, 10, 12); - // CHECK: %{{.*}} = call spir_func i40 @_Z[[#]]__spirv_FixedSinCosINTEL{{.*}}(i31 signext %[[#]], i1 zeroext true, i32 10, i32 12, i32 0, i32 0) + // CHECK: %{{.*}} = call spir_func i40 @_Z[[#]]__spirv_FixedSinCosINTEL{{.*}}(i31 signext %{{.*}}, i1 zeroext true, i32 10, i32 12, i32 0, i32 0) } SYCL_EXTERNAL auto test_sin_pi(sycl::detail::ap_int<60> a) { return __spirv_FixedSinPiINTEL<60, 5>(a, false, 2, 2); - // CHECK: %{{.*}} = call spir_func signext i5 @_Z[[#]]__spirv_FixedSinPiINTEL{{.*}}(i60 %[[#]], i1 zeroext false, i32 2, i32 2, i32 0, i32 0) + // CHECK: %{{.*}} = call spir_func signext i5 @_Z[[#]]__spirv_FixedSinPiINTEL{{.*}}(i60 %{{.*}}, i1 zeroext false, i32 2, i32 2, i32 0, i32 0) } SYCL_EXTERNAL auto test_cos_pi(sycl::detail::ap_int<28> a) { return __spirv_FixedCosPiINTEL<28, 16>(a, false, 8, 5); - // CHECK: %{{.*}} = call spir_func signext i16 @_Z[[#]]__spirv_FixedCosPiINTEL{{.*}}(i28 signext %[[#]], i1 zeroext false, i32 8, i32 5, i32 0, i32 0) + // CHECK: %{{.*}} = call spir_func signext i16 @_Z[[#]]__spirv_FixedCosPiINTEL{{.*}}(i28 signext %{{.*}}, i1 zeroext false, i32 8, i32 5, i32 0, i32 0) } SYCL_EXTERNAL auto test_sin_cos_pi(sycl::detail::ap_int<13> a) { return __spirv_FixedSinCosPiINTEL<13, 5>(a, false, 2, 2); - // CHECK: %{{.*}} = call spir_func signext i10 @_Z[[#]]__spirv_FixedSinCosPiINTEL{{.*}}(i13 signext %[[#]], i1 zeroext false, i32 2, i32 2, i32 0, i32 0) + // CHECK: %{{.*}} = call spir_func signext i10 @_Z[[#]]__spirv_FixedSinCosPiINTEL{{.*}}(i13 signext %{{.*}}, i1 zeroext false, i32 2, i32 2, i32 0, i32 0) } SYCL_EXTERNAL auto test_log(sycl::detail::ap_int<64> a) { return __spirv_FixedLogINTEL<64, 44>(a, true, 24, 22); - // CHECK: %{{.*}} = call spir_func i44 @_Z[[#]]__spirv_FixedLogINTEL{{.*}}(i64 %[[#]], i1 zeroext true, i32 24, i32 22, i32 0, i32 0) + // CHECK: %{{.*}} = call spir_func i44 @_Z[[#]]__spirv_FixedLogINTEL{{.*}}(i64 %{{.*}}, i1 zeroext true, i32 24, i32 22, i32 0, i32 0) } SYCL_EXTERNAL auto test_exp(sycl::detail::ap_int<44> a) { return __spirv_FixedExpINTEL<44, 34>(a, false, 20, 20); - // CHECK: %{{.*}} = call spir_func i34 @_Z[[#]]__spirv_FixedExpINTEL{{.*}}(i44 %[[#]], i1 zeroext false, i32 20, i32 20, i32 0, i32 0) -} \ No newline at end of file + // CHECK: %{{.*}} = call spir_func i34 @_Z[[#]]__spirv_FixedExpINTEL{{.*}}(i44 %{{.*}}, i1 zeroext false, i32 20, i32 20, i32 0, i32 0) +}