Skip to content
Snippets Groups Projects
Commit d1b3d099 authored by Andrew Pinski's avatar Andrew Pinski
Browse files

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: default avatarAndrew Pinski <quic_apinski@quicinc.com>
parent 91bc2ad2
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment