Re: [PATCH][AArch64] Improve dup pattern

2017-06-20 Thread Wilco Dijkstra
James Greenhalgh wrote: > > Have you tested this in cases where an integer dup is definitely the right > thing to do? Yes, this still generates:   #include   void f(unsigned a, unsigned b, uint32x4_t *c)   {     c[0] = vdupq_n_u32(a);     c[1] = vdupq_n_u32(b);   } dup v1.4s, w0

Re: [PATCH][AArch64] Improve dup pattern

2017-06-20 Thread James Greenhalgh
On Tue, Jun 20, 2017 at 11:57:59AM +0100, Wilco Dijkstra wrote: > Improve the dup pattern to prefer vector registers. When doing a dup > after a load, the register allocator thinks the costs are identical > and chooses an integer load. However a dup from an integer register > includes an int->fp

[PATCH][AArch64] Improve dup pattern

2017-06-20 Thread Wilco Dijkstra
Improve the dup pattern to prefer vector registers. When doing a dup after a load, the register allocator thinks the costs are identical and chooses an integer load. However a dup from an integer register includes an int->fp transfer which is not modelled. Adding a '?' to the integer variant mea