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;
