This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH GCC]Try to fold (long)(A-B) into (long)A - (long)B for canonicalization in tree affine


Hi,
Generally we don't try to fold (long)(A-B) into (long)A - (long)B because it
results in more operations.  On the other hand, this fold is wanted when we
want to explore as many canonical opportunities as possible.  Tree affine is
definitely such a place.  This patch supports this in
tree_to_aff_combination, so it can produce canonical affines rather than
stupid expressions like "&arr + (sizetype) (t_4(D) + t_4(D)) * 4 -
(sizetype)t_4(D) * 8".  

Bootstrap and test on x86_64 and aarch64 along with other patches.  Is it
OK?

2015-08-31  Bin Cheng  <bin.cheng@arm.com>

	* tree-affine.c (tree_to_aff_combination): Try to fold (long)(A-B)
	by adding CASE_CONVERT support.

Attachment: pr66388_2-20150824.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]