https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/157633
>From 7e2d210d9c6cd20c342562a44c2e4d2cb238e229 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Tue, 9 Sep 2025 11:05:02 +0200
Subject: [PATCH 1/4] [libclc] Refine __clc_fp*_subnormals_supported and
__clc_flush_d
https://github.com/wenju-he edited
https://github.com/llvm/llvm-project/pull/157633
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/157633
Remove the dependency on the libclc build-time configuration for
__clc_fp*_subnormals_supported. The check is now implemented with LLVM
intrinsics so it can be resolved during target lowering or at runtime.
I
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/157633
>From 7e2d210d9c6cd20c342562a44c2e4d2cb238e229 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Tue, 9 Sep 2025 11:05:02 +0200
Subject: [PATCH 1/2] [libclc] Refine __clc_fp*_subnormals_supported and
__clc_flush_d
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/157002
>From 8390286ffa32ce98ba39cfbe313d9396ce0572fc Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Fri, 5 Sep 2025 04:47:56 +0200
Subject: [PATCH 1/2] Revert "[NFC][libclc] Move _CLC_V_V_VP_VECTORIZE macro
into clc_
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/157055
This PR reduces amdgcn--amdhsa.bc size by 3% and nvptx64--nvidiacl.bc size by
4%.
Loop trip count is constant and backend can decide whether to unroll.
>From 84fbdfea1fc1f9d7d61ef388df4d34eb2d0552d0 Mon Sep 17
https://github.com/wenju-he closed
https://github.com/llvm/llvm-project/pull/157055
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/157002
This partially reverts commit d50f2ef437aeb1784f7556fd63639487f245ffaa because
_CLC_V_V_VP_VECTORIZE is also used in our downstream code:
https://github.com/intel/llvm/blob/0433e4d6f5c9/libclc/libspirv/lib/ptx
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/157055
>From 84fbdfea1fc1f9d7d61ef388df4d34eb2d0552d0 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Fri, 5 Sep 2025 10:41:01 +0200
Subject: [PATCH 1/3] [libclc] Implement erf/erfc vector function with loop
since scal
https://github.com/wenju-he closed
https://github.com/llvm/llvm-project/pull/156778
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he edited
https://github.com/llvm/llvm-project/pull/157055
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/157055
>From 84fbdfea1fc1f9d7d61ef388df4d34eb2d0552d0 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Fri, 5 Sep 2025 10:41:01 +0200
Subject: [PATCH 1/2] [libclc] Implement erf/erfc vector function with loop
since scal
https://github.com/wenju-he edited
https://github.com/llvm/llvm-project/pull/157002
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/156789
Our downstream libclc add a few more targets that customizes build_flags and
opt_flags. Then in each customization block, MACRO_ARCH is defined to be
${ARCH}.
Hoisting MACRO_ARCH definition out of if-else-end
wenju-he wrote:
Applying weak attribute to a small set of libclc functions might be acceptable
because libclc will eventually set linkage to linkonce_odr for all functions.
The small set of libclc functions, that were not optimized by
PostOrderFunctionAttrsPass during libclc build, will be opt
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/156590
None
>From d4943f75762951d23833b89e2d54efe31def7d98 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Tue, 2 Sep 2025 23:22:50 -0700
Subject: [PATCH] [NFC][libclc] Remove unused -DCLC_INTERNAL build flag, remove
wenju-he wrote:
Unfortunately weak linkage prevents PostOrderFunctionAttrsPass from deducing
attributes for functions that have weak linkage:
https://github.com/llvm/llvm-project/blob/7624c6141974f66f24ea90a18a55a111e98baa40/llvm/lib/Transforms/IPO/FunctionAttrs.cpp#L285
where hasExactDefiniti
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/156378
_CLC_DEF_WEAK can be used in our downstream libclc to allow overriding generic
__clc_tgamma implementation.
>From cc51cd1e096794162a5f3c7be9aa160d83ba2547 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Tue, 2
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/156280
clcmacro.h only defines _CLC_V_V_VP_VECTORIZE which is only used in
clc/lib/generic/math/clc_lgamma_r.cl.
>From 4125c7faf2d70b4059da9f56d29024e359307513 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Mon, 1 Se
https://github.com/wenju-he closed
https://github.com/llvm/llvm-project/pull/152275
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
wenju-he wrote:
kindly ping @arsenm @frasercrmck to review the last commit. It is a renaming
commit.
https://github.com/llvm/llvm-project/pull/152275
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listin
@@ -132,6 +124,33 @@ function(link_bc)
)
endfunction()
+# Create a custom target for each bitcode file, which is the output of a custom
+# command. This is required for parallel compilation of the custom commands
that
+# generate the bitcode files when using the CMake MSVC
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/154479
>From 75b5f46b2858b399482082eabd1388167aaa58e4 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Wed, 20 Aug 2025 07:57:54 +0200
Subject: [PATCH 1/4] [libclc] Only create a target per each compile command
for cmak
https://github.com/wenju-he edited
https://github.com/llvm/llvm-project/pull/154479
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -132,6 +124,33 @@ function(link_bc)
)
endfunction()
+# Create a custom target for each bitcode file, which is the output of a custom
+# command. This is required for parallel compilation of the custom commands
that
+# generate the bitcode files when using the CMake MSVC
@@ -335,19 +348,28 @@ function(add_libclc_builtin_set)
endif()
endforeach()
+ set( builtins_comp_lib_tgt builtins.comp.${ARG_ARCH_SUFFIX} )
+ if ( CMAKE_GENERATOR MATCHES "Visual Studio" )
wenju-he wrote:
> Perhaps a comment above this to explain what
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/154479
>From 75b5f46b2858b399482082eabd1388167aaa58e4 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Wed, 20 Aug 2025 07:57:54 +0200
Subject: [PATCH 1/3] [libclc] Only create a target per each compile command
for cmak
https://github.com/wenju-he edited
https://github.com/llvm/llvm-project/pull/154479
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he edited
https://github.com/llvm/llvm-project/pull/154479
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/154479
libclc sequential build issue addressed in commit 0c21d6b4c8ad is specific to
cmake MSVC generator. Therefore, this PR avoids creating a large number of
targets when a non-MSVC generator is used, such as the N
https://github.com/wenju-he closed
https://github.com/llvm/llvm-project/pull/153785
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/154084
Commit 0c21d6b4c8ad fixed sequential build of libclc on Windows by adding a
target for each compile command.
This PR conditionally enables DEPENDS_EXPLICIT_ONLY and requires at least cmake
version 3.27. DEPEND
https://github.com/wenju-he closed
https://github.com/llvm/llvm-project/pull/153523
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
wenju-he wrote:
https://github.com/llvm/llvm-project/pull/153785/commits/a8fcf405007d05d123f397f66b4139d53586c1b5
is a minor fix to return 1 for out-of-bound dim
https://github.com/llvm/llvm-project/pull/153785
___
cfe-commits mailing list
cfe-commits
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/153785
>From d0a9e7fa683d294aaabf24ccc34cea54a8a5eb1f Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Fri, 15 Aug 2025 12:43:54 +0200
Subject: [PATCH 1/2] [libclc] Implement
__clc_get_local_size/__clc_get_max_sub_group
https://github.com/wenju-he closed
https://github.com/llvm/llvm-project/pull/153784
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/153785
This simplifies downstream refactoring of libspirv workitem function in
https://github.com/intel/llvm/tree/sycl/libclc/libspirv/lib/generic
>From d0a9e7fa683d294aaabf24ccc34cea54a8a5eb1f Mon Sep 17 00:00:00 20
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/153784
None
>From c51ac2969099be4831c3d296fffec9e6f4fce780 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Fri, 15 Aug 2025 12:37:00 +0200
Subject: [PATCH] [libclc] Fix out-of-bound value for workitem functions
accord
wenju-he wrote:
> If you want to use these implementations, I'd rather merge the OCML content
> into libclc and migrate over to using it.
Tag @frasercrmck
The amdgcn implementation probably needs improvement to use llvm elementwise
builtin for e.g. half/float exp*
https://github.com/llvm/llv
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/153137
According to OpenCL spec, native_* functions have implementation-defined
accuracy and typically have better performance. We can enable floating- point
contraction optimizations for them.
>From 719a6914321afc0
@@ -0,0 +1,21 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apac
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/152275
>From c48a94749e7e4ee261895826f2df2e2c48f040ef Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Wed, 6 Aug 2025 11:07:15 +0200
Subject: [PATCH 1/3] [libclc] update __clc_mem_fence: add MemorySemantic arg
and use
https://github.com/wenju-he closed
https://github.com/llvm/llvm-project/pull/152703
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
wenju-he wrote:
> LGTM if you've tested it and it works 👍
Yes, the fix is verified both locally and in our internal CI.
I also fixed alias install in
https://github.com/llvm/llvm-project/pull/152703/commits/b6cbefcbc06e42d7107723cb5b37749f3b1e0931.
@frasercrmck please review this commit again
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/152703
>From be71d635d2de980797be595c4f35f307c703bc96 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Fri, 8 Aug 2025 05:59:54 -0700
Subject: [PATCH 1/3] [libclc] Fix libclc install on Windows when MSVC
generator is us
https://github.com/wenju-he closed
https://github.com/llvm/llvm-project/pull/150174
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -92,10 +95,14 @@ else()
get_host_tool_path( llvm-link LLVM_LINK llvm-link_exe llvm-link_target )
get_host_tool_path( opt OPT opt_exe opt_target )
endif()
-endif()
-# Setup the paths where libclc runtimes should be stored.
-set( LIBCLC_OUTPUT_LIBRARY_DIR ${CMAKE_C
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/152703
>From be71d635d2de980797be595c4f35f307c703bc96 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Fri, 8 Aug 2025 05:59:54 -0700
Subject: [PATCH 1/2] [libclc] Fix libclc install on Windows when MSVC
generator is us
https://github.com/wenju-he edited
https://github.com/llvm/llvm-project/pull/152703
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/152703
>From be71d635d2de980797be595c4f35f307c703bc96 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Fri, 8 Aug 2025 05:59:54 -0700
Subject: [PATCH] [libclc] Fix libclc install on Windows when MSVC generator is
used
wenju-he wrote:
sorry, not working, closing PR
https://github.com/llvm/llvm-project/pull/152666
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he closed
https://github.com/llvm/llvm-project/pull/152666
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he edited
https://github.com/llvm/llvm-project/pull/146503
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -92,10 +95,14 @@ else()
get_host_tool_path( llvm-link LLVM_LINK llvm-link_exe llvm-link_target )
get_host_tool_path( opt OPT opt_exe opt_target )
endif()
-endif()
-# Setup the paths where libclc runtimes should be stored.
-set( LIBCLC_OUTPUT_LIBRARY_DIR ${CMAKE_C
https://github.com/wenju-he edited
https://github.com/llvm/llvm-project/pull/152275
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,21 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apac
https://github.com/wenju-he closed
https://github.com/llvm/llvm-project/pull/152463
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/152463
None
>From 10c997f9de3c2a99b2f7bd507523be901d7c6ee7 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Thu, 7 Aug 2025 00:47:50 -0700
Subject: [PATCH] [NFC][libclc] Delete unused
clc/shared/binary_decl_with_scalar
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/152456
Before this PR, PostOrderFunctionAttrsPass in opt run can deduce memory(none)
for these functions.
This PR explicitly adds the attribute to align with Clang's OpenCL headers and
ensures the attribute is prese
https://github.com/wenju-he closed
https://github.com/llvm/llvm-project/pull/152431
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
wenju-he wrote:
@arsenm I'm not sure if the change is an improvement, please review.
https://github.com/llvm/llvm-project/pull/152436
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/152436
Motivation is to upstream use of __ocml_rsqrt_ in
https://github.com/intel/llvm/blob/sycl/libclc/libspirv/lib/amdgcn-amdhsa/math/rsqrt.cl
llvm-diff shows vectorized calls of llvm.sqrt.v2f32 and fdiv are scalari
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/152431
None
>From 73299b736c61a2042aeadf46e62a93e11ca5a890 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Thu, 7 Aug 2025 05:03:56 +0200
Subject: [PATCH] [libclc] Add missing clc/lib/ptx-nvidiacl/SOURCES to
CMAKE_CON
@@ -0,0 +1,37 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apac
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/152275
It is necessary to add MemorySemantic argument which means the memory or
address space to which the memory ordering is applied.
The MemorySemantic is also necessary for implementing the SPIR-V MemoryBarrier
i
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/152245
The target's output bitcode `libclc_builtins_lib` is located in a sub-directory
in clang resource directory since df7473673214. Setting TARGET_FILE property
can allow targets in non-libclc project to obtain th
https://github.com/wenju-he closed
https://github.com/llvm/llvm-project/pull/151446
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,37 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apac
https://github.com/wenju-he edited
https://github.com/llvm/llvm-project/pull/151446
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,36 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apac
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/151446
>From eed56d228c0613f563c23f9be23d681ef3d87f2b Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Thu, 31 Jul 2025 05:07:23 +0200
Subject: [PATCH 1/3] [libclc] Move mem_fence and barrier to clc library
__clc_mem_fe
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/151644
Move id first along 0th dimension to achieve coalesced memory access when
stride is 1.
>From 1fe808b52e11dfe569c489a9dc8f1cdd3fa87afc Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Fri, 1 Aug 2025 07:45:50 +02
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/151446
>From eed56d228c0613f563c23f9be23d681ef3d87f2b Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Thu, 31 Jul 2025 05:07:23 +0200
Subject: [PATCH 1/2] [libclc] Move mem_fence and barrier to clc library
__clc_mem_fe
https://github.com/wenju-he approved this pull request.
LGTM. I think llvm-spirv should be fixed, so that we can also use
__builtin_elementwise_max/minimumnum for the target.
https://github.com/llvm/llvm-project/pull/128506
___
cfe-commits mailing lis
@@ -43,8 +48,10 @@ _CLC_DEF _CLC_OVERLOAD half __clc_fmin(half x, half y) {
return (y < x) ? y : x;
wenju-he wrote:
>I wonder if we in fact want to have `half` use `__builtin_fminf16`? We can
>simplify the definitions if all types are using a builtin. What do
https://github.com/wenju-he approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/150972
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -43,8 +48,10 @@ _CLC_DEF _CLC_OVERLOAD half __clc_fmin(half x, half y) {
return (y < x) ? y : x;
wenju-he wrote:
can we use this same implementation for float and double?
https://github.com/llvm/llvm-project/pull/128506
@@ -5,6 +5,9 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
endif()
set(LLVM_SUBPROJECT_TITLE "libclc")
+# Top level target used to build all Libclc libraries.
+add_custom_target( libclc ALL )
wenju-he wrote:
can we put this line near line 48~49, o
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/150181
Also delete unary_def_via_fp32.inc. There are small changes in
amdgcn--amdhsa.bc due to vector conversion is scalarized, e.g.
%2 = fpext <4 x half> %0 to <4 x float>
%3 = extractelement <4 x float> %2, i64
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/150174
This is to upstream implementations in
https://github.com/intel/llvm/tree/sycl/libclc/clc/lib/ptx-nvidiacl/math
>From d4fcaf56d63efe283240bfc582706e268e30c854 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Wed
https://github.com/wenju-he edited
https://github.com/llvm/llvm-project/pull/150165
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
wenju-he wrote:
llvm-diff amdgcn--amdhsa.bc.new amdgcn--amdhsa.bc.old
```
in function _Z9normalizeDh:
in block %1 / %1:
> %2 = fpext half %0 to float
%2 = fcmp one half %0, 0xH
> %4 = select i1 %3, float 1.00e+00, float 0.00e+00
> %5 = tail call noundef flo
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/150165
This is ported from
https://github.com/intel/llvm/blob/sycl/libclc/libspirv/lib/generic/geometric/normalize.cl
and can pass a closed-source OpenCL CTS
"test_geometrics geom_normalize --half CL_DEVICE_TYPE_GPU"
wenju-he wrote:
> If the decision is the conformance test continues doing what it has been
> doing, it should directly map to llvm.minimumnum/maximumnum.
For now, @frasercrmck can we update this PR to use
__builtin_elementwise_maximumnum/minimumnum so that OpenCL CTS can pass?
https://github.
@@ -4108,6 +4108,22 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl
GD, unsigned BuiltinID,
return RValue::get(Result);
}
+ case Builtin::BI__builtin_elementwise_maximumnum: {
+Value *Op0 = EmitScalarExpr(E->getArg(0));
wenju-he wrote:
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/149775
Addresses https://github.com/llvm/llvm-project/issues/112164. minimumnum and
maximumnum intrinsics were added in 5bf81e53dbea.
The new built-ins can be used for implementing OpenCL math function fmax and
fmin
https://github.com/wenju-he edited
https://github.com/llvm/llvm-project/pull/149728
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -425,17 +425,21 @@ function(add_libclc_builtin_set)
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
endif()
- if(CMAKE_HOST_UNIX OR LLVM_USE_SYMLINKS)
-set(LIBCLC_LINK_OR_COPY create_symlink)
- else()
-set(LIBCLC_LINK_OR_COPY copy)
- endif()
-
foreach(
@@ -425,17 +425,21 @@ function(add_libclc_builtin_set)
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
endif()
- if(CMAKE_HOST_UNIX OR LLVM_USE_SYMLINKS)
-set(LIBCLC_LINK_OR_COPY create_symlink)
- else()
-set(LIBCLC_LINK_OR_COPY copy)
- endif()
-
foreach(
https://github.com/wenju-he closed
https://github.com/llvm/llvm-project/pull/149269
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/149269
>From 9ac644cb8ed43ac28e0ee715f0a0e6bed4df470a Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Thu, 17 Jul 2025 10:02:20 +0200
Subject: [PATCH 1/2] [libclc] Enable `clang fp reciprocal` in
clc_native_divide/reci
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/149269
The pragma adds `arcp` flag to `fdiv` instruction in these functions. The flag
can provide better performance.
>From 9ac644cb8ed43ac28e0ee715f0a0e6bed4df470a Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Thu,
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/149252
llvm-diff shows no change to amdgcn--amdhsa.bc.
>From 91827fa45fbf45936e57241b0bb0c1a215112834 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Thu, 17 Jul 2025 07:27:50 +0200
Subject: [PATCH] [NFC][libclc] Delet
https://github.com/wenju-he updated
https://github.com/llvm/llvm-project/pull/149070
>From 9f8b12e6cf600cd05bab586e3d521e5354789e12 Mon Sep 17 00:00:00 2001
From: Wenju He
Date: Wed, 16 Jul 2025 12:44:48 +0200
Subject: [PATCH 1/3] [libclc] Add generic implementation of
bitfield_insert/extract,
https://github.com/wenju-he closed
https://github.com/llvm/llvm-project/pull/148997
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he edited
https://github.com/llvm/llvm-project/pull/148997
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he edited
https://github.com/llvm/llvm-project/pull/148997
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wenju-he created
https://github.com/llvm/llvm-project/pull/149070
The implementation is based on reference implementation in
OpenCL-CTS/test_integer_ops. The generic implementations pass
OpenCL-CTS/test_integer_ops tests on Intel GPU.
>From 9f8b12e6cf600cd05bab586e3d521e535
wenju-he wrote:
> I think this could optionally do with a comment before explaining what this
> flag is helping to achieve, but it's not a blocker.
it is explained at https://clang.llvm.org/docs/UsersManual.html#id72 and
reducing size and verbosity is what this flag is intended for. I mean the
https://github.com/wenju-he approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/148815
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
1 - 100 of 288 matches
Mail list logo