tree-optimization/100434 - DSE aggregate call LHS
This makes DSE consider aggregate LHS of calls as dead, for pure
or const calls the whole stmt and for others by removing the LHS.
2021-05-05 Richard Biener <rguenther@suse.de>
PR tree-optimization/100434
* tree-ssa-dse.c (initialize_ao_ref_for_dse): Handle
call LHS.
(dse_optimize_stmt): Handle call LHS by dropping the
LHS or the whole call if it doesn't have other
side-effects.
(pass_dse::execute): Adjust.
* gcc.dg/tree-ssa/ssa-dse-43.c: New testcase.