[Bug tree-optimization/96522] [9/10 Regression] Incorrect with with -O -fno-tree-pta

2020-09-14 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96522

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

https://gcc.gnu.org/g:1dbb919d0868319a5503b91049283a189ac1b4ac

commit r10-8760-g1dbb919d0868319a5503b91049283a189ac1b4ac
Author: Richard Biener 
Date:   Thu Aug 27 11:48:15 2020 +0200

tree-optimization/96522 - transfer of flow-sensitive info in copy_ref_info

This removes the bogus tranfer of flow-sensitive info in copy_ref_info
plus fixes one oversight in FRE when flow-sensitive non-NULLness was added
to
points-to info.

2020-08-27  Richard Biener  

PR tree-optimization/96522
* tree-ssa-address.c (copy_ref_info): Reset flow-sensitive
info of the copied points-to.  Transfer bigger alignment
via the access type.
* tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt):
Reset all flow-sensitive info.

* gcc.dg/torture/pr96522.c: New testcase.

(cherry picked from commit eb68d9d828f94d28afa5900fbf3072bbcd64ba8a)

[Bug tree-optimization/96522] [9/10 Regression] Incorrect with with -O -fno-tree-pta

2020-09-11 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96522

--- Comment #7 from Richard Biener  ---
(In reply to Richard Biener from comment #6)
> Hmm, picking the ref onto gcc-10 causes
> 
> FAIL: gcc.dg/vect/pr81410.c execution test
> 
> due to an unaligned access.

Looks like a latent issue.  The following on an unpatched tree is enough
to provoke the FAIL (but ptr-info should not affect correctness).

diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 9ace345fc5e..ea32b70a4f3 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -9565,10 +9567,12 @@ vectorizable_load (stmt_vec_info stmt_info,
gimple_stmt_iterator *gsi,
  }
else
  misalign = DR_MISALIGNMENT (first_dr_info);
+#if 0
if (dataref_offset == NULL_TREE
&& TREE_CODE (dataref_ptr) == SSA_NAME)
  set_ptr_info_alignment (get_ptr_info (dataref_ptr),
  align, misalign);
+#endif

if (final_mask)
  {

[Bug tree-optimization/96522] [9/10 Regression] Incorrect with with -O -fno-tree-pta

2020-09-11 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96522

--- Comment #6 from Richard Biener  ---
Hmm, picking the ref onto gcc-10 causes

FAIL: gcc.dg/vect/pr81410.c execution test

due to an unaligned access.