Re: [PATCH][ARM] Do not call covert during RTL expansion

2012-03-12 Thread Ramana Radhakrishnan
On 12 March 2012 10:22, Richard Guenther  wrote:
>
> convert is supposed to be called only from frontend code as it
> may raise errors.
>
> The call in neon_dereference_pointer is from RTL expansion
> (and not necessary).
>
> Fixed as follows, I built a cross-cc1 for checking.
>
> Ok?

Ok. From my reading of the code,  I agree this call is not necessary.

ramana


[PATCH][ARM] Do not call covert during RTL expansion

2012-03-12 Thread Richard Guenther

convert is supposed to be called only from frontend code as it
may raise errors.

The call in neon_dereference_pointer is from RTL expansion
(and not necessary).

Fixed as follows, I built a cross-cc1 for checking.

Ok?

Thanks,
Richard.

2012-03-12  Richard Guenther  

* config/arm/arm.c (neon_dereference_pointer): Do not call
covert during RTL expansion.

Index: gcc/config/arm/arm.c
===
*** gcc/config/arm/arm.c(revision 185220)
--- gcc/config/arm/arm.c(working copy)
*** neon_dereference_pointer (tree exp, enum
*** 20637,20645 
array_type = build_array_type (elem_type, build_index_type (upper_bound));
  
/* Dereference EXP using that type.  */
-   exp = convert (build_pointer_type (array_type), exp);
return fold_build2 (MEM_REF, array_type, exp,
! build_int_cst (TREE_TYPE (exp), 0));
  }
  
  /* Expand a Neon builtin.  */
--- 20637,20644 
array_type = build_array_type (elem_type, build_index_type (upper_bound));
  
/* Dereference EXP using that type.  */
return fold_build2 (MEM_REF, array_type, exp,
! build_int_cst (build_pointer_type (array_type), 0));
  }
  
  /* Expand a Neon builtin.  */