On 12 June 2015 at 21:43, Jim Wilson <jim.wil...@linaro.org> wrote:
> We have 5 patterns that can emit the movi instruction.  These patterns
> map it to 4 different type attributes.  The mov<mode>_aarch64 pattern
> uses mov_imm.  The movdi_aarch64 pattern uses fmov.  The movtf_aarch64
> pattern uses fconstd.  And the two aarch64_simd_mov<mode> patterns for
> VD and VQ use neon_move.  Bitwise identical instructions should always
> map to the same attribute type, so we need to change these patterns to
> agree on the right attribute.  movi is an integer simd instruction, so
> neon_move is the only choice that makes sense.  The following patch
> corrects the first 3 patterns to use neon_move like the last two.
>
> We could optionally create a new type attribute, e.g. neon_move_imm.
> I can do that if people think it would be better.
>
> This patch was tested with a make bootstrap and make check on an APM
> box running Ubuntu 14.04.
>
> FYI This patch overlaps with my movtf-zero patch which is still
> waiting review, but the overlap is trivial to resolve so this should
> not be a problem.

The movdi* and movtf* hunks look fine.  The mov<mode>_aarch64 pattern
calls aarch64_output_scalar_simd_mov_immediate which can emit either
mvni, movi, with or without msl and lsl.  In the case of the plain
movi neon_move looks sensible, the other possbile outputs should
ideally be represented by logic_immediate and logic_shift_immediate.
Using neon_move is a step in the right direction.  OK /Marcus

Reply via email to