diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-05-09 01:16:22 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-05-09 01:16:22 +0000 |
commit | 08e7385ec6c028825ce32ad426ec02fe9ed8c943 (patch) | |
tree | 506b6ac71ef569b680cda0437217b3987a76b1ba | |
parent | c7caefd0df41378801e48aaa3cda1270c312762a (diff) | |
parent | 0d048372c919d21b949347fc59f33b6145c832e4 (diff) | |
download | binary_translation-sdk-release.tar.gz |
Snap for 11819063 from 0d048372c919d21b949347fc59f33b6145c832e4 to sdk-releasesdk-release
Change-Id: Ifac4d5862127eed153b79007976694cc25cc6bd6
-rw-r--r-- | tests/inline_asm_tests/main_riscv64.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/inline_asm_tests/main_riscv64.cc b/tests/inline_asm_tests/main_riscv64.cc index 694909a4..a7566f1d 100644 --- a/tests/inline_asm_tests/main_riscv64.cc +++ b/tests/inline_asm_tests/main_riscv64.cc @@ -154,7 +154,12 @@ void TestVectorReductionInstruction( memcpy(&result[index], &kUndisturbedResult, sizeof(result[index])); } - RunTwoVectorArgsOneRes(exec_insn, &kVectorCalculationsSource[0], &result[0], vtype, vlmax); + // Exectations for reductions are for swapped source arguments. + __v2du sources[16]{}; + memcpy(&sources[0], &kVectorCalculationsSource[8], sizeof(sources[0]) * 8); + memcpy(&sources[8], &kVectorCalculationsSource[0], sizeof(sources[0]) * 8); + + RunTwoVectorArgsOneRes(exec_insn, &sources[0], &result[0], vtype, vlmax); // Reduction instructions are unique in that they produce a scalar // output to a single vector register as opposed to a register group. |