This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/33187] Missed cmove opportunity
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Jan 2008 07:01:08 -0000
- Subject: [Bug middle-end/33187] Missed cmove opportunity
- References: <bug-33187-1649@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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