This is the mail archive of the gcc-bugs@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]

[Bug middle-end/33187] Missed cmove opportunity



------- Comment #7 from ubizjak at gmail dot com  2008-01-10 07:01 -------
(In reply to comment #6)
> Uros, the testcase (gcc.target/i386/cmov7.c) fails on x86 with -fpic/-fPIC. 
> Real bug, or skip with pic?

No, but insn RTX costs is slightly increased for -fpic. From ix86_rtx_cost():

--cut here--
    case SYMBOL_REF:
      if (TARGET_64BIT && !x86_64_immediate_operand (x, VOIDmode))
        *total = 3;
      else if (TARGET_64BIT && !x86_64_zext_immediate_operand (x, VOIDmode))
        *total = 2;
      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;
      else
        *total = 0;
      return true;
--cut here--

Adding -mbranch-cost=5 to dg-options would remove this failure.


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|4.2.0 4.3.0                 |4.2.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33187


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]