This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, PR target/65103, 3/3] Change rtx cost for i386 address constants
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: ÐÐÑÑ ÐÐÐÐÐÐÑ <enkovich dot gnu at gmail dot com>
- Date: Tue, 12 May 2015 17:33:45 +0200
- Subject: Re: [PATCH, PR target/65103, 3/3] Change rtx cost for i386 address constants
- Authentication-results: sourceware.org; auth=none
Hello!
>> 2015-03-10 Ilya Enkovich <ilya.enkovich@intel.com>
>>
>> PR target/65103
>> * config/i386/i386.c (ix86_rtx_costs): We want to propagate
>> link time constants into adress expressions and therefore set
>> their cost to 0.
>>
>> gcc/testsuite/
>>
>> 2015-03-10 Ilya Enkovich <ilya.enkovich@intel.com>
>>
>> PR target/65103
>> * gcc.target/i386/pr65103-3.c: New.
>>
>>
>> diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
>> index b3971b8..341a157 100644
>> --- a/gcc/config/i386/i386.c
>> +++ b/gcc/config/i386/i386.c
>> @@ -42039,7 +42039,8 @@ ix86_rtx_costs (rtx x, int code_i, int outer_code_i, int opno, int *total,
>> && !(TARGET_64BIT
>> && (GET_CODE (x) == LABEL_REF
>> || (GET_CODE (x) == SYMBOL_REF
>> - && SYMBOL_REF_LOCAL_P (x)))))
>> + && SYMBOL_REF_LOCAL_P (x))))
>> + && (TARGET_64BIT || GET_CODE (x) != CONST))
Please also add a one-line comment for the new condition.
OK with this change.
Uros.