aboutsummaryrefslogtreecommitdiff
path: root/gcc/dojump.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/dojump.c')
-rw-r--r--gcc/dojump.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/dojump.c b/gcc/dojump.c
index 7606c15..093d3ef 100644
--- a/gcc/dojump.c
+++ b/gcc/dojump.c
@@ -144,6 +144,8 @@ static GTY(()) rtx shift_test;
static bool
prefer_and_bit_test (enum machine_mode mode, int bitnum)
{
+ bool speed_p;
+
if (and_test == 0)
{
/* Set up rtxes for the two variations. Use NULL as a placeholder
@@ -168,8 +170,9 @@ prefer_and_bit_test (enum machine_mode mode, int bitnum)
mode);
XEXP (XEXP (shift_test, 0), 1) = GEN_INT (bitnum);
- return (rtx_cost (and_test, IF_THEN_ELSE, optimize_insn_for_speed_p ())
- <= rtx_cost (shift_test, IF_THEN_ELSE, optimize_insn_for_speed_p ()));
+ speed_p = optimize_insn_for_speed_p ();
+ return (rtx_cost (and_test, IF_THEN_ELSE, 0, speed_p)
+ <= rtx_cost (shift_test, IF_THEN_ELSE, 0, speed_p));
}
/* Subroutine of do_jump, dealing with exploded comparisons of the type