diff options
author | 2024-09-14 01:26:02 +0100 | |
---|---|---|
committer | 2024-10-15 16:29:45 +0000 | |
commit | 6127341b747ac26b361fd1779e155d940d49e39f (patch) | |
tree | e1c40de3dda7f6bc5048fff6ea5fb4deaffe6bbc /compiler/common_compiler_test.cc | |
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/common_compiler_test.cc')
-rw-r--r-- | compiler/common_compiler_test.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/compiler/common_compiler_test.cc b/compiler/common_compiler_test.cc index 392a0d1001..d627af8158 100644 --- a/compiler/common_compiler_test.cc +++ b/compiler/common_compiler_test.cc @@ -186,7 +186,9 @@ class CommonCompilerTestImpl::OneCompiledMethodStorage final : public CompiledCo }; std::unique_ptr<CompilerOptions> CommonCompilerTestImpl::CreateCompilerOptions( - InstructionSet instruction_set, const std::string& variant) { + InstructionSet instruction_set, + const std::string& variant, + const std::optional<std::string>& extra_features) { std::unique_ptr<CompilerOptions> compiler_options = std::make_unique<CompilerOptions>(); compiler_options->emit_read_barrier_ = gUseReadBarrier; compiler_options->instruction_set_ = instruction_set; @@ -194,6 +196,12 @@ std::unique_ptr<CompilerOptions> CommonCompilerTestImpl::CreateCompilerOptions( compiler_options->instruction_set_features_ = InstructionSetFeatures::FromVariant(instruction_set, variant, &error_msg); CHECK(compiler_options->instruction_set_features_ != nullptr) << error_msg; + if (extra_features) { + compiler_options->instruction_set_features_ = + compiler_options->instruction_set_features_->AddFeaturesFromString(*extra_features, + &error_msg); + CHECK_NE(compiler_options->instruction_set_features_, nullptr) << error_msg; + } return compiler_options; } |