From 6127341b747ac26b361fd1779e155d940d49e39f Mon Sep 17 00:00:00 2001 From: Konstantin Baladurin Date: Sat, 14 Sep 2024 01:26:02 +0100 Subject: 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 Chris Jones Test: env ART_FORCE_TRY_PREDICATED_SIMD=true art/test.py --target --optimizing Test: art/tools/run-gtests.sh Change-Id: Id4c2494cdefd008509f9039e36081151aaf0e4a6 --- compiler/common_compiler_test.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'compiler/common_compiler_test.cc') 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 CommonCompilerTestImpl::CreateCompilerOptions( - InstructionSet instruction_set, const std::string& variant) { + InstructionSet instruction_set, + const std::string& variant, + const std::optional& extra_features) { std::unique_ptr compiler_options = std::make_unique(); compiler_options->emit_read_barrier_ = gUseReadBarrier; compiler_options->instruction_set_ = instruction_set; @@ -194,6 +196,12 @@ std::unique_ptr 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; } -- cgit v1.2.3-59-g8ed1b