Re: [PATCH] Fix tail merging (PR tree-optimization/51877)

2012-01-17 Thread Richard Guenther
On Tue, 17 Jan 2012, Jakub Jelinek wrote: > Hi! > > We tail merge > a = bar (7); > with > *x = bar (7); > completely ignoring the case that the lhs are different. > IMHO we can't merge if one of the calls has lhs and the other doesn't, > or if both calls have non-SSA_NAME lhs and they aren't

[PATCH] Fix tail merging (PR tree-optimization/51877)

2012-01-17 Thread Jakub Jelinek
Hi! We tail merge a = bar (7); with *x = bar (7); completely ignoring the case that the lhs are different. IMHO we can't merge if one of the calls has lhs and the other doesn't, or if both calls have non-SSA_NAME lhs and they aren't equal (this case). If both calls have SSA_NAME lhs, I can see