[hjl@gnu-2 vect]$ cat x.c typedef char vec_t; extern __attribute__((aligned(16))) vec_t x [64]; extern __attribute__((aligned(16))) vec_t y [64]; extern __attribute__((aligned(16))) vec_t m [64]; void foo1 () { int i; for (i = 0; i < 64; i++) m [i] = x [i] == y [i] ? 1 : 2; } void foo2 () { int i; for (i = 0; i < 64; i++) m [i] = x [i] == y [i]; } [hjl@gnu-2 vect]$ /export/build/gnu/gcc-nni/build-x86_64-linux/gcc/xgcc -B./ -B/export/build/gnu/gcc-nni/build-x86_64-linux/gcc/ -O2 -msse4.2 -ftree-vectorize -ftree-vectorizer-verbose=3 -S x.c x.c:12: note: LOOP VECTORIZED. x.c:9: note: vectorized 1 loops in function. x.c:21: note: not vectorized: stmt not supported: D.2111_8 = D.2109_5 == D.2110_7 x.c:18: note: vectorized 0 loops in function. [hjl@gnu-2 vect]$ m [i] = x [i] == y [i] ? 1 : 2; works. But m [i] = x [i] == y [i]; doesn't work.
*** This bug has been marked as a duplicate of 21997 ***