[Bug middle-end/28752] bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc
--- Comment #36 from meissner at gcc dot gnu dot org 2010-02-25 04:59 --- I've tested the current GCC 4.5 development branch and it builds fine now with BOOT_CFLAGS='-g -O3 -ftree-vectorize -mcpu=power5 -maltivec'. It also builds with BOOT_CFLAGS='-g -O3 -ftree-vectorize -mcpu=power7'. I also built the current 4.4 branch with altivec, and it bootstrapped fine without problem. Given this was reported in 2006, I suspect the fixes discussed in the thread have long since been applied to the compiler. So, I'm closing the bug. -- meissner at gcc dot gnu dot org changed: What|Removed |Added CC||meissner at gcc dot gnu dot ||org Status|UNCONFIRMED |RESOLVED Resolution||WORKSFORME http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28752
[Bug middle-end/28752] bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc
--- Comment #35 from irar at il dot ibm dot com 2006-12-14 11:58 --- Th problem was solved for i386 by http://gcc.gnu.org/viewcvs?view=rev&revision=119779. Ira -- irar at il dot ibm dot com changed: What|Removed |Added GCC build triplet|powerpc64-linux and i386- |powerpc64-linux |linux | GCC host triplet|powerpc64-linux and i386- |powerpc64-linux |linux | GCC target triplet|powerpc64-linux and i386- |powerpc64-linux |linux | Summary|bootstrap comparision fails |bootstrap comparision fails |with "-ftree-vectorize -|with "-ftree-vectorize - |maltivec" on ppc and i386 |maltivec" on ppc http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28752
[Bug middle-end/28752] bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc and i386
--- Comment #34 from irar at il dot ibm dot com 2006-12-11 13:02 --- Created an attachment (id=12781) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12781&action=view) "Good" rs6000.s -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28752
[Bug middle-end/28752] bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc and i386
--- Comment #33 from irar at il dot ibm dot com 2006-12-11 12:57 --- Created an attachment (id=12779) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12779&action=view) "Bad" rs6000.s -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28752
[Bug middle-end/28752] bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc and i386
--- Comment #32 from irar at il dot ibm dot com 2006-12-11 12:46 --- I am attaching the "bad" rs6000.s (generated with vectorization) and "good" rs6000.s (generated with vectorization and -fno-move-loop-invariants) using revision 110852 (from February 2006). I looked over these a bit, but I wouldn't like to hunt down a bug that had since been solved, so I think I'll switch to looking into more recent snapshots. Ira -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28752
[Bug middle-end/28752] bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc and i386
--- Comment #31 from irar at il dot ibm dot com 2006-12-07 13:30 --- (In reply to comment #17) > I applied the patch http://gcc.gnu.org/ml/gcc-patches/2006-07/msg01043.html (a > fix for PR26197). The bootstrap with vectorization passes! > However, the failure in comment #3 still occurs in the later revisions. So, I > am going to hunt for a later patch that broke bootstrap with vectorization > (applying the above patch). I found this patch: http://gcc.gnu.org/viewcvs?view=rev&revision=110852 The offending loop here is rs6000.c:17088. If I disable -fmove-loop-invariants on r110852, bootstrap with vectorization enabled passes. Ira -- irar at il dot ibm dot com changed: What|Removed |Added CC||rakdver at atrey dot karlin ||dot mff dot cuni dot cz http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28752
[Bug middle-end/28752] bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc and i386
--- Comment #30 from irar at il dot ibm dot com 2006-12-07 12:14 --- I am testing a patch for x86 boostrap failure. It was caused by a bug in vectorization of strided accesses analysis, and, therefore, has nothing to do with the bootstrap failures on ppc. Ira -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28752
[Bug middle-end/28752] bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc and i386
--- Comment #29 from irar at il dot ibm dot com 2006-12-04 09:24 --- I reproduced the wrong printings on x86. It seems to be a problem in strided access vectorization after all - no stores are generated. I am looking into this. Thanks, Ira -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28752
[Bug middle-end/28752] bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc and i386
--- Comment #28 from volodyan at gmail dot com 2006-12-02 17:46 --- (In reply to comment #27) > I committed the patch that enables vectorization of strided accesses Confirmed the bug on gcc-4.3/(Pentium-M)X86. Configured as ../gcc/configure --enable-bootstrap --enable-languages=c and built as make BOOT_CFLAGS="-g -msse2 -ftree-vectorize -O2" Bootstrap failed after wrong execution of the following loop from cfgloopanal.c/dfs: printf("nvert= %d, nq in dfs=%d, post0=%d\n",g->n_vertices, nq, g->vertices[0].post); for (i = 0; i < g->n_vertices; i++) { g->vertices[i].component = -1; g->vertices[i].post = -1; } printf("post0=%d; i in dfs=%d\n", g->vertices[0].post, i); [printf's added by me] It appears that this loop, which is vectorized according to the vectorizer dump, doesn't manage to initialize g->vertices[i].post = -1 - the second printf outputs 0 instead of expected -1 leading to dfs falsely assuming that this vertex is new and crashing later: nvert= 10, nq in dfs=8, post0=0 post0=0; i in dfs=10 ../../gcc/gcc/crtstuff.c: In function __do_global_dtors_aux: ../../gcc/gcc/crtstuff.c:265: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html> for instructions. make[3]: *** [crtbegin.o] Error 1 make[3]: Leaving directory `/Develop/mainline/build/gcc' make[2]: *** [all-stage2-gcc] Error 2 make[2]: Leaving directory `/Develop/mainline/build' make[1]: *** [stage2-bubble] Error 2 make[1]: Leaving directory `/Develop/mainline/build' make: *** [all] Error 2 lnx-toshiba:/Develop/mainline/build # Vladimir -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28752
[Bug middle-end/28752] bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc and i386
--- Comment #27 from irar at il dot ibm dot com 2006-11-22 11:15 --- I committed the patch that enables vectorization of strided accesses (http://gcc.gnu.org/ml/gcc-patches/2006-03/msg01679.html), and now bootstrap with vectorization fails also on x86 with the same error as in comment #3. Here, the offending loop is cfgloopanal.c:153. Ira -- irar at il dot ibm dot com changed: What|Removed |Added GCC build triplet|powerpc64-linux |powerpc64-linux and and ||i386-linux GCC host triplet|powerpc64-linux |powerpc64-linux and i386- ||linux GCC target triplet|powerpc64-linux |powerpc64-linux and and ||i386-linux Summary|bootstrap comparision fails |bootstrap comparision fails |with "-ftree-vectorize -|with "-ftree-vectorize - |maltivec" on ppc|maltivec" on ppc and i386 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28752
[Bug middle-end/28752] bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc
--- Comment #22 from janis at gcc dot gnu dot org 2006-11-15 22:28 --- Ira, I keep running into problems with the regression hunt but I'm making progress. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28752
[Bug middle-end/28752] bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc
--- Comment #21 from irar at il dot ibm dot com 2006-11-12 09:56 --- Created an attachment (id=12598) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12598&action=view) The second part of the patch -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28752
[Bug middle-end/28752] bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc
--- Comment #20 from irar at il dot ibm dot com 2006-11-12 09:55 --- Created an attachment (id=12597) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12597&action=view) The first part of the patch -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28752
[Bug middle-end/28752] bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc
--- Comment #19 from irar at il dot ibm dot com 2006-11-12 09:52 --- Janis, Thanks a lot! The range of the revisions is 110758 - 111615 (110758 passes bootstrap with vectorization with the patch, 111615 fails with the error in comment #3). I had to modify the patch and split it into two patches in order to make it possible to apply the patch automatically (without rejections). I am attaching the two parts. Thanks, Ira -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28752
[Bug middle-end/28752] bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc
--- Comment #18 from janis187 at us dot ibm dot com 2006-11-09 17:34 --- Subject: Re: bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc On Thu, Nov 09, 2006 at 10:15:24AM -, irar at il dot ibm dot com wrote: > However, the failure in comment #3 still occurs in the later revisions. So, I > am going to hunt for a later patch that broke bootstrap with vectorization > (applying the above patch). I can do that with my regression hunt setup, if you'd like; it's set up to allow adding patches for each new version tested. Janis -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28752
[Bug middle-end/28752] bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc
--- Comment #17 from irar at il dot ibm dot com 2006-11-09 10:15 --- I applied the patch http://gcc.gnu.org/ml/gcc-patches/2006-07/msg01043.html (a fix for PR26197). The bootstrap with vectorization passes! However, the failure in comment #3 still occurs in the later revisions. So, I am going to hunt for a later patch that broke bootstrap with vectorization (applying the above patch). Ira -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28752
[Bug middle-end/28752] bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc
--- Comment #16 from law at redhat dot com 2006-11-08 18:29 --- Subject: Re: bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc On Wed, 2006-11-08 at 11:33 +, irar at il dot ibm dot com wrote: > > --- Comment #14 from irar at il dot ibm dot com 2006-11-08 11:33 --- > (In reply to comment #11) > > 1. Put a breakpoint in tree_ssa_cd_dce when compiling the > > offending function from recog.c.When that breakpoint > > triggers issue: > > verify_ssa (true) > > I can't see any way for that to fail, but better safe than > > sorry. > > It fails... [ ... ] > (gdb) p debug_generic_stmt (0xf74510f0) > # VUSE ; > # VUSE ; > opD.24623_172 = recog_dataD.15550.operandD.15539[opnoD.24621_29]; > Ah. I had discounted this scenario as I thought this class of problems had been fixed. We've got an operand inside a VUSE which was never placed into SSA form. This typically occurs when a pass mucks around with aliasing information. The vectorizer has been problematical in this respect. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26197 I think there are links inside that PR which point to other instances of this underlying problem. Anyway, what typically happens is the aliasing information gets mucked up by an early pass, but the affected statements aren't marked as modified and thus the mucked up aliasing information isn't exposed until some later pass (typically SSA updates due to jump threading) marks the statement as modified and rebuilds the operand cache, exposing the non-SSA operand. The pass following jump threading typically core dumps or triggers an assert like we're seeing in DCE. Because of the hidden nature of this problem it can be difficult to determine which pass mucked up the aliasing information. I think the easiest way to at least find out what pass is mucking things up is to insert some code like this at the start of verify_ssa FOR_EACH_BB (bb) for (bsi = bsi_start (bb); ! bsi_end_p (bsi); bsi_next (&bsi)) update_stmt (bsi_stmt (bsi)); In fact, one could argue that such code really belongs at the start of verify_ssa permanently. Hopefully you'll get a checking failure much earlier. At the least it'll allow you to look at the dump files for the first reference to SFT.1940D.29535 that is not in SSA form. If I had to venture a guess, my money would be on the vectorizer being the culprit here. Jeff -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28752
[Bug middle-end/28752] bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc
--- Comment #15 from irar at il dot ibm dot com 2006-11-08 12:05 --- Additional behavior: If I run bootstrap with BOOT_CFLAGS="-O2 -g -ftree-vectorize -maltivec" (without -fdump-tree-vect-details), bootstrap fails with ../../gcc/gcc/recog.c: In function constrain_operands: ../../gcc/gcc/recog.c:2270: internal compiler error: in mark_operand_necessary, at tree-ssa-dce.c:266 Then I compile recog.c alone with /Develop/main-110758/build-vect/./prev-gcc/xgcc -B/Develop/main-110758/build-vect/./prev-gcc/ -B/Develop/main-110758//powerpc64-suse-linux/bin/ -c -O2 -g -ftree-vectorize -maltivec -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror-DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include -I../../gcc/gcc/../libdecnumber -I../libdecnumber../../gcc/gcc/recog.c and again I get ../../gcc/gcc/recog.c: In function constrain_operands: ../../gcc/gcc/recog.c:2270: internal compiler error: in mark_operand_necessary, at tree-ssa-dce.c:266 With -quiet I get a different error: Program received signal SIGSEGV, Segmentation fault. 0x100b1dc4 in is_gimple_min_invariant (t=0x18) at ../../gcc/gcc/tree-gimple.c:172 172 switch (TREE_CODE (t)) (gdb) backtrace #0 0x100b1dc4 in is_gimple_min_invariant (t=0x18) at ../../gcc/gcc/tree-gimple.c:172 During symbol reading, incomplete CFI data; unspecified registers (e.g., r0) at 0x100b1dbc. During symbol reading, incomplete CFI data; unspecified registers (e.g., r2) at 0x100b1dbc. During symbol reading, incomplete CFI data; unspecified registers (e.g., r3) at 0x100b1dbc. During symbol reading, incomplete CFI data; unspecified registers (e.g., r4) at 0x100b1dbc. During symbol reading, incomplete CFI data; unspecified registers (e.g., r5) at 0x100b1dbc. During symbol reading, incomplete CFI data; unspecified registers (e.g., r6) at 0x100b1dbc. During symbol reading, incomplete CFI data; unspecified registers (e.g., r7) at 0x100b1dbc. During symbol reading, incomplete CFI data; unspecified registers (e.g., r8) at 0x100b1dbc. During symbol reading, incomplete CFI data; unspecified registers (e.g., r9) at 0x100b1dbc. During symbol reading, incomplete CFI data; unspecified registers (e.g., r10) at 0x100b1dbc. During symbol reading, incomplete CFI data; unspecified registers (e.g., r11) at 0x100b1dbc. During symbol reading, incomplete CFI data; unspecified registers (e.g., r12) at 0x100b1dbc. During symbol reading, incomplete CFI data; unspecified registers (e.g., r13) at 0x100b1dbc. During symbol reading, incomplete CFI data; unspecified registers (e.g., r14) at 0x100b1dbc. During symbol reading, incomplete CFI data; unspecified registers (e.g., r15) at 0x100b1dbc. During symbol reading, incomplete CFI data; unspecified registers (e.g., r16) at 0x100b1dbc. During symbol reading, incomplete CFI data; unspecified registers (e.g., r17) at 0x100b1dbc. During symbol reading, incomplete CFI data; unspecified registers (e.g., r18) at 0x100b1dbc. During symbol reading, incomplete CFI data; unspecified registers (e.g., r19) at 0x100b1dbc. During symbol reading, incomplete CFI data; unspecified registers (e.g., r20) at 0x100b1dbc. #1 0x1013f110 in replace_vuses_in (stmt=0xf74510f0, replaced_addresses_p=0xff8a9790 "", prop_value=0x10b6b238) at ../../gcc/gcc/tree-ssa-propagate.c:958 #2 0x1013f8d4 in substitute_and_fold (prop_value=0x10b6b238, use_ranges_p=0 '\0') at ../../gcc/gcc/tree-ssa-propagate.c:1139 #3 0x100dd070 in fini_copy_prop () at ../../gcc/gcc/tree-ssa-copy.c:914 #4 0x100dd158 in execute_copy_prop (store_copy_prop=0 '\0', phis_only=1 '\001') at ../../gcc/gcc/tree-ssa-copy.c:1035 #5 0x100dd204 in do_phi_only_copy_prop () at ../../gcc/gcc/tree-ssa-copy.c:1076 #6 0x1051b090 in execute_one_pass (pass=0x10915e68) at ../../gcc/gcc/passes.c:853 #7 0x1051b248 in execute_pass_list (pass=0x10915e68) at ../../gcc/gcc/passes.c:897 #8 0x1051b274 in execute_pass_list (pass=0x108875bc) at ../../gcc/gcc/passes.c:898 #9 0x100b1684 in tree_rest_of_compilation (fndecl=0xf7862d00) at ../../gcc/gcc/tree-optimize.c:412 #10 0x10016914 in c_expand_body (fndecl=0xf7862d00) at ../../gcc/gcc/c-decl.c:6689 #11 0x1059b894 in cgraph_expand_function (node=0xf75b3e00) at ../../gcc/gcc/cgraphunit.c:1101 #12 0x1059bb24 in cgraph_expand_all_functions () at ../../gcc/gcc/cgraphunit.c:1166 #13 0x1059c718 in cgraph_optimize () at ../../gcc/gcc/cgraphunit.c:1434 #14 0x1001a024 in c_write_global_declarations () at ../../gcc/gcc/c-decl.c:7804 #15 0x104d9928 in compile_file () at ../../gcc/gcc/toplev.c:1012 #16 0x104dbbe4 in do_compile () at ../../gcc/gcc/toplev.c:1957 #17 0x104dbc78 in toplev_main (argc=53, argv=0xff8a9ca4) at ../../gcc/gcc/toplev.c:1989 #18 0x10090518 in main (argc=53, argv=0xff8a9ca4) at ../../gcc/gcc/main.c:35 Moreover, if I add -fdump-tree-ve
[Bug middle-end/28752] bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc
--- Comment #14 from irar at il dot ibm dot com 2006-11-08 11:33 --- (In reply to comment #11) > 1. Put a breakpoint in tree_ssa_cd_dce when compiling the > offending function from recog.c.When that breakpoint > triggers issue: > verify_ssa (true) > I can't see any way for that to fail, but better safe than > sorry. It fails... Breakpoint 6, tree_ssa_cd_dce () at ../../gcc/gcc/tree-ssa-dce.c:947 947 perform_tree_ssa_dce (/*aggressive=*/optimize >= 2); (gdb) p verify_ssa (true) No symbol "true" in current context. (gdb) p verify_ssa (1) During symbol reading, incomplete CFI data; unspecified registers (e.g., r0) at 0x105d412c. During symbol reading, incomplete CFI data; unspecified registers (e.g., r2) at 0x105d412c. During symbol reading, incomplete CFI data; unspecified registers (e.g., r3) at 0x105d412c. During symbol reading, incomplete CFI data; unspecified registers (e.g., r4) at 0x105d412c. During symbol reading, incomplete CFI data; unspecified registers (e.g., r5) at 0x105d412c. During symbol reading, incomplete CFI data; unspecified registers (e.g., r6) at 0x105d412c. During symbol reading, incomplete CFI data; unspecified registers (e.g., r7) at 0x105d412c. During symbol reading, incomplete CFI data; unspecified registers (e.g., r8) at 0x105d412c. During symbol reading, incomplete CFI data; unspecified registers (e.g., r9) at 0x105d412c. During symbol reading, incomplete CFI data; unspecified registers (e.g., r10) at 0x105d412c. During symbol reading, incomplete CFI data; unspecified registers (e.g., r11) at 0x105d412c. During symbol reading, incomplete CFI data; unspecified registers (e.g., r12) at 0x105d412c. During symbol reading, incomplete CFI data; unspecified registers (e.g., r13) at 0x105d412c. During symbol reading, incomplete CFI data; unspecified registers (e.g., r14) at 0x105d412c. During symbol reading, incomplete CFI data; unspecified registers (e.g., r15) at 0x105d412c. During symbol reading, incomplete CFI data; unspecified registers (e.g., r16) at 0x105d412c. During symbol reading, incomplete CFI data; unspecified registers (e.g., r17) at 0x105d412c. During symbol reading, incomplete CFI data; unspecified registers (e.g., r18) at 0x105d412c. During symbol reading, incomplete CFI data; unspecified registers (e.g., r19) at 0x105d412c. During symbol reading, incomplete CFI data; unspecified registers (e.g., r20) at 0x105d412c. ../../gcc/gcc/recog.c: In function constrain_operands: ../../gcc/gcc/recog.c:2270: error: expected an SSA_NAME object Breakpoint 1, fancy_abort (file=0x10744d58 "../../gcc/gcc/tree-ssa-operands.c", line=1905, function=0x10745428 "verify_imm_links") at ../../gcc/gcc/diagnostic.c:642 642 internal_error ("in %s, at %s:%d", function, trim_filename (file), line); The program being debugged stopped while in a function called from GDB. When the function (verify_ssa) is done executing, GDB will silently stop (instead of continuing to evaluate the expression containing the function call). Backtrace: #0 fancy_abort (file=0x10744d58 "../../gcc/gcc/tree-ssa-operands.c", line=1905, function=0x10745428 "verify_imm_links") at ../../gcc/gcc/diagnostic.c:642 #1 0x100e4c10 in verify_imm_links (f=0xffec4a8, var=0xf6d34e40) at ../../gcc/gcc/tree-ssa-operands.c:1905 #2 0x100ac1fc in verify_use (bb=0xf73144d0, def_bb=0x1, use_p=0xf6beb118, stmt=0xf74510f0, check_abnormal=0 '\0', is_virtual=1 '\001', names_defined_in_bb=0x10a8d9d0) at ../../gcc/gcc/tree-ssa.c:228 #3 0x100ae404 in verify_ssa (check_modified_stmt=1 '\001') at ../../gcc/gcc/tree-ssa.c:735 #4 #5 tree_ssa_cd_dce () at ../../gcc/gcc/tree-ssa-dce.c:947 #6 0x1051b110 in execute_one_pass (pass=0x1088c584) at ../../gcc/gcc/passes.c:853 #7 0x1051b2c8 in execute_pass_list (pass=0x1088c584) at ../../gcc/gcc/passes.c:897 #8 0x1051b2f4 in execute_pass_list (pass=0x108876dc) at ../../gcc/gcc/passes.c:898 #9 0x100b1684 in tree_rest_of_compilation (fndecl=0xf7862d00) at ../../gcc/gcc/tree-optimize.c:412 #10 0x10016914 in c_expand_body (fndecl=0xf7862d00) at ../../gcc/gcc/c-decl.c:6689 #11 0x1059b914 in cgraph_expand_function (node=0xf75b3e00) at ../../gcc/gcc/cgraphunit.c:1101 #12 0x1059bba4 in cgraph_expand_all_functions () at ../../gcc/gcc/cgraphunit.c:1166 #13 0x1059c798 in cgraph_optimize () at ../../gcc/gcc/cgraphunit.c:1434 #14 0x1001a024 in c_write_global_declarations () at ../../gcc/gcc/c-decl.c:7804 #15 0x104d99a8 in compile_file () at ../../gcc/gcc/toplev.c:1012 #16 0x104dbc64 in do_compile () at ../../gcc/gcc/toplev.c:1957 #17 0x104dbcf8 in toplev_main (argc=54, argv=0xffdf2c74) at ../../gcc/gcc/toplev.c:1989 #18 0x10090518 in main (argc=54, argv=0xffdf2c74) at ../../gcc/gcc/main.c:35 (gdb) p debug_tree (0xf6d34e40) sizes-gimplified asm_written public unsigned SI size unit size align 32 symtab -137297872 alias set -1 pointer_to_this > asm_written BLK size
[Bug middle-end/28752] bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc
--- Comment #13 from irar at il dot ibm dot com 2006-11-08 08:41 --- Created an attachment (id=12568) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12568&action=view) "good" recog.i -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28752
[Bug middle-end/28752] bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc
--- Comment #12 from irar at il dot ibm dot com 2006-11-08 08:40 --- Jeff, Thanks a lot! I will do the things you've suggested shortly. Meanwhile, out of curiosity, I am attaching a "good" recog.i (built with vectorization enabled, but the offending loop was not vectorized). BTW, here is the compiler configuration: ../gcc/configure --enable-threads=posix --prefix=/Develop/main-110758/ --enable-checking=release --enable-ssp --disable-libssp --enable-java-awt=gtk --enable-gtk-cairo --disable-libjava-multilib --with-system-zlib --enable-shared --enable-__cxa_atexit --enable-libstdcxx-allocator=new --without-system-libunwind --with-cpu=default32 --enable-secureplt --with-long-double-128 --host=powerpc64-suse-linux --enable-languages=c,c++,fortran My system compiler is gcc version 4.1.0 (SUSE Linux). Thanks, Ira -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28752
[Bug middle-end/28752] bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc
--- Comment #11 from law at redhat dot com 2006-11-07 21:03 --- Subject: Re: bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc On Tue, 2006-11-07 at 08:31 +, irar at il dot ibm dot com wrote: > > --- Comment #9 from irar at il dot ibm dot com 2006-11-07 08:31 --- > In r110758 (and r110705) bootstrap with BOOT_CFLAGS="-O2 -g -ftree-vectorize > -maltivec" fails with another error: [ ... ] I've been unable to make any progress with this. It's not even clear to me right now that the .i file you sent is valid. Every compiler I've tried to use to process that .i file complains that the size of the test_real_width array is negative. Clearly I'm doing something different than you are. I can speculate that one of a few things might be happening. 1. We might have some kind of memory corruption or similar bug causing us to zero the SSA_NAME_DEF_STMT/TREE_CHAIN field of the affected SSA_NAME. Possible, but unlikely. 2. We have an SSA_NAME in the IL which was deleted. 3. Something else totally unexpected. #2 has happened in the past and I'd consider it the most likely culprit. What is interesting is that a checking failure was not triggered -- our SSA verifiers should be checking for case #2 and issuing an error. So let's start with checking a couple things. 1. Put a breakpoint in tree_ssa_cd_dce when compiling the offending function from recog.c.When that breakpoint triggers issue: verify_ssa (true) I can't see any way for that to fail, but better safe than sorry. 2. When the gcc_assert triggers, issue: debug_tree (op) debug_generic_stmt (op) 3. Send me the phi-only copyprop dumps. If #1 passes and #2 indicates the name in question is on the free list, then either DCE is mucking things up or we have out-of-date operands in the operand cache relative to the IL (which I can detect with the dumps). Jeff -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28752
[Bug middle-end/28752] bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc
--- Comment #10 from irar at il dot ibm dot com 2006-11-07 08:32 --- Created an attachment (id=12560) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12560&action=view) recog.i -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28752
[Bug middle-end/28752] bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc
--- Comment #9 from irar at il dot ibm dot com 2006-11-07 08:31 --- In r110758 (and r110705) bootstrap with BOOT_CFLAGS="-O2 -g -ftree-vectorize -maltivec" fails with another error: /Develop/main-110758/build-vect/./prev-gcc/xgcc -B/Develop/main-110758/build-vect/./prev-gcc/ -B/Develop/main-110758//powerpc64-suse-linux/bin/ -c -O2 -g -ftree-vectorize -maltivec -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -Werror-DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include -I../../gcc/gcc/../libdecnumber -I../libdecnumber../../gcc/gcc/regmove.c -o regmove.o ../../gcc/gcc/recog.c: In function constrain_operands: ../../gcc/gcc/recog.c:2270: internal compiler error: in mark_operand_necessary, at tree-ssa-dce.c:266 Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html> for instructions. make[3]: *** [recog.o] Error 1 make[3]: *** Waiting for unfinished jobs rm cpp.pod gfdl.pod gfortran.pod fsf-funding.pod gpl.pod gcc.pod gcov.pod make[3]: Leaving directory `/Develop/main-110758/build-vect/gcc' make[2]: *** [all-stage2-gcc] Error 2 make[2]: Leaving directory `/Develop/main-110758/build-vect' make[1]: *** [stage2-bubble] Error 2 make[1]: Leaving directory `/Develop/main-110758/build-vect' make: *** [bootstrap] Error 2 The "guilty" loop is recog.c:2283, i.e., forcing this loop not to get vectorized makes bootstrap with vectorization to pass. The backtrace: Breakpoint 1, fancy_abort (file=0x107b4668 "../../gcc/gcc/tree-ssa-dce.c", line=266, function=0x107b4930 "mark_operand_necessary") at ../../gcc/gcc/diagnostic.c:642 642 internal_error ("in %s, at %s:%d", function, trim_filename (file), line); (gdb) backtrace #0 fancy_abort (file=0x107b4668 "../../gcc/gcc/tree-ssa-dce.c", line=266, function=0x107b4930 "mark_operand_necessary") at ../../gcc/gcc/diagnostic.c:642 During symbol reading, incomplete CFI data; unspecified registers (e.g., r0) at 0x10203008. During symbol reading, incomplete CFI data; unspecified registers (e.g., r2) at 0x10203008. During symbol reading, incomplete CFI data; unspecified registers (e.g., r3) at 0x10203008. During symbol reading, incomplete CFI data; unspecified registers (e.g., r4) at 0x10203008. During symbol reading, incomplete CFI data; unspecified registers (e.g., r5) at 0x10203008. During symbol reading, incomplete CFI data; unspecified registers (e.g., r6) at 0x10203008. During symbol reading, incomplete CFI data; unspecified registers (e.g., r7) at 0x10203008. During symbol reading, incomplete CFI data; unspecified registers (e.g., r8) at 0x10203008. During symbol reading, incomplete CFI data; unspecified registers (e.g., r9) at 0x10203008. During symbol reading, incomplete CFI data; unspecified registers (e.g., r10) at 0x10203008. During symbol reading, incomplete CFI data; unspecified registers (e.g., r11) at 0x10203008. During symbol reading, incomplete CFI data; unspecified registers (e.g., r12) at 0x10203008. During symbol reading, incomplete CFI data; unspecified registers (e.g., r13) at 0x10203008. During symbol reading, incomplete CFI data; unspecified registers (e.g., r14) at 0x10203008. During symbol reading, incomplete CFI data; unspecified registers (e.g., r15) at 0x10203008. During symbol reading, incomplete CFI data; unspecified registers (e.g., r16) at 0x10203008. During symbol reading, incomplete CFI data; unspecified registers (e.g., r17) at 0x10203008. During symbol reading, incomplete CFI data; unspecified registers (e.g., r18) at 0x10203008. During symbol reading, incomplete CFI data; unspecified registers (e.g., r19) at 0x10203008. During symbol reading, incomplete CFI data; unspecified registers (e.g., r20) at 0x10203008. #1 0x105d2654 in mark_operand_necessary (op=0xf6d34e40, phionly=0 '\0') at ../../gcc/gcc/tree-ssa-dce.c:266 #2 0x105d218c in propagate_necessity (el=0x10ad6000) at ../../gcc/gcc/tree-ssa-dce.c:553 #3 0x105d401c in perform_tree_ssa_dce (aggressive=1 '\001') at ../../gcc/gcc/tree-ssa-dce.c:906 #4 0x105d4148 in tree_ssa_cd_dce () at ../../gcc/gcc/tree-ssa-dce.c:947 #5 0x1051b110 in execute_one_pass (pass=0x1088c584) at ../../gcc/gcc/passes.c:853 #6 0x1051b2c8 in execute_pass_list (pass=0x1088c584) at ../../gcc/gcc/passes.c:897 #7 0x1051b2f4 in execute_pass_list (pass=0x108876dc) at ../../gcc/gcc/passes.c:898 #8 0x100b1684 in tree_rest_of_compilation (fndecl=0xf7862d00) at ../../gcc/gcc/tree-optimize.c:412 #9 0x10016914 in c_expand_body (fndecl=0xf7862d00) at ../../gcc/gcc/c-decl.c:6689 #10 0x1059b914 in cgraph_expand_function (node=0xf75b3e00) at ../../gcc/gcc/cgraphunit.c:1101 #11 0x1059bba4 in cgraph_expand_all_functions () at ../../gcc/gcc/cgraphunit.c:1166 #12 0x1059c798 in cgraph_optimize () at ../../gcc/gcc/cgraphunit.c:1434 #13
[Bug middle-end/28752] bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc
--- Comment #8 from law at redhat dot com 2006-11-06 17:37 --- Subject: Re: bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc On Mon, 2006-11-06 at 09:39 +, irar at il dot ibm dot com wrote: > > --- Comment #7 from irar at il dot ibm dot com 2006-11-06 09:38 --- > Janis - thanks a lot for your help! > > > http://gcc.gnu.org/viewcvs?view=rev&rev=110705 > > r110705 | law | 2006-02-07 18:31:27 + (Tue, 07 Feb 2006) > > In r110704 bootstrap passes with and w/o vectorization enabled, and in r110705 > boostrap fails in both cases (also without vectorization). > > The patch > > 2006-02-08 Jeff Law <[EMAIL PROTECTED]> > > PR tree-optimization/26169 > * tree-vrp.c (execute_vrp): Perform any queued SSA updates before > threading jumps. > > (http://gcc.gnu.org/viewcvs?view=rev&revision=110758) > > fixes bootstrap without vectorization, but bootstrap with "BOOT_CFLAGS="-O2 -g > -ftree-vectorize -maltivec" still fails. Unfortunately I don't have a PPC64 I can use for bootstrap tests. However, the failure you're seeing occurs when the stage1 compiler is compiling crtbegin (or some other file), then send me the appropriate .i file and I will be able to look at it with a cross compiler. Jeff -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28752
[Bug middle-end/28752] bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc
--- Comment #7 from irar at il dot ibm dot com 2006-11-06 09:38 --- Janis - thanks a lot for your help! > http://gcc.gnu.org/viewcvs?view=rev&rev=110705 > r110705 | law | 2006-02-07 18:31:27 + (Tue, 07 Feb 2006) In r110704 bootstrap passes with and w/o vectorization enabled, and in r110705 boostrap fails in both cases (also without vectorization). The patch 2006-02-08 Jeff Law <[EMAIL PROTECTED]> PR tree-optimization/26169 * tree-vrp.c (execute_vrp): Perform any queued SSA updates before threading jumps. (http://gcc.gnu.org/viewcvs?view=rev&revision=110758) fixes bootstrap without vectorization, but bootstrap with "BOOT_CFLAGS="-O2 -g -ftree-vectorize -maltivec" still fails. Ira -- irar at il dot ibm dot com changed: What|Removed |Added CC||law at redhat dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28752
[Bug middle-end/28752] bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc
--- Comment #6 from janis at gcc dot gnu dot org 2006-11-03 00:08 --- A regression hunt on powerpc64-linux identified the following large patch: http://gcc.gnu.org/viewcvs?view=rev&rev=110705 r110705 | law | 2006-02-07 18:31:27 + (Tue, 07 Feb 2006) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28752
[Bug middle-end/28752] bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc
--- Comment #5 from irar at il dot ibm dot com 2006-11-02 11:44 --- I found that revision 110671 passed bootstrap with vectorization enabled, and revision 110846 failed bootstrap with vectorization enabled (but passed w/o). Janis - could you help track down the patch that exposed/caused the bootstrap failure with "BOOT_CFLAGS="-O2 -g -ftree-vectorize -maltivec""? Ira -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28752
[Bug middle-end/28752] bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc
--- Comment #4 from irar at il dot ibm dot com 2006-11-02 11:18 --- The loop at config/rs6000/rs6000.c:3674 requires versioning for alignment, so when bootstrapping with "-ftree-vectorize -fno-tree-vect-loop-version" it does not get vectorized. However, we still fail bootstrap... This is the failure we get: /home/irar/main-boot/build17/./gcc/xgcc -B/home/irar/main-boot/build17/./gcc/ -B/home/irar/main-boot/ppc64-redhat-linux/bin/ -B/home/irar/main-boot/ppc64-redhat-linux/lib/ -isystem /home/irar/main-boot/ppc64-redhat-linux/include -isystem /home/irar/main-boot/ppc64-redhat-linux/sys-include -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include -I../../gcc/gcc/../libdecnumber -I../libdecnumber -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-toplevel-reorder -msdata=none \ -c ../../gcc/gcc/crtstuff.c -DCRT_BEGIN \ -o crtbegin.o ../../gcc/gcc/crtstuff.c: In function â__do_global_dtors_auxâ: ../../gcc/gcc/crtstuff.c:304: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html> for instructions. make[3]: *** [crtbegin.o] Error 1 make[3]: *** Waiting for unfinished jobs rm fsf-funding.pod gcov.pod gfdl.pod cpp.pod gcc.pod gfortran.pod gpl.pod make[3]: Leaving directory `/home/irar/main-boot/build17/gcc' make[2]: *** [all-stage2-gcc] Error 2 make[2]: Leaving directory `/home/irar/main-boot/build17' make[1]: *** [stage2-bubble] Error 2 make[1]: Leaving directory `/home/irar/main-boot/build17' make: *** [bootstrap] Error 2 I found that this time a different loop in rs6000 is related to the failure - when it is vectorized, the Stage2 compiler is "bad", and when we force the loop not to be vectorized, the Stage2 compiler is "good" (bootstrap passes with vectorization enabled). The loop is config/rs6000/rs6000.c:17204: for (i = 0; i < issue_rate; i++) { group_insns[i] = 0; } Looks like the problem is not related to some specific loop vectorization. Don't know if it makes sense to try to create a reduced testcase (or how...). Ira -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28752
[Bug middle-end/28752] bootstrap comparision fails with "-ftree-vectorize -maltivec" on ppc
--- Comment #3 from irar at il dot ibm dot com 2006-10-30 11:33 --- I am getting another failure: /home/irar/main-boot/build7/./gcc/xgcc -B/home/irar/main-boot/build7/./gcc/ -B/home/irar/main-boot/ppc64-redhat-linux/bin/ -B/home/irar/main-boot/ppc64-redhat-linux/lib/ -isystem /home/irar/main-boot/ppc64-redhat-linux/include -isystem /home/irar/main-boot/ppc64-redhat-linux/sys-include -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -I. -Inof -I../../gcc/gcc -I../../gcc/gcc/nof -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include -I../../gcc/gcc/../libdecnumber -I../libdecnumber -msoft-float -fPIC -mstrict-align -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-toplevel-reorder -msdata=none \ -c ../../gcc/gcc/crtstuff.c -DCRT_END \ -o nof/crtend.o ../../gcc/gcc/crtstuff.c: In function â__do_global_dtors_auxâ: ../../gcc/gcc/crtstuff.c:304: internal compiler error: in push_reload, at reload.c:1294 Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html> for instructions. ../../gcc/gcc/crtstuff.c: In function â__do_global_ctors_auxâ: ../../gcc/gcc/crtstuff.c:522: internal compiler error: in push_reload, at reload.c:1294 Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html> for instructions. make[5]: *** [nof/crtbegin.o] Error 1 make[5]: *** Waiting for unfinished jobs make[5]: *** [nof/crtend.o] Error 1 make[5]: Leaving directory `/home/irar/main-boot/build7/gcc' make[4]: *** [extranof] Error 2 make[4]: Leaving directory `/home/irar/main-boot/build7/gcc' I found out that this happens when the loop in config/rs6000/rs6000.c:3674 is vectorized. Here it is: for (i = 32; i < 64; i++) fixed_regs[i] = call_used_regs[i] = call_really_used_regs[i] = 1; Also if the loop is split to for (i = 32; i < 64; i++) fixed_regs[i] = 1; and the rest, and only this loop is vectorized, the same error occurs. I made a testcase with the original loop, but it works fine. Ira -- irar at il dot ibm dot com changed: What|Removed |Added CC||irar at il dot ibm dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28752