On 15/04/15 22:32, Jakub Jelinek wrote: > On Wed, Apr 15, 2015 at 01:18:36PM +0100, Richard Earnshaw wrote: >> On 14/04/15 22:41, Kugan wrote: >>> This patch uses clobber with match_scratch instead of earlyclobber for >>> aarch64_lshr_sisd_or_int_3 so that RA can have more freedom in >>> selecting suitable register, as discussed in >>> http://thread.gmane.org/gmane.comp.gcc.patches/336162 and reported in >>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65139. >>> >>> This is based on Maxim's patch. I have bootstrapped and regression >>> tested on aarch64-linux-gnu with no new regressions. Is this OK for trunk? >>> >>> Thanks, >>> Kugan >>> >>> gcc/ChangeLog: >>> >>> 2015-04-15 Kugan Vivekanandarajah >>> Maxim Kuvyrkov >>> >>> PR target/65139 >>> * config/aarch64/aarch64.md (3): Expand lshr with >>> gen_aarch64_lshr_sisd_or_int_3. >>> (*aarch64_lshr_sisd_or_int_3): Rename to >>> aarch64_lshr_sisd_or_int_3 and use clobber with >>> match_scratch instead of early clobber. >>> >> >> + if (strcmp ("", "lshr") == 0) >> + { >> >> >> This can't be the best way to match the operation type. Yes, I know that >> the comparison is a compile time invariant, but there must be an attribute >> of optab (or one can be created for it) that would make the test trivial and >> not rely on the compiler optimizing the strcmp away. > > Perhaps just > if ( == LSHIFTRT) > { Thanks. I have now changed it as above and reran the regression. Richard, is this OK to you? Kugan