http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52969
--- Comment #11 from vincenzo Innocente <vincenzo.innocente at cern dot ch> 2012-04-13 13:03:48 UTC --- I do not have a clear case in hand with evidence of "double" compare I will have a closer look to "real life" code. btw I just noticed that your test case does not vectorize even if I rewrite as for (; a ; ++j) xsum[j] = (cluster[j] > 0.) ? 0. : cluster[j]; any idea why? c++ -O3 -c ifconv.cc -ftree-loop-if-convert-stores -ftree-vectorizer-verbose=9 Analyzing loop at ifconv.cc:10 10: ===== analyze_loop_nest ===== 10: === vect_analyze_loop_form === 10: not vectorized: control flow in loop. 10: bad loop form. ifconv.cc:3: note: vectorized 0 loops in function. pb-d-128-141-131-26:bugs48 innocent$ c++ -O3 -c ifconv.cc -ftree-loop-if-convert-stores -ftree-vectorizer-verbose=9 Analyzing loop at ifconv.cc:10 10: ===== analyze_loop_nest ===== 10: === vect_analyze_loop_form === 10: not vectorized: control flow in loop. 10: bad loop form. ifconv.cc:3: note: vectorized 0 loops in function. pb-d-128-141-131-26:bugs48 innocent$ c++ -Ofast -c ifconv.cc -ftree-loop-if-convert-stores -ftree-vectorizer-verbose=9 Analyzing loop at ifconv.cc:10 10: ===== analyze_loop_nest ===== 10: === vect_analyze_loop_form === 10: not vectorized: multiple exits. 10: bad loop form. ifconv.cc:3: note: vectorized 0 loops in function. pb-d-128-141-131-26:bugs48 innocent$ c++ -Ofast -c ifconv.cc -ftree-vectorizer-verbose=9 Analyzing loop at ifconv.cc:10 10: ===== analyze_loop_nest ===== 10: === vect_analyze_loop_form === 10: not vectorized: multiple exits. 10: bad loop form. ifconv.cc:3: note: vectorized 0 loops in function.