diff options
author | 2024-09-14 01:26:02 +0100 | |
---|---|---|
committer | 2024-10-15 16:29:45 +0000 | |
commit | 6127341b747ac26b361fd1779e155d940d49e39f (patch) | |
tree | e1c40de3dda7f6bc5048fff6ea5fb4deaffe6bbc /compiler/optimizing/nodes_vector.h | |
parent | b50d59f4ca5557a7719dc26157f8f2fd9006913a (diff) |
Arm64: fix VecPredToBoolean code generation for SVE
This patch fixes code generation for VecPredToBoolean so it updates
conditional flags itself based on its predicate input. Prior to this
patch, code generation for VecPredToBoolean (incorrectly) implicitly
assumed that the conditional flags were always updated by its input
HIR (VecPredWhile) and that it immediately followed that HIR.
Authors: Konstantin Baladurin <konstantin.baladurin@arm.com>
Chris Jones <christopher.jones@arm.com>
Test: env ART_FORCE_TRY_PREDICATED_SIMD=true
art/test.py --target --optimizing
Test: art/tools/run-gtests.sh
Change-Id: Id4c2494cdefd008509f9039e36081151aaf0e4a6
Diffstat (limited to 'compiler/optimizing/nodes_vector.h')
-rw-r--r-- | compiler/optimizing/nodes_vector.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/optimizing/nodes_vector.h b/compiler/optimizing/nodes_vector.h index 6a60d6be01..a5f5720f7e 100644 --- a/compiler/optimizing/nodes_vector.h +++ b/compiler/optimizing/nodes_vector.h @@ -1529,6 +1529,11 @@ class HVecPredNot final : public HVecPredSetOperation { DEFAULT_COPY_CONSTRUCTOR(VecPredNot); }; +// Return the number of elements of the given type that will fit into a vector of given size. +inline size_t GetNumberOfElementsInVector(size_t vector_size_in_bytes, DataType::Type type) { + return vector_size_in_bytes / DataType::Size(type); +} + } // namespace art #endif // ART_COMPILER_OPTIMIZING_NODES_VECTOR_H_ |