[Bug tree-optimization/107107] [10/11/12 Regression] Wrong codegen from TBAA when stores to distinct same-mode types are collapsed?

2022-10-17 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107107

--- Comment #12 from CVS Commits  ---
The releases/gcc-12 branch has been updated by Richard Biener
:

https://gcc.gnu.org/g:ff0a274e5c3026b105c7f51126fa51f8178fa42c

commit r12-8838-gff0a274e5c3026b105c7f51126fa51f8178fa42c
Author: Richard Biener 
Date:   Thu Oct 6 11:20:16 2022 +0200

tree-optimization/107107 - tail-merging VN wrong-code

The following fixes an unintended(?) side-effect of the special
MODIFY_EXPR expression entries we add for tail-merging during VN.
We shouldn't value-number the virtual operand differently here.

PR tree-optimization/107107
* tree-ssa-sccvn.cc (visit_reference_op_store): Do not
affect value-numbering when doing the tail merging
MODIFY_EXPR lookup.

* gcc.dg/pr107107.c: New testcase.

(cherry picked from commit 85333b9265720fc4e49397301cb16324d2b89aa7)

[Bug tree-optimization/107107] [10/11/12 Regression] Wrong codegen from TBAA when stores to distinct same-mode types are collapsed?

2022-10-06 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107107

Richard Biener  changed:

   What|Removed |Added

  Known to work||13.0
Summary|[10/11/12/13 Regression]|[10/11/12 Regression] Wrong
   |Wrong codegen from TBAA |codegen from TBAA when
   |when stores to distinct |stores to distinct
   |same-mode types are |same-mode types are
   |collapsed?  |collapsed?

--- Comment #11 from Richard Biener  ---
Fixed on trunk sofar.