This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Mon, May 26, 2014 at 7:48 PM, Uros Bizjak <ubizjak@gmail.com> wrote: > Hello! > > There is a stray ! in ix86_rtx_costs which results in an invalid > bypass for LABEL_REFs. After some simplifications, the fixed condition > should read: > > else if (flag_pic && SYMBOLIC_CONST (x) > && !(TARGET_64BIT > && (GET_CODE (x) == LABEL_REF > || (GET_CODE (x) == SYMBOL_REF > && SYMBOL_REF_LOCAL_P (x))))) > *total = 1; > > The patch fixes the condition, but I don't think that handling of > LABEL_REFs and SYMBOL_REFs is correct in the cost function at all. > E.g. in x86_64_immediate_operand predicate, LABEL_REFs (and non-TLS > SYMBOL_REFs) are rejected for all PIC code models, so they get cost of > 3 and don't even reach this part of the function. > > Honza, can you perhaps check if x86_64{,_zext}_immediate operand > handles PIC code models in a correct way? > > The trivial patch is bootstrapped and regression tested on > x86_64-pc-linux-gnu {,-m32} and committed to mainline SVN. Eh, wrong patch was attached. And ChangeLog was missing, too. 2014-05-26 Uros Bizjak <ubizjak@gmail.com> PR target/61271 * config/i386/i386.c (ix86_rtx_costs) <case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF>: Fix condition. Uros.
Attachment:
p.diff.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |