diff --git a/src/commons/Orf.cpp b/src/commons/Orf.cpp index 6a57851bf..37573181f 100644 --- a/src/commons/Orf.cpp +++ b/src/commons/Orf.cpp @@ -246,12 +246,15 @@ void Orf::findForward(const char *sequence, const size_t sequenceLength, std::ve // Offset the start position by reading frame size_t from[FRAMES] = {frameOffset[0], frameOffset[1], frameOffset[2]}; - simd_int startCodonsHi = simdi_load((simd_int*)startCodons); - simd_int startCodonsLo = simdi_loadu((simd_int*)(startCodons + 16)); - - simd_int stopCodonsHi = simdi_load((simd_int*)stopCodons); - simd_int stopCodonsLo = simdi_loadu((simd_int*)(stopCodons + 16)); + simd_int stopCodonsHi = simdi_load((simd_int*)stopCodons); +#ifdef AVX2 + simd_int startCodonsLo = simdi_setzero(); + simd_int stopCodonsLo = simdi_setzero(); +#else + simd_int startCodonsLo = simdi_load((simd_int*)startCodons + 16); + simd_int stopCodonsLo = simdi_load((simd_int*)stopCodons + 16); +#endif for (size_t i = 0; i < sequenceLength - (FRAMES - 1); i += FRAMES) { for(size_t position = i; position < i + FRAMES; position++) { // make everything that is not CHAR_MAX upper case