[RFC PATCH] For TARGET_AVX use *movmode_internal for misaligned loads

2013-10-30 Thread Jakub Jelinek
Hi! Yesterday I've noticed that for AVX which allows unaligned operands in AVX arithmetics instructions we still don't combine unaligned loads with the AVX arithmetics instructions. So say for -O2 -mavx -ftree-vectorize void f1 (int *__restrict e, int *__restrict f) { int i; for (i = 0; i

Re: [RFC PATCH] For TARGET_AVX use *movmode_internal for misaligned loads

2013-10-30 Thread Ondřej Bílka
On Wed, Oct 30, 2013 at 10:47:13AM +0100, Jakub Jelinek wrote: Hi! Yesterday I've noticed that for AVX which allows unaligned operands in AVX arithmetics instructions we still don't combine unaligned loads with the AVX arithmetics instructions. So say for -O2 -mavx -ftree-vectorize void

Re: [RFC PATCH] For TARGET_AVX use *movmode_internal for misaligned loads

2013-10-30 Thread Jakub Jelinek
On Wed, Oct 30, 2013 at 10:53:58AM +0100, Ondřej Bílka wrote: Yesterday I've noticed that for AVX which allows unaligned operands in AVX arithmetics instructions we still don't combine unaligned loads with the AVX arithmetics instructions. So say for -O2 -mavx -ftree-vectorize void f1

Re: [RFC PATCH] For TARGET_AVX use *movmode_internal for misaligned loads

2013-10-30 Thread Jakub Jelinek
On Wed, Oct 30, 2013 at 11:00:13AM +0100, Jakub Jelinek wrote: But the above is 16 byte unaligned load. Furthermore, GCC supports -mavx256-split-unaligned-load and can emit 32 byte loads either as an unaligned 32 byte load, or merge of 16 byte unaligned loads. The patch affects only the

Re: [RFC PATCH] For TARGET_AVX use *movmode_internal for misaligned loads

2013-10-30 Thread Ondřej Bílka
On Wed, Oct 30, 2013 at 11:05:58AM +0100, Jakub Jelinek wrote: On Wed, Oct 30, 2013 at 11:00:13AM +0100, Jakub Jelinek wrote: But the above is 16 byte unaligned load. Furthermore, GCC supports -mavx256-split-unaligned-load and can emit 32 byte loads either as an unaligned 32 byte load, or

Re: [RFC PATCH] For TARGET_AVX use *movmode_internal for misaligned loads

2013-10-30 Thread Uros Bizjak
On Wed, Oct 30, 2013 at 10:47 AM, Jakub Jelinek ja...@redhat.com wrote: Yesterday I've noticed that for AVX which allows unaligned operands in AVX arithmetics instructions we still don't combine unaligned loads with the AVX arithmetics instructions. So say for -O2 -mavx -ftree-vectorize This

Re: [RFC PATCH] For TARGET_AVX use *movmode_internal for misaligned loads

2013-10-30 Thread Jakub Jelinek
On Wed, Oct 30, 2013 at 11:55:44AM +0100, Uros Bizjak wrote: On Wed, Oct 30, 2013 at 10:47 AM, Jakub Jelinek ja...@redhat.com wrote: Yesterday I've noticed that for AVX which allows unaligned operands in AVX arithmetics instructions we still don't combine unaligned loads with the AVX

Re: [RFC PATCH] For TARGET_AVX use *movmode_internal for misaligned loads

2013-10-30 Thread Richard Henderson
On 10/30/2013 02:47 AM, Jakub Jelinek wrote: 2013-10-30 Jakub Jelinek ja...@redhat.com * config/i386/i386.c (ix86_avx256_split_vector_move_misalign): If op1 is misaligned_operand, just use *movmode_internal insn rather than UNSPEC_LOADU load.

Re: [RFC PATCH] For TARGET_AVX use *movmode_internal for misaligned loads

2013-10-30 Thread Jakub Jelinek
On Wed, Oct 30, 2013 at 09:17:04AM -0700, Richard Henderson wrote: On 10/30/2013 02:47 AM, Jakub Jelinek wrote: 2013-10-30 Jakub Jelinek ja...@redhat.com * config/i386/i386.c (ix86_avx256_split_vector_move_misalign): If op1 is misaligned_operand, just use *movmode_internal insn

Re: [RFC PATCH] For TARGET_AVX use *movmode_internal for misaligned loads

2013-10-30 Thread Uros Bizjak
On Wed, Oct 30, 2013 at 12:11 PM, Jakub Jelinek ja...@redhat.com wrote: Yesterday I've noticed that for AVX which allows unaligned operands in AVX arithmetics instructions we still don't combine unaligned loads with the AVX arithmetics instructions. So say for -O2 -mavx -ftree-vectorize

Re: [RFC PATCH] For TARGET_AVX use *movmode_internal for misaligned loads

2013-10-30 Thread Uros Bizjak
On Wed, Oct 30, 2013 at 6:42 PM, Uros Bizjak ubiz...@gmail.com wrote: On Wed, Oct 30, 2013 at 12:11 PM, Jakub Jelinek ja...@redhat.com wrote: Yesterday I've noticed that for AVX which allows unaligned operands in AVX arithmetics instructions we still don't combine unaligned loads with the