Re: [ARM] Use UBFX for some and-immediate operations

2012-08-04 Thread Richard Earnshaw
On 03/08/12 19:10, Richard Henderson wrote: > On 2012-08-02 09:24, Richard Earnshaw wrote: >> +/* Extz only supports SImode, but we can coerce the operands >> + into that mode. */ >> +emit_constant_insn (cond, >> +gen_extzv_t2 (gen_lowpart (mod

Re: [ARM] Use UBFX for some and-immediate operations

2012-08-03 Thread Richard Henderson
On 2012-08-02 09:24, Richard Earnshaw wrote: > + /* Extz only supports SImode, but we can coerce the operands > +into that mode. */ > + emit_constant_insn (cond, > + gen_extzv_t2 (gen_lowpart (mode, target), > +

[ARM] Use UBFX for some and-immediate operations

2012-08-02 Thread Richard Earnshaw
This patch adds the ability to spot and exploit the UBFX instruction (bit-field extract) to perform AND operations with an immediate which is 2^N - 1. On some benchmarks this can lead to a significant win over the existing behaviour on Cortex-A15. Tested on arm-eabi with some additional testing o