diff mbox

Add X86_TUNE_AVOID_LEA_FOR_ADDR

Message ID CAMe9rOrJPuGwD3XwHNPKySY1+4LwStVp7a4tPDkGHBqfFDvf+Q@mail.gmail.com
State New
Headers show

Commit Message

H.J. Lu Jan. 17, 2014, 5:18 p.m. UTC
On Fri, Jan 17, 2014 at 7:11 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> BTW: There are some ix86_tune == XXX conditions scattered throughout
> LEA handling code. Can these be substituted with appropriate TARGET_*
> defines?
>
> Uros.

This is the patch I checked in.

Thanks.
diff mbox

Patch

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index df6e491..4af6ef1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,13 @@ 
 2014-01-17  H.J. Lu  <hongjiu.lu@intel.com>

+ * config/i386/i386.c (ix86_lea_outperforms): Use TARGET_XXX.
+ (ix86_adjust_cost): Use !TARGET_XXX.
+ (do_reorder_for_imul): Likewise.
+ (swap_top_of_ready_list): Likewise.
+ (ix86_sched_reorder): Likewise.
+
+2014-01-17  H.J. Lu  <hongjiu.lu@intel.com>
+
  * config/i386/i386-c.c (ix86_target_macros_internal): Handle
  PROCESSOR_INTEL.  Treat like PROCESSOR_GENERIC.
  * config/i386/i386.c (intel_memcpy): New.  Duplicate slm_memcpy.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 8993331..7bfad8f 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -18020,7 +18020,7 @@  ix86_lea_outperforms (rtx insn, unsigned int
regno0, unsigned int regno1,
   /* For Silvermont if using a 2-source or 3-source LEA for
      non-destructive destination purposes, or due to wanting
      ability to use SCALE, the use of LEA is justified.  */
-  if (ix86_tune == PROCESSOR_SILVERMONT || ix86_tune == PROCESSOR_INTEL)
+  if (TARGET_SILVERMONT || TARGET_INTEL)
     {
       if (has_scale)