tree-optimization/95295 - fix sinking after path merging in new SM code
authorRichard Biener <rguenther@suse.de>
Wed, 27 May 2020 11:05:07 +0000 (13:05 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 27 May 2020 12:56:43 +0000 (14:56 +0200)
commit6c8e16aea85286721eb5689f9bcae09d36003cb1
tree5ba8850a16c0471d29e9772abbe218c45acf3286
parent116e3cfc7b8ab8afc4bdbc03db6b194413218af7
tree-optimization/95295 - fix sinking after path merging in new SM code

This fixes a missed sinking of remat stores across unrelated stores
after merging from different paths.

2020-05-27  Richard Biener  <rguenther@suse.de>

PR tree-optimization/95295
* tree-ssa-loop-im.c (sm_seq_valid_bb): Fix sinking after
merging stores from paths.

* gcc.dg/torture/pr95295-3.c: New testcase.
gcc/testsuite/gcc.dg/torture/pr95295-3.c [new file with mode: 0644]
gcc/tree-ssa-loop-im.c