[all-commits] [llvm/llvm-project] b0338c: [libclc] Move shuffle/shuffle2 to the CLC library ...

Fraser Cormack via All-commits all-commits at lists.llvm.org
Wed Apr 9 07:52:48 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b0338c3d6c6d9787232e07ceff56ef161c357602
      https://github.com/llvm/llvm-project/commit/b0338c3d6c6d9787232e07ceff56ef161c357602
  Author: Fraser Cormack <fraser at codeplay.com>
  Date:   2025-04-09 (Wed, 09 Apr 2025)

  Changed paths:
    M libclc/clc/include/clc/integer/gentype.inc
    M libclc/clc/include/clc/math/gentype.inc
    A libclc/clc/include/clc/misc/clc_shuffle.h
    A libclc/clc/include/clc/misc/clc_shuffle2.h
    A libclc/clc/include/clc/misc/shuffle2_decl.inc
    A libclc/clc/include/clc/misc/shuffle2_def.inc
    A libclc/clc/include/clc/misc/shuffle_decl.inc
    A libclc/clc/include/clc/misc/shuffle_def.inc
    M libclc/clc/lib/generic/SOURCES
    A libclc/clc/lib/generic/misc/clc_shuffle.cl
    A libclc/clc/lib/generic/misc/clc_shuffle2.cl
    M libclc/generic/include/clc/misc/shuffle.h
    M libclc/generic/lib/misc/shuffle.cl
    M libclc/generic/lib/misc/shuffle2.cl

  Log Message:
  -----------
  [libclc] Move shuffle/shuffle2 to the CLC library (#135000)

This commit moves the shuffle and shuffle2 builtins to the CLC library.
In so doing it makes the headers simpler and re-usable for other builtin
layers to hook into the CLC functions, if they wish.

An additional gentype utility has been made available, which provides a
consistent vector-size-or-1 macro for use.

The existing __CLC_VECSIZE is defined but empty which is useful in
certain applications, such as in concatenation with a type to make a
correctly sized scalar or vector type. However, this isn't usable in the
same preprocessor lines when wanting to check for specific vector sizes,
as e.g., '__CLC_VECSIZE == 2' resolves to '== 2' which is invalid. In
local testing this is also useful for the geometric builtins which are
only available for scalar types and vector types of 2, 3, or 4 elements.

No codegen changes are observed, except the internal shuffle/shuffle2
utility functions are no longer made publicly available.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list