blob: c0df0054b391c0a887924b6edff7b13533427f84 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
diff --git a/dom/base/nsTextFragmentGeneric.h b/dom/base/nsTextFragmentGeneric.h
index 10e16fcfaa..87d9e0d075 100644
--- a/dom/base/nsTextFragmentGeneric.h
+++ b/dom/base/nsTextFragmentGeneric.h
@@ -13,7 +13,6 @@ namespace mozilla {
template <class Arch>
int32_t FirstNon8Bit(const char16_t* str, const char16_t* end) {
- const uint32_t numUnicharsPerVector = xsimd::batch<int16_t, Arch>::size;
using p = Non8BitParameters<sizeof(size_t)>;
const size_t mask = p::mask();
const uint32_t numUnicharsPerWord = p::numUnicharsPerWord();
@@ -28,16 +27,6 @@ int32_t FirstNon8Bit(const char16_t* str, const char16_t* end) {
if (str[i] > 255) return i;
}
- // Check one batch at a time.
- const int32_t vectWalkEnd =
- ((len - i) / numUnicharsPerVector) * numUnicharsPerVector;
- const uint16_t shortMask = 0xff00;
- xsimd::batch<int16_t, Arch> vectmask(static_cast<int16_t>(shortMask));
- for (; i < vectWalkEnd; i += numUnicharsPerVector) {
- const auto vect = xsimd::batch<int16_t, Arch>::load_aligned(str + i);
- if (xsimd::any((vect & vectmask) != 0)) return i;
- }
-
// Check one word at a time.
const int32_t wordWalkEnd =
((len - i) / numUnicharsPerWord) * numUnicharsPerWord;
|