I executate the code with the comand gcc -O3 -ffast-math -msse -funroll-all-loops -ftree-vectorize -fopt-info-vec-missed -lm -g $1 -o ${2}.O3
but the compiler doesn't vectorized this function missed: not vectorized: unsupported use in stmt.
I think the problem is in this line of code: Vout[i] = Vin1[i] + Vin2[i] + CARRY;
How can I improve my code and how can I achive that the compiler vectorize this code? What transformations are necessary in my code?
uint8_t LongNumAddition( uint8_t *Vin1, uint8_t *Vin2, uint8_t *Vout, size_t N ){ uint8_t CARRY = 0; for ( size_t i=0; i< N; ++i ) { Vout[i] = Vin1[i] + Vin2[i] + CARRY; CARRY = (Vout[i] > 9); if(CARRY){ Vout[i] -= ten; } } return CARRY;}