[PATCH] Add X86_TUNE_AVOID_LEA_FOR_ADDR

2014-01-17 Thread H.J. Lu
ix86_split_lea_for_addr transforms a single LEA instruction into a series of MOV and ADD instructions. For lea 0x400(%eax, %ecx, 8), %edx we get mov %eax, %edx add %ecx, %edx add %ecx, %edx add %ecx, %edx add %ecx, %edx add %ecx, %edx add %ecx, %edx add %ecx, %edx add %ecx, %edx add $0x400,

Re: [PATCH] Add X86_TUNE_AVOID_LEA_FOR_ADDR

2014-01-17 Thread Uros Bizjak
On Fri, Jan 17, 2014 at 3:19 PM, H.J. Lu hongjiu...@intel.com wrote: ix86_split_lea_for_addr transforms a single LEA instruction into a series of MOV and ADD instructions. For lea 0x400(%eax, %ecx, 8), %edx we get mov %eax, %edx add %ecx, %edx add %ecx, %edx add %ecx, %edx add %ecx,

Re: [PATCH] Add X86_TUNE_AVOID_LEA_FOR_ADDR

2014-01-17 Thread Jakub Jelinek
On Fri, Jan 17, 2014 at 06:19:37AM -0800, H.J. Lu wrote: ix86_split_lea_for_addr transforms a single LEA instruction into a series of MOV and ADD instructions. For lea 0x400(%eax, %ecx, 8), %edx we get mov %eax, %edx add %ecx, %edx add %ecx, %edx add %ecx, %edx add %ecx, %edx add

Re: [PATCH] Add X86_TUNE_AVOID_LEA_FOR_ADDR

2014-01-17 Thread H.J. Lu
On Fri, Jan 17, 2014 at 6:23 AM, Uros Bizjak ubiz...@gmail.com wrote: On Fri, Jan 17, 2014 at 3:19 PM, H.J. Lu hongjiu...@intel.com wrote: ix86_split_lea_for_addr transforms a single LEA instruction into a series of MOV and ADD instructions. For lea 0x400(%eax, %ecx, 8), %edx we get mov

Re: [PATCH] Add X86_TUNE_AVOID_LEA_FOR_ADDR

2014-01-17 Thread H.J. Lu
On Fri, Jan 17, 2014 at 6:30 AM, Jakub Jelinek ja...@redhat.com wrote: On Fri, Jan 17, 2014 at 06:19:37AM -0800, H.J. Lu wrote: ix86_split_lea_for_addr transforms a single LEA instruction into a series of MOV and ADD instructions. For lea 0x400(%eax, %ecx, 8), %edx we get mov %eax, %edx

Re: [PATCH] Add X86_TUNE_AVOID_LEA_FOR_ADDR

2014-01-17 Thread Uros Bizjak
On Fri, Jan 17, 2014 at 3:46 PM, H.J. Lu hjl.to...@gmail.com wrote: ix86_split_lea_for_addr transforms a single LEA instruction into a series of MOV and ADD instructions. For lea 0x400(%eax, %ecx, 8), %edx we get mov %eax, %edx add %ecx, %edx add %ecx, %edx add %ecx, %edx add %ecx,

Re: [PATCH] Add X86_TUNE_AVOID_LEA_FOR_ADDR

2014-01-17 Thread H.J. Lu
On Fri, Jan 17, 2014 at 7:11 AM, Uros Bizjak ubiz...@gmail.com wrote: On Fri, Jan 17, 2014 at 3:46 PM, H.J. Lu hjl.to...@gmail.com wrote: ix86_split_lea_for_addr transforms a single LEA instruction into a series of MOV and ADD instructions. For lea 0x400(%eax, %ecx, 8), %edx we get mov

Re: [PATCH] Add X86_TUNE_AVOID_LEA_FOR_ADDR

2014-01-17 Thread Uros Bizjak
On Fri, Jan 17, 2014 at 3:50 PM, H.J. Lu hjl.to...@gmail.com wrote: Wrong example. It should be lea 0x400(%edx, %ecx, 8), %edx we get add %ecx, %edx add %ecx, %edx add %ecx, %edx add %ecx, %edx add %ecx, %edx add %ecx, %edx add %ecx, %edx add %ecx, %edx add $0x400, %edx Even for

Re: [PATCH] Add X86_TUNE_AVOID_LEA_FOR_ADDR

2014-01-17 Thread Jakub Jelinek
On Fri, Jan 17, 2014 at 04:24:50PM +0100, Uros Bizjak wrote: On Fri, Jan 17, 2014 at 3:50 PM, H.J. Lu hjl.to...@gmail.com wrote: Wrong example. It should be lea 0x400(%edx, %ecx, 8), %edx we get add %ecx, %edx add %ecx, %edx add %ecx, %edx add %ecx, %edx add %ecx, %edx

Re: [PATCH] Add X86_TUNE_AVOID_LEA_FOR_ADDR

2014-01-17 Thread Uros Bizjak
On Fri, Jan 17, 2014 at 4:17 PM, H.J. Lu hjl.to...@gmail.com wrote: BTW: There are some ix86_tune == XXX conditions scattered throughout LEA handling code. Can these be substituted with appropriate TARGET_* defines? I have been looking at them closely to check their impacts on both Haswell

Re: [PATCH] Add X86_TUNE_AVOID_LEA_FOR_ADDR

2014-01-17 Thread H.J. Lu
On Fri, Jan 17, 2014 at 7:36 AM, Uros Bizjak ubiz...@gmail.com wrote: On Fri, Jan 17, 2014 at 4:17 PM, H.J. Lu hjl.to...@gmail.com wrote: BTW: There are some ix86_tune == XXX conditions scattered throughout LEA handling code. Can these be substituted with appropriate TARGET_* defines? I

Re: [PATCH] Add X86_TUNE_AVOID_LEA_FOR_ADDR

2014-01-17 Thread Uros Bizjak
On Fri, Jan 17, 2014 at 4:26 PM, Jakub Jelinek ja...@redhat.com wrote: On Fri, Jan 17, 2014 at 04:24:50PM +0100, Uros Bizjak wrote: On Fri, Jan 17, 2014 at 3:50 PM, H.J. Lu hjl.to...@gmail.com wrote: Wrong example. It should be lea 0x400(%edx, %ecx, 8), %edx we get add %ecx,

Re: [PATCH] Add X86_TUNE_AVOID_LEA_FOR_ADDR

2014-01-17 Thread H.J. Lu
On Fri, Jan 17, 2014 at 7:55 AM, H.J. Lu hjl.to...@gmail.com wrote: On Fri, Jan 17, 2014 at 7:36 AM, Uros Bizjak ubiz...@gmail.com wrote: On Fri, Jan 17, 2014 at 4:17 PM, H.J. Lu hjl.to...@gmail.com wrote: BTW: There are some ix86_tune == XXX conditions scattered throughout LEA handling code.