aboutsummaryrefslogtreecommitdiff
path: root/gcc/ifcvt.c
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2006-08-28 00:58:47 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2006-08-28 00:58:47 +0000
commit7f22b9fca4fea70b3d837e7c6abcb14bd1509b18 (patch)
tree6902ad2ae6e9fab267f6a4b7f65ead0c472b62f6 /gcc/ifcvt.c
parentb27788aa43dc259a5aa321c8e0719f4982fe7c89 (diff)
downloadgcc-7f22b9fca4fea70b3d837e7c6abcb14bd1509b18.zip
gcc-7f22b9fca4fea70b3d837e7c6abcb14bd1509b18.tar.gz
gcc-7f22b9fca4fea70b3d837e7c6abcb14bd1509b18.tar.bz2
ifcvt.c (cheap_bb_rtx_cost_p): Don't speculatively execute x87 instructions.
* ifcvt.c (cheap_bb_rtx_cost_p): Don't speculatively execute x87 instructions. From-SVN: r116501
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r--gcc/ifcvt.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index 4787a24..987a2fb 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -1,5 +1,5 @@
/* If-conversion support.
- Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005
+ Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This file is part of GCC.
@@ -153,14 +153,16 @@ cheap_bb_rtx_cost_p (basic_block bb, int max_cost)
/* If this instruction is the load or set of a "stack" register,
such as a floating point register on x87, then the cost of
- speculatively executing this instruction needs to include
- the additional cost of popping this register off of the
- register stack. */
+ speculatively executing this insn may need to include
+ the additional cost of popping its result off of the
+ register stack. Unfortunately, correctly recognizing and
+ accounting for this additional overhead is tricky, so for
+ now we simply prohibit such speculative execution. */
#ifdef STACK_REGS
{
rtx set = single_set (insn);
if (set && STACK_REG_P (SET_DEST (set)))
- cost += COSTS_N_INSNS (1);
+ return false;
}
#endif