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]

Re: Implement more rtx vector folds on variable-length vectors


On 7/15/19 9:30 AM, Richard Sandiford wrote:
> Richard Sandiford <richard.sandiford@arm.com> writes:
>> This patch extends the tree-level folding of variable-length vectors
>> so that it can also be used on rtxes.  The first step is to move
>> the tree_vector_builder new_unary/binary_operator routines to the
>> parent vector_builder class (which in turn means adding a new
>> template parameter).  The second step is to make simplify-rtx.c
>> use a direct rtx analogue of the VECTOR_CST handling in fold-const.c.
>>
>> Tested on aarch64-linux-gnu, aarch64_be-elf and x86_64-linux-gnu.
>> OK to install?
>>
>> Richard
> 
> Here's a version updated for the earlier patch, so that we take
> both HONOR_NANS and HONOR_SNANS into account.  Tested on
> aarch64-linux-gnu to far.
> 
> Thanks,
> Richard
> 
> 
> 2019-07-15  Richard Sandiford  <richard.sandiford@arm.com>
> 
> gcc/
> 	* rtl.h (bit_and_conditions, bit_ior_conditions): Declare.
> 	* jump.c (flags_to_condition): Add an honor_nans_p argument.
> 	(bit_ior_conditions, bit_and_conditions): New functions.
> 	* simplify-rtx.c (simplify_binary_operation_1): Try to fold an
> 	AND or IOR of two comparisons into a single comparison.
> 	(simplify_ternary_operation): Try to fold an if_then_else involving
> 	two conditions into an AND of two conditions.
> 	(test_merged_comparisons): New function.
> 	(simplify_rtx_c_tests): Call it.
This is fine once the prereqs are approved.

jeff


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