]> gcc.gnu.org Git - gcc.git/commit
phiopt: Small refactoring/cleanup of non-ssa name case of factor_out_conditional_oper...
authorAndrew Pinski <quic_apinski@quicinc.com>
Sat, 31 Aug 2024 20:54:21 +0000 (13:54 -0700)
committerAndrew Pinski <quic_apinski@quicinc.com>
Mon, 9 Sep 2024 07:21:45 +0000 (00:21 -0700)
commitd1b3d099dd5789e3e7943ed23a9cd8c6c9689b2b
tree6444c5654a57c716c077a12bb0feb1345454e3e8
parent91bc2ad28c58ca3f4c2f96601d8af51f570e08c4
phiopt: Small refactoring/cleanup of non-ssa name case of factor_out_conditional_operation

This small cleanup removes a redundant check for gimple_assign_cast_p and reformats
based on that. Also changes the if statement that checks if the integral type and the
check to see if the constant fits into the new type such that it returns null
and reformats based on that.

Also moves the check for has_single_use earlier so it is less complex still a cheaper
check than some of the others (like the check on the integer side).

This was noticed when adding a few new things to factor_out_conditional_operation
but those are not ready to submit yet.

Note there are no functional difference with this change.

Bootstrapped and tested on x86_64-linux-gnu.

gcc/ChangeLog:

* tree-ssa-phiopt.cc (factor_out_conditional_operation): Move the has_single_use
checks much earlier. Remove redundant check for gimple_assign_cast_p.
Change around the check if the integral consts fits into the new type.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/tree-ssa-phiopt.cc
This page took 0.054768 seconds and 5 git commands to generate.