Author: Michael R. Crusoe <crusoe@debian.org>
Subject: work around SIMDe NATIVE_ALIASES issue
Forwarded: not-needed
--- mmseqs2.orig/src/commons/Util.cpp
+++ mmseqs2/src/commons/Util.cpp
@@ -597,41 +597,42 @@
 
 // Compute reverse complement of k-mer in 2-bit-per-nucleotide encoding (A: 00, C: 01, T: 10, G: 11)
 uint64_t Util::revComplement(const uint64_t kmer, const int k) {
+
     // broadcast 64bit to 128 bit
-    __m128i x = _mm_cvtsi64_si128(kmer);
-    __m128i x_up = _mm_cvtsi64_si128(kmer >> (uint64_t)4); // shift right by 2 nucleotides
+    simde__m128i x = simde_mm_cvtsi64_si128(kmer);
+    simde__m128i x_up = simde_mm_cvtsi64_si128(kmer >> (uint64_t)4); // shift right by 2 nucleotides
 
     // create lookup (set 16 bytes in 128 bit)
     // a lookup entry at the index of two nucleotides (4 bit) describes the reverse
     // complement of these two nucleotide in the higher 4 bits (lookup1) or in the lower 4 bits (lookup2)
 #define c (signed char)
-    __m128i lookup1 = _mm_set_epi8(c(0x50),c(0x10),c(0xD0),c(0x90),c(0x40),c(0x00),c(0xC0),c(0x80),
+    simde__m128i lookup1 = simde_mm_set_epi8(c(0x50),c(0x10),c(0xD0),c(0x90),c(0x40),c(0x00),c(0xC0),c(0x80),
                                    c(0x70),c(0x30),c(0xF0),c(0xB0),c(0x60),c(0x20),c(0xE0),c(0xA0));
-    __m128i lookup2 = _mm_set_epi8(c(0x05),c(0x01),c(0x0D),c(0x09),c(0x04),c(0x00),c(0x0C),c(0x08),
+    simde__m128i lookup2 = simde_mm_set_epi8(c(0x05),c(0x01),c(0x0D),c(0x09),c(0x04),c(0x00),c(0x0C),c(0x08),
                                    c(0x07),c(0x03),c(0x0F),c(0x0B),c(0x06),c(0x02),c(0x0E),c(0x0A));
     // set upper 8 bytes to 0 and revert order of lower 8 bytes
-    __m128i upper = _mm_set_epi8(c(0xFF),c(0xFF),c(0xFF),c(0xFF),c(0xFF),c(0xFF),c(0xFF),c(0xFF),
+    simde__m128i upper = simde_mm_set_epi8(c(0xFF),c(0xFF),c(0xFF),c(0xFF),c(0xFF),c(0xFF),c(0xFF),c(0xFF),
                                  0,1,2,3,4,5,6,7);
-    // _mm_set1_epi8: create 128 bit with all bytes set to given value
+    // simde_mm_set1_epi8: create 128 bit with all bytes set to given value
     // here: 0x0F (00001111) and 0xF0 (11110000)
-    // _mm_and_si128: bitwise AND
-    __m128i kmer1 = _mm_and_si128(x, _mm_set1_epi8(c(0x0F))); // get lower 4 bits
-    __m128i kmer2 = _mm_and_si128(x_up, _mm_set1_epi8(c(0x0F))); // get higher 4 bits
+    // simde_mm_and_si128: bitwise AND
+    simde__m128i kmer1 = simde_mm_and_si128(x, simde_mm_set1_epi8(c(0x0F))); // get lower 4 bits
+    simde__m128i kmer2 = simde_mm_and_si128(x_up, simde_mm_set1_epi8(c(0x0F))); // get higher 4 bits
 #undef c
 
-    // use _mm_shuffle_epi8 to look up reverse complement
-    kmer1 = _mm_shuffle_epi8(lookup1, kmer1);
-    kmer2 = _mm_shuffle_epi8(lookup2, kmer2);
+    // use simde_mm_shuffle_epi8 to look up reverse complement
+    kmer1 = simde_mm_shuffle_epi8(lookup1, kmer1);
+    kmer2 = simde_mm_shuffle_epi8(lookup2, kmer2);
 
-    // _mm_or_si128: bitwise OR
-    x = _mm_or_si128(kmer1, kmer2);
+    // simde_mm_or_si128: bitwise OR
+    x = simde_mm_or_si128(kmer1, kmer2);
 
     // set upper 8 bytes to 0 and revert order of lower 8 bytes
-    x = _mm_shuffle_epi8(x, upper);
+    x = simde_mm_shuffle_epi8(x, upper);
 
     // shift out the unused nucleotide positions (1 <= k <=32 )
     // broadcast 128 bit to 64 bit
-    return (((uint64_t)_mm_cvtsi128_si64(x)) >> (uint64_t)(64-2*k));
+    return (((uint64_t)simde_mm_cvtsi128_si64(x)) >> (uint64_t)(64-2*k));
 
 }
 
