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: [PATCH] Fix vector handling in simplify-rtx.c (PR rtl-optimization/82973)


On 12/20/2017 03:18 PM, Jakub Jelinek wrote:
> Hi!
> 
> In rtl.texi we say:
> @findex const_vector
> @item (const_vector:@var{m} [@var{x0} @var{x1} @dots{}])
> Represents a vector constant.  The square brackets stand for the vector
> containing the constant elements.  @var{x0}, @var{x1} and so on are
> the @code{const_int}, @code{const_wide_int}, @code{const_double} or
> @code{const_fixed} elements.
> and it is a very reasonable requirement. 
> simplify_const_{unary,binary}_operation can violate that though, because
> the recursion can return also other expressions, like in this case
> a (mult (const_double) (const_double)) that can't be simplified because
> of -frounding-math.  We need to punt on those.
> 
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
> 
> 2017-12-20  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR rtl-optimization/82973
> 	* simplify-rtx.c (simplify_const_unary_operation): Don't optimize into
> 	CONST_VECTOR if some element isn't simplified into CONST_{,WIDE_}INT,
> 	CONST_DOUBLE or CONST_FIXED.
> 	(simplify_const_binary_operation): Likewise.  Use CONST_FIXED_P macro
> 	instead of GET_CODE == CONST_FIXED.
> 	(simplify_subreg): Use CONST_FIXED_P macro instead of
> 	GET_CODE == CONST_FIXED.
> 
> 	* gfortran.dg/pr82973.f90: New test.
OK.
jeff


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