27 Commits

Author SHA1 Message Date
Leslie Zhai
ed87b83f49
Merge 5ae6ca72750fb29c2a9a1db7f2ca8e86d6d7d3e6 into 9e9a10ad01fceb2032ae6e36cb0262c4dbba90c7 2025-06-14 14:08:27 +03:00
ypicchi-arm
9e9a10ad01
Fix double shufti's vector end false positive (#325)
* Add regression test for double shufti

It tests for false positive at vector edges.

Signed-off-by: Yoan Picchi <yoan.picchi@arm.com>

* Fix double shufti reporting false positives

Double shufti used to offset one vector, resulting in losing one character
at the end of every vector. This was replaced by a magic value indicating a
match. This meant that if the first char of a pattern fell on the last char of
a vector, double shufti would assume the second character is present and
report a match.
This patch fixes it by keeping the previous vector and feeding its data to the
new one when we shift it, preventing any loss of data.

Signed-off-by: Yoan Picchi <yoan.picchi@arm.com>

* vshl() will call the correct implementation

* implement missing vshr_512_imm(), simplifies caller x86 code

* Fix x86 case, use alignr instead

* it's the reverse, the avx512 alignr is incorrect, need to fix

* Make shufti's OR reduce size agnostic

Signed-off-by: Yoan Picchi <yoan.picchi@arm.com>

* Fix test's array size

Signed-off-by: Yoan Picchi <yoan.picchi@arm.com>

* Fix AVX2/AVX512 alignr implementations and unit tests

* Fix Power VSX alignr

---------

Signed-off-by: Yoan Picchi <yoan.picchi@arm.com>
Co-authored-by: Konstantinos Margaritis <konstantinos@vectorcamp.gr>
2025-06-11 18:55:10 +03:00
gtsoul-tech
4f09e785c0
Fix regression error #317 and add unit test (#318)
Revert the code that produced the regression error in #317 
Add the regression error to a unit test regressions.cpp along with the rebar tests

---------

Co-authored-by: gtsoul-tech <gtsoulkanakis@gmail.com>
2024-11-13 10:43:23 +02:00
Konstantinos Margaritis
e819cb1100 Fix C-style casts 2024-05-16 12:03:42 +03:00
Leslie Zhai
6255055df5 Initial loongarch port
Co-authored-by: yangwenqing <yangwenqing@loongson.cn>

Signed-off-by: Leslie Zhai <zhaixiang@loongson.cn>
Signed-off-by: yangwenqing <yangwenqing@loongson.cn>
2023-12-12 12:48:59 +08:00
Konstantinos Margaritis
f57928ea08 fix SIMDe emulation builds on Arm, add native translation from x86 for comparison 2023-11-27 12:21:58 +00:00
Konstantnos Margaritis
a8e9b9069e enable SIMDe backend 2023-11-21 17:13:33 +00:00
Danila Kutenin
9af996b936 Fix all ASAN issues in vectorscan 2022-02-18 17:14:51 +00:00
apostolos
e09d8674b4 resolving conficts after merging 2021-11-13 18:58:22 +02:00
Konstantinos Margaritis
5eabceddcf renamed matcher functions, added new ones for Vermicelli 2021-11-01 16:28:50 +00:00
apostolos
d0a41252c8 blockSigleMask implementations for ARCH_PPC64 added 2021-10-14 15:56:13 +03:00
Konstantinos Margaritis
623c64142b simplify shufti and provide arch-specific block functions 2021-10-12 11:51:35 +03:00
Konstantinos Margaritis
fad39b6058 optimize and simplify Shufti and Truffle to work with a single block method instead 2021-10-12 11:51:35 +03:00
Konstantinos Margaritis
e7161fdfec initial SSE/AVX2 implementation 2021-10-12 11:51:34 +03:00
Konstantinos Margaritis
de30471edd remove duplicate functions from previous merge 2021-10-12 11:51:34 +03:00
George Wort
a879715953 Move SVE functions into their own files.
Change-Id: I995ba4b7d2b558ee403693ee45d747d414d3b177
2021-10-12 11:51:34 +03:00
George Wort
00fff3f53c Use SVE for double shufti.
Change-Id: I09e0d57bb8a2f05b613f6225dea79ae823136268
2021-10-12 11:51:34 +03:00
George Wort
c95a4c3dd1 Use SVE for single shufti.
Change-Id: Ic76940c5bb9b81a1c45d39e9ca396a158c50a7dc
2021-10-12 11:51:34 +03:00
Konstantinos Margaritis
a38324a5a3 add arm rshift128/rshift128 2021-10-12 11:51:34 +03:00
Konstantinos Margaritis
603bc14cdd fix failing corner case, add pshufb_maskz() 2021-10-12 11:51:34 +03:00
Konstantinos Margaritis
6f44a1aa26 remove low4bits from the arguments, fix cases that mostly affect loading large (64) vectors and falling out of bounds 2021-10-12 11:51:34 +03:00
Konstantinos Margaritis
b67cd7dfd0 use rshift128() instead of vector-wide right shift 2021-10-12 11:51:34 +03:00
apostolos
6f88ecac44 Supervector test fixes 2021-10-12 11:51:34 +03:00
Konstantinos Margaritis
d453a612dc fix last failing Shufti/Truffle tests 2021-10-12 11:51:34 +03:00
Konstantinos Margaritis
845e533b66 move firstMatch, lastMatch to own header in util 2021-10-12 11:51:34 +03:00
Konstantinos Margaritis
2753dbb3b0 rename supervector class header, use dup_*() functions names instead of set1_*(), minor fixes 2021-10-12 11:51:34 +03:00
Konstantinos Margaritis
23b075cbd4 refactor shufti algorithm to use SuperVector class, WIP 2021-10-12 11:51:34 +03:00