[Bug tree-optimization/126926] ICE on valid code at -O{2,3} with "-fno-tree-fre -fno-code-hoisting -fno-tree-dominator-opts -fno-tree-forwprop -fno-tree-ccp -fno-tree-pre" on x86_64-linux-gnu: verify_ssa failed

"rguenth at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126926

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
OK, so the issue is that we have two SLP instances interacting at the
c_13 definition point of a vector which is both a vector CTOR root
for one instance and the leaf (existing vector) of a reduction instance:

  a.0_1 = a;
  _2 = a.0_1 + 0.0;
  c_12 = BIT_INSERT_EXPR <c_11(D), _2, 32>;
  a.1_3 = a;
  _4 = a.1_3 + 0.0;
  c_13 = BIT_INSERT_EXPR <c_12, _4, 0>;
  _5 = BIT_FIELD_REF <c_13, 32, 32>;
  _6 = _5 * 0.0;
  _7 = BIT_FIELD_REF <c_13, 32, 32>;
  _8 = _7 * 2.0e+0;
  _9 = _6 + _8;

When we transform the CTOR instance first we replace the c_13 definition
in vectorize_slp_instance_root_stmt replacing the original one and that
disrupts the SLP scheduling process of the 2nd as the replacement now
appears to be outside of the SLP region.  We can avoid this and retain
the original stmt.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.