[Bug tree-optimization/114068] [14 regression] ICE when building darktable-4.6.1 (error: PHI node with wrong VUSE on edge from BB 25) since r14-8768
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114068 Richard Biener changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #16 from Richard Biener --- Should be fixed.
[Bug tree-optimization/114068] [14 regression] ICE when building darktable-4.6.1 (error: PHI node with wrong VUSE on edge from BB 25) since r14-8768
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114068 --- Comment #15 from GCC Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:8293df8019adfffae3384cb6fb9cb6f496fe8608 commit r14-9181-g8293df8019adfffae3384cb6fb9cb6f496fe8608 Author: Richard Biener Date: Mon Feb 26 11:25:50 2024 +0100 tree-optimization/114068 - missed virtual LC PHI after vect peeling When we choose the IV exit to be one leading to no virtual use we fail to have a virtual LC PHI even though we need it for the epilog entry. The following makes sure to create it so that later updating works. PR tree-optimization/114068 * tree-vect-loop-manip.cc (get_live_virtual_operand_on_edge): New function. (slpeel_tree_duplicate_loop_to_edge_cfg): Add a virtual LC PHI on the main exit if needed. Remove band-aid for the case it was missing. * gcc.dg/vect/vect-early-break_118-pr114068.c: New testcase. * gcc.dg/vect/vect-early-break_119-pr114068.c: Likewise.
[Bug tree-optimization/114068] [14 regression] ICE when building darktable-4.6.1 (error: PHI node with wrong VUSE on edge from BB 25) since r14-8768
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114068 --- Comment #14 from Tamar Christina --- patch submitted https://gcc.gnu.org/pipermail/gcc-patches/2024-February/646415.html
[Bug tree-optimization/114068] [14 regression] ICE when building darktable-4.6.1 (error: PHI node with wrong VUSE on edge from BB 25) since r14-8768
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114068 --- Comment #13 from Tamar Christina --- Created attachment 57510 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57510=edit candidate-patch1.patch candidate patch being tested. I was hoping to correct it during peeling itself when the merge block is created, but I don't have enough information there to do so.
[Bug tree-optimization/114068] [14 regression] ICE when building darktable-4.6.1 (error: PHI node with wrong VUSE on edge from BB 25) since r14-8768
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114068 --- Comment #12 from Tamar Christina --- looks like the moving of the store didn't update a stray out of block use of the MEM. working on patch.
[Bug tree-optimization/114068] [14 regression] ICE when building darktable-4.6.1 (error: PHI node with wrong VUSE on edge from BB 25) since r14-8768
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114068 Tamar Christina changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |tnfchris at gcc dot gnu.org Status|NEW |ASSIGNED --- Comment #11 from Tamar Christina --- reduced to --- struct h { int b; int f; } k; void n(int m) { struct h a = k; for (int o = m; o; ++o) { if (a.f) __builtin_unreachable(); if (o > 1) __builtin_unreachable(); *( + o) = 1; } } --- which fails on aarch64 too
[Bug tree-optimization/114068] [14 regression] ICE when building darktable-4.6.1 (error: PHI node with wrong VUSE on edge from BB 25) since r14-8768
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114068 --- Comment #10 from Sam James --- last one: ``` struct c { int b; int *d(int e) { return + e; } }; struct g { c base; int f; void j() { if (f) __builtin_unreachable(); } int (int e) { if (e > 1) __builtin_unreachable(); return *base.d(e); } } l; struct h { g i; void q() { i.j(); } } k; int m; void n() { h a = k; for (int o = m; o; ++o) { a.q(); l.p(o) = 1; } } ```
[Bug tree-optimization/114068] [14 regression] ICE when building darktable-4.6.1 (error: PHI node with wrong VUSE on edge from BB 25) since r14-8768
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114068 --- Comment #9 from Sam James --- ``` template struct Array1DRef { T data; T *addressOf(int eltIdx) { return + eltIdx; } }; template struct CroppedArray1DRef { Array1DRef base; int numElts; void getAsArray1DRef() { if (numElts) __builtin_unreachable(); } T ()(int eltIdx) { if (eltIdx > numElts) __builtin_unreachable(); return *base.addressOf(eltIdx); } }; struct Array2DRef { CroppedArray1DRef __trans_tmp_2; void operator[](int) { __trans_tmp_2.getAsArray1DRef(); } } clearArea_base0; CroppedArray1DRef __trans_tmp_1; int clearArea_y, clearArea_posx; void clearArea() { Array2DRef base = clearArea_base0; for (int x = clearArea_posx; x; ++x) { base.operator[](clearArea_y); __trans_tmp_1(x) = 0; } } ```
[Bug tree-optimization/114068] [14 regression] ICE when building darktable-4.6.1 (error: PHI node with wrong VUSE on edge from BB 25) since r14-8768
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114068 Andrew Pinski changed: What|Removed |Added Attachment #57508|0 |1 is obsolete|| --- Comment #8 from Andrew Pinski --- Created attachment 57509 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57509=edit Little further reduced I am done reducing this for tonight, if someone wants to take over to manually reduce it further that would be nice.
[Bug tree-optimization/114068] [14 regression] ICE when building darktable-4.6.1 (error: PHI node with wrong VUSE on edge from BB 25) since r14-8768
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114068 --- Comment #7 from Andrew Pinski --- Created attachment 57508 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57508=edit Reduced a lot This could be reduced more though.
[Bug tree-optimization/114068] [14 regression] ICE when building darktable-4.6.1 (error: PHI node with wrong VUSE on edge from BB 25) since r14-8768
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114068 Jakub Jelinek changed: What|Removed |Added Summary|[14 regression] ICE when|[14 regression] ICE when |building darktable-4.6.1|building darktable-4.6.1 |(error: PHI node with wrong |(error: PHI node with wrong |VUSE on edge from BB 25)|VUSE on edge from BB 25) ||since r14-8768 Priority|P3 |P1 CC||jakub at gcc dot gnu.org, ||tnfchris at gcc dot gnu.org --- Comment #6 from Jakub Jelinek --- Started with r14-8768-g85094e2aa6dba7908f053046f02dd443e8f65d72