https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61583
Bug ID: 61583 Summary: stage2 and stage3 compare failure due to value range loss Product: gcc Version: 4.9.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap Assignee: unassigned at gcc dot gnu.org Reporter: amodra at gmail dot com Seen first on ibm-4.9 branch with powerpc64, but also occurs on 4.9 branch with both powerpc64 and x86_64. x86_64 configured with --enable-threads=posix --disable-shared --disable-libmudflap --disable-libssp --disable-lto --disable-libgomp --without-ppl --without-cloog --disable-checking --enable-languages=c,c++ results for revision 211867 x86_64 as follows, powerpc64 doesn't hit the builtins.o fail. Note that --disable-checking seems necessary. Bootstrap comparison failure! gcc/tree-vect-stmts.o differs gcc/builtins.o differs gcc/tree-vect-loop.o differs Disassembling tree-vect-stmts.o shows loop exit branches differ for for (j = 0; j < ncopies; ++j) in vectorizable_mask_load_store. ivopts details dump differences (- no debug, + debug): @@ -16220,10 +19173,11 @@ Analyzing # of iterations of loop 1 exit condition [1, + , 1](no_overflow) < ncopies_19 - bounds on difference of bases: 0 ... 2147483646 + bounds on difference of bases: -2147483649 ... 2147483646 result: + zero if ncopies_19 <= 0 # of iterations (unsigned int) ncopies_19 + 4294967295, bounded by 2147483646 - number of iterations (unsigned int) ncopies_19 + 4294967295 + number of iterations (unsigned int) ncopies_19 + 4294967295; zero if ncopies_19 <= 0 Induction variables: @@ -16334,7 +19288,7 @@ 0 0 0 1 1 0 0 1 2 0 0 1 - 3 0 0 1 + 3 4 1 1 Use 2: cand cost compl. depends on @@ -16428,18 +19382,17 @@ base 0 step 1 -Replacing exit test: if (ncopies_19 > j_153) bool vectorizable_assignment(gimple, gimple_stmt_iterator*, gimple_statement_base**, slp_tree) (struct gimple_statement_base * stmt { [snip] So there's why the exit test changes, with no debug output the exit test is if (ncopies_19 != j_153), with debug info you keep the original test. A gdb session shows that ncopies_19 has NULL SSA_NAME_RANGE_INFO during ivopts with -g, but does have SSA_NAME_RANGE_INFO without -g, which agrees with the dump output above.