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] [4.8] Mixed condition vect pattern for non-constants


Hi,

This patch enhances mixed condition pattern detection to work with
non-constant integral then and else clauses. It checks that 'then' and
'else' are results of type conversion from the comparison type to their
current type, and generates the whole cond_epxr in comparison type
(ignoring the conversions).

Bootstrapped on powerpc64-suse-linux, tested on powerpc64-suse-linux and
x86_64-suse-linux.

Ira

ChangeLog:

	* tree-vect-patterns.c (widened_name_p): Rename to ...
	(type_conversion_p): ... this.  Add new argument to determine
	if it's a promotion or demotion operation.  Check for
	CONVERT_EXPR_CODE_P instead of NOP_EXPR.
	(vect_recog_dot_prod_pattern): Call type_conversion_p instead
	widened_name_p.
	(vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern,
	vect_operation_fits_smaller_type, vect_recog_widen_shift_pattern):
	Likewise.
	(vect_recog_mixed_size_cond_pattern): Likewise and allow
	non-constant then and else clauses.

testsuite/ChangeLog:

	* gcc.dg/vect/slp-cond-3.c: New test.
	* gcc.dg/vect/slp-cond-4.c: New test.

(See attached file: mixed-cond.txt)

Attachment: mixed-cond.txt
Description: Text document


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