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][ARM] Adjust clz, rbit and rev patterns for -mrestrict-it


On 04/08/14 13:22, Kyrill Tkachov wrote:
> Hi all,
> 
> While working on another patch and looking at the rbit and clz patterns, 
> I noticed that in aarch32 the relevant patterns are not adjusted for 
> -mrestrict-it.
> A program like:
> int
> foo (int a, int b)
> {
>    if (a + 5 == b)
>      return __builtin_ctz (a);
> 
>    return 1;
> }
> 
> compiled with -march=armv8-a -mthumb could generate clz and rbit 
> instructions inside an IT block, thus earning an assembler warning.
> Whilst there I also noticed that the output templates for the arm_rev 
> pattern have a %? that is used to print out condition codes during 
> predication but the pattern is not marked as predicable.
> So I set the predicable attribute there and adjusted it for 
> -mrestrict-it while at it.
> 
> Ok for trunk?
> 
> 2014-08-04  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
> 
>      * config/arm/arm.md (clzsi2): Set predicable_short_it attr to no.
>      (rbitsi2): Likewise.
>      (*arm_rev): Set predicable and predicable_short_it attributes.
> 

OK.

R.



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