Skip to content

add support for llvm.experimental.vector.reduce intrinsics #36039

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
gnzlbg mannequin opened this issue Mar 12, 2018 · 6 comments
Open

add support for llvm.experimental.vector.reduce intrinsics #36039

gnzlbg mannequin opened this issue Mar 12, 2018 · 6 comments
Labels
bugzilla Issues migrated from bugzilla clang:frontend Language frontend issues, e.g. anything involving "Sema"

Comments

@gnzlbg
Copy link
Mannequin

gnzlbg mannequin commented Mar 12, 2018

Bugzilla Link 36691
Version trunk
OS All
Depends On #46849
CC @hfinkel,@RKSimon,@zygoloid

Extended Description

Currently clang has no front-end support for the llvm.experimental.vector.reduce intrinsics. It would be great to be able to use these from clang directly.

@RKSimon
Copy link
Collaborator

RKSimon commented Dec 13, 2020

[Issue #46850] adds x86-specific intrinsics (just for 512-bit vectors) but it shouldn't be much work to generalize these to work for any vector type.

@RKSimon
Copy link
Collaborator

RKSimon commented Nov 27, 2021

mentioned in issue #46849

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
@RKSimon
Copy link
Collaborator

RKSimon commented Feb 5, 2022

We currently have the following:

 __builtin_reduce_max(x)
 __builtin_reduce_min(x)
 __builtin_reduce_and(x)
 __builtin_reduce_or(x)
 __builtin_reduce_xor(x)

@fhahn
Copy link
Contributor

fhahn commented Feb 6, 2022

The available vector reduction builtins support by Clang are documented here: https://clang.llvm.org/docs/LanguageExtensions.html#vector-builtins

@RKSimon
Copy link
Collaborator

RKSimon commented May 5, 2022

__builtin_reduce_add(x) now works for integer types - a23291b

@RKSimon
Copy link
Collaborator

RKSimon commented May 15, 2022

__builtin_reduce_mul(x) now works for integer types - 8a92c45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang:frontend Language frontend issues, e.g. anything involving "Sema"
Projects
None yet
Development

No branches or pull requests

2 participants