aboutsummaryrefslogtreecommitdiff
path: root/libcxx/src/algorithm.cpp
diff options
context:
space:
mode:
authorFraser Cormack <fraser@codeplay.com>2025-01-27 16:37:21 +0000
committerGitHub <noreply@github.com>2025-01-27 16:37:21 +0000
commitc3a0fcc982061f9a69cfc1199dc91bd1fc3158c0 (patch)
tree332ef2f4f351cf0bb0d47fb45d2583ad87efe98f /libcxx/src/algorithm.cpp
parent38b3f45a811282511c014cffd09a8ae2a96435ba (diff)
downloadllvm-c3a0fcc982061f9a69cfc1199dc91bd1fc3158c0.zip
llvm-c3a0fcc982061f9a69cfc1199dc91bd1fc3158c0.tar.gz
llvm-c3a0fcc982061f9a69cfc1199dc91bd1fc3158c0.tar.bz2
[libclc] Optimize CLC vector any/all builtins (#124568)
By using the vector reduction buitins we can avoid scalarization. Targets that don't support vector reductions will scalarize later on anyway. The vector reduction builtins should be well-enough supported by the middle-end to be a generic solution. This produces conceptually equivalent code: all vector elements are OR'd/AND'd together and the final scalar is bit-shifted and masked to produce the final result. The 'normalize' builtin uses 'all' so its code has similarly improved in places.
Diffstat (limited to 'libcxx/src/algorithm.cpp')
0 files changed, 0 insertions, 0 deletions