[Bug tree-optimization/61929] [Graphite]: Banerjee and Omega differ on distance vectors (internal compiler error in compute_affine_dependence)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61929 --- Comment #13 from David Kredba --- Do you plan a backport to gcc-5.x branch please?
[Bug tree-optimization/61929] [Graphite]: Banerjee and Omega differ on distance vectors (internal compiler error in compute_affine_dependence)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61929 Sebastian Pop changed: What|Removed |Added CC||fragabr at gmail dot com --- Comment #12 from Sebastian Pop --- *** Bug 65850 has been marked as a duplicate of this bug. ***
[Bug tree-optimization/61929] [Graphite]: Banerjee and Omega differ on distance vectors (internal compiler error in compute_affine_dependence)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61929 Sebastian Pop changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #11 from Sebastian Pop --- Fixed.
[Bug tree-optimization/61929] [Graphite]: Banerjee and Omega differ on distance vectors (internal compiler error in compute_affine_dependence)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61929 --- Comment #10 from Sebastian Pop --- Author: spop Date: Fri Jul 17 16:34:21 2015 New Revision: 225942 URL: https://gcc.gnu.org/viewcvs?rev=225942&root=gcc&view=rev Log: [graphite] fix pr61929 This fixes bootstrap of GCC with BOOT_CFLAGS="-g -O2 -fgraphite-identity -floop-nest-optimize -floop-block -floop-interchange -floop-strip-mine". It passes regstrap on amd64-linux. A previous change (https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=213816), replaced isl_int with isl_val because isl_int would be deprecated. Since isl_val has stricter checks, it exposed the bug. In the test case (isl_set_max_val) would return infinity which would remain unchecked. We now check if the value returned is an integer or not, and bail out if it isn't. The other problem was that we were allowing all kinds of data-refs in a scop. Now we discard a scop if it has any date-ref other than (ARRAY_REF, MEM_REF, COMPONENT_REF). PR middle-end/61929 * graphite-dependences.c (add_pdr_constraints): Renamed pdr->extent to pdr->subscript_sizes. * graphite-interchange.c (build_linearized_memory_access): Add back all gcc_assert's that the "isl_int to isl_val conversion" patch has removed. Refactored. (pdr_stride_in_loop): Renamed pdr->extent to pdr->subscript_sizes. * graphite-poly.c (new_poly_dr): Same. (free_poly_dr): Same. * graphite-poly.h (struct poly_dr): Same. * graphite-scop-detection.c (stmt_has_simple_data_refs_p): Ignore all data references other than ARRAY_REF, MEM_REF, and COMPONENT_REF. * graphite-scop-detection.h: Fix space. * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Add back all gcc_assert's removed by a previous patch. (wrap): Remove the_isl_ctx global variable that the same patch has added. (build_loop_iteration_domains): Same. (add_param_constraints): Same. (pdr_add_data_dimensions): Same. Refactored. (build_poly_dr): Renamed extent to subscript_sizes. testsuite/ PR middle-end/61929 * gcc.dg/graphite/pr61929.c: New. Added: trunk/gcc/testsuite/gcc.dg/graphite/pr61929.c Modified: trunk/gcc/ChangeLog trunk/gcc/graphite-dependences.c trunk/gcc/graphite-interchange.c trunk/gcc/graphite-poly.c trunk/gcc/graphite-poly.h trunk/gcc/graphite-scop-detection.c trunk/gcc/graphite-scop-detection.h trunk/gcc/graphite-sese-to-poly.c trunk/gcc/testsuite/ChangeLog
[Bug tree-optimization/61929] [Graphite]: Banerjee and Omega differ on distance vectors (internal compiler error in compute_affine_dependence)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61929 Sebastian Pop changed: What|Removed |Added CC||spop at gcc dot gnu.org --- Comment #9 from Sebastian Pop --- Bug was exposed by r213816 https://github.com/gcc-mirror/gcc/commit/ea48ac017975b0f0d4bd1ebd4b25fc658ba5f033 The bug is because we are not checking for the return value of the min/max operations, that could return infinity when the problem is not bounded. The new interface of ISL for integers returns an isl_val "infty" that is not handled by the code. Testing a fix that enables gcc to pass bootstrap with graphite flags enabled.
[Bug tree-optimization/61929] [Graphite]: Banerjee and Omega differ on distance vectors (internal compiler error in compute_affine_dependence)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61929 --- Comment #8 from Charles Greathouse --- Full trace for last: isl_constraint.c:625: expecting integer value testcase.c: In function ‘generateICE’: testcase.c:8:6: internal compiler error: Aborted void generateICE(void) { ^ 0x9957bf crash_signal ../../gcc-5.1.0-source/gcc/toplev.c:383 0xf0c081 build_linearized_memory_access ../../gcc-5.1.0-source/gcc/graphite-interchange.c:128 0xf0c081 pdr_stride_in_loop ../../gcc-5.1.0-source/gcc/graphite-interchange.c:214 0xf0c081 memory_strides_in_loop_1 ../../gcc-5.1.0-source/gcc/graphite-interchange.c:300 0xf10f2a lst_interchange_profitable_p ../../gcc-5.1.0-source/gcc/graphite-interchange.c:417 0xf10f2a lst_try_interchange_loops ../../gcc-5.1.0-source/gcc/graphite-interchange.c:554 0xf10f2a lst_interchange_select_inner ../../gcc-5.1.0-source/gcc/graphite-interchange.c:617 0xf13b10 lst_interchange_select_outer ../../gcc-5.1.0-source/gcc/graphite-interchange.c:643 0xf13b5d lst_interchange_select_outer ../../gcc-5.1.0-source/gcc/graphite-interchange.c:653 0xf13bab scop_do_interchange(scop*) ../../gcc-5.1.0-source/gcc/graphite-interchange.c:665 0xe71eaa apply_poly_transforms(scop*) ../../gcc-5.1.0-source/gcc/graphite-poly.c:279 0xe6db18 graphite_transform_loops() ../../gcc-5.1.0-source/gcc/graphite.c:309 0xe6df90 graphite_transforms ../../gcc-5.1.0-source/gcc/graphite.c:338 0xe6df90 execute ../../gcc-5.1.0-source/gcc/graphite.c:419
[Bug tree-optimization/61929] [Graphite]: Banerjee and Omega differ on distance vectors (internal compiler error in compute_affine_dependence)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61929 --- Comment #7 from Charles Greathouse --- Here's a testcase which fails without -fcheck-data-deps. Run gcc5.1 testcase.c -O2 -ftree-loop-linear -floop-strip-mine to reproduce: typedef struct m { const char * s1; const char * s2; } mystruct; mystruct arr[52]; void main() {} void generateICE(void) { int i; for(i=0; i<52; i++) { arr[i].s1 = ""; arr[i].s2 = 0; } }
[Bug tree-optimization/61929] [Graphite]: Banerjee and Omega differ on distance vectors (internal compiler error in compute_affine_dependence)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61929 Charles Greathouse changed: What|Removed |Added Version|4.9.1 |5.1.0 Known to fail||5.1.0 --- Comment #6 from Charles Greathouse --- The RIES source still produces an ICE in gcc 5.1.0. New minimized testcase for gcc-5.1: signed short debug_A; void generateICE(char *str) { char d; while(d = *str) { if (d=='a') debug_A |= 1; } }
[Bug tree-optimization/61929] [Graphite]: Banerjee and Omega differ on distance vectors (internal compiler error in compute_affine_dependence)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61929 --- Comment #5 from Charles Greathouse --- Created attachment 35826 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35826&action=edit -freport-bug preprocessed file This is the source file produced by -freport-bug in gcc 5.1.0.
[Bug tree-optimization/61929] Graphite: Banerjee and Omega differ on distance vectors (internal compiler error in compute_affine_dependence)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61929 --- Comment #4 from Charles Greathouse --- I now have a testcase for failure with -floop-parallelize-all (without -fcheck-data-deps). I believe this is the same bug, or at least related, because this testcase also fails with the previous compile command. int main() {} void generateICE2(char *s, int i) { for (; i >= 2; i--) s[i] = s[i-1]; } This fails with gcc testcase.c -lm -O2 -floop-parallelize-all -floop-nest-optimize or even gcc testcase.c -lm -O2 -floop-parallelize-all -floop-nest-optimize -fno-aggressive-loop-optimizations -fno-align-functions -fno-align-jumps -fno-align-labels -fno-align-loops -fno-asynchronous-unwind-tables -fno-branch-count-reg -fno-caller-saves -fno-combine-stack-adjustments -fno-common -fno-compare-elim -fno-cprop-registers -fno-crossjumping -fno-cse-follow-jumps -fno-dce -fno-defer-pop -fno-delete-null-pointer-checks -fno-devirtualize -fno-dse -fno-early-inlining -fno-expensive-optimizations -fno-forward-propagate -fno-gcse -fno-gcse-lm -fno-guess-branch-probability -fno-hoist-adjacent-loads -fno-if-conversion -fno-if-conversion2 -fno-inline -fno-inline-atomics -fno-inline-functions-called-once -fno-inline-small-functions -fno-ipa-cp -fno-ipa-profile -fno-ipa-pure-const -fno-ipa-reference -fno-ipa-sra -fno-ira-hoist-pressure -fno-ivopts -fno-jump-tables -fno-math-errno -fno-merge-constants -fno-move-loop-invariants -fno-optimize-register-move -fno-optimize-sibling-calls -fno-optimize-strlen -fno-peephole -fno-peephole2 -fno-prefetch-loop-arrays -fno-regmove -fno-rename-registers -fno-reorder-blocks -fno-reorder-functions -fno-rerun-cse-after-loop -fno-sched-critical-path-heuristic -fno-sched-dep-count-heuristic -fno-sched-group-heuristic -fno-sched-interblock -fno-sched-last-insn-heuristic -fno-sched-rank-heuristic -fno-sched-spec -fno-sched-spec-insn-heuristic -fno-sched-stalled-insns-dep -fno-schedule-insns2 -fno-set-stack-executable -fno-short-enums -fno-shrink-wrap -fno-signed-zeros -fno-split-ivs-in-unroller -fno-split-wide-types -fno-strict-aliasing -fno-thread-jumps -fno-trapping-math -fno-tree-bit-ccp -fno-toplevel-reorder -fno-tree-builtin-call-dce -fno-tree-ccp -fno-tree-coalesce-vars -fno-tree-copy-prop -fno-tree-copyrename -fno-tree-cselim -fno-tree-dce -fno-tree-dominator-opts -fno-tree-dse -fno-tree-forwprop -fno-tree-fre -fno-tree-loop-if-convert -fno-tree-loop-im -fno-tree-loop-ivcanon -fno-tree-phiprop -fno-tree-pre -fno-tree-pta -fno-tree-reassoc -fno-tree-scev-cprop -fno-tree-sink -fno-tree-slp-vectorize -fno-tree-slsr -fno-tree-sra -fno-tree-switch-conversion -fno-tree-tail-merge -fno-tree-ter -fno-tree-vect-loop-version -fno-tree-vrp -fno-unit-at-a-time -fno-var-tracking -fno-var-tracking-assignments -fno-web which is -O2 with everything but floop-parallelize-all -floop-nest-optimize -ftree-loop-optimize -ftree-ch -fthreadsafe-statics turned off. However the bug does not appear at -O1 and below even with these options.
[Bug tree-optimization/61929] Graphite: Banerjee and Omega differ on distance vectors (internal compiler error in compute_affine_dependence)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61929 --- Comment #3 from Charles Greathouse --- This appears to also block -floop-parallelize-all from functioning in these cases.
[Bug tree-optimization/61929] Graphite: Banerjee and Omega differ on distance vectors (internal compiler error in compute_affine_dependence)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61929 Charles Greathouse changed: What|Removed |Added Known to fail||4.8.3, 4.9.1 --- Comment #2 from Charles Greathouse --- Minimal testcase (original function was ries_to_digits): void generateICE(char *s, int p) { int i; for (i = p; i > 0; i--) { if (s[i] < '0') s[i-1]--; } }
[Bug tree-optimization/61929] Graphite: Banerjee and Omega differ on distance vectors (internal compiler error in compute_affine_dependence)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61929 Charles Greathouse changed: What|Removed |Added Keywords||ice-checking, ||ice-on-valid-code Version|unknown |4.9.1 --- Comment #1 from Charles Greathouse --- I'm working on minimizing a testcase now. The file I linked to has about 12,000 lines of code and the current minimized version has 400. I'll continue working on it until it's hopefully a tenth of that.