tree-optimization/103351 - avoid compare-debug issue wrt CD-DCE change
authorRichard Biener <rguenther@suse.de>
Mon, 22 Nov 2021 10:23:55 +0000 (11:23 +0100)
committerRichard Biener <rguenther@suse.de>
Mon, 22 Nov 2021 11:18:08 +0000 (12:18 +0100)
commitf456eaf2e0fb3ceb51c641fd348429bf59d215a9
treeed74f113f3f0e543b3e6260e10310be8e324736b
parent4b1e14346a08554dc33f71fca980578a7a3e38a2
tree-optimization/103351 - avoid compare-debug issue wrt CD-DCE change

This avoids differences in the split edge of a cluster due to different
order of same key PHI args when sorting by sorting after the edge
destination index as second key.

2021-11-22  Richard Biener  <rguenther@suse.de>

PR tree-optimization/103351
* tree-ssa-dce.c (sort_phi_args): Sort after e->dest_idx as
second key.

* g++.dg/torture/pr103351.C: New testcase.
gcc/testsuite/g++.dg/torture/pr103351.C [new file with mode: 0644]
gcc/tree-ssa-dce.c