MATCH: change single_non_singleton_phi_for_edges for singleton phis
commit9c18bdb07e299b25e7526fea16659c7ff8f0d14e
authorAndrew Pinski <quic_apinski@quicinc.com>
Sun, 28 Apr 2024 01:54:44 +0000 (27 18:54 -0700)
committerAndrew Pinski <quic_apinski@quicinc.com>
Tue, 30 Apr 2024 16:11:54 +0000 (30 09:11 -0700)
treeaecae586be883ecb78253834e2a3023a2fd96408
parent8614d60233a64afd7e28ae7af2ab74c4a5b06010
MATCH: change single_non_singleton_phi_for_edges for singleton phis

I noticed that single_non_singleton_phi_for_edges could
return a phi whos entry are all the same for the edge.
This happens only if there was a single phis in the first place.
Also gimple_seq_singleton_p walks the sequence to see if it the one
element in the sequence so there is removing that check actually
reduces the number of pointer walks needed.

Bootstrapped and tested on x86_64-linux-gnu with no regressions.

gcc/ChangeLog:

* tree-ssa-phiopt.cc (single_non_singleton_phi_for_edges):
Remove the special case of gimple_seq_singleton_p.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/tree-ssa-phiopt.cc