I find results in armebv7-linux are different from armv7.
code
#include <stdio.h>
volatile int one = 1;
int main (int argc, char *argv[]) {
__attribute__((vector_size((8)*sizeof(short)))) short v0 = {one, 1, 2, 3, 4, 5, 6, 7};
__attribute__((vector_size((8)*sizeof(short)))) short v1;
v1 = v0 % 2;
for (int __i = 0; __i < 8; __i++) {
printf("v1: %d\n", (*((short *) &(v1) + __i)));
}
return 0;
}
When __i is 4, the result is different. I think this Instruction: vrev32.16 d17, d18 is wrong, and I try to modify it is vmov.16 d17, d18, the result is right. However I don't know how to fix this bug.
https://godbolt.org/z/EqYebY73z