diff options
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r-- | gcc/optabs.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c index 9053c7020f2..e7d50d0d578 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -1,6 +1,6 @@ /* Expand the basic unary and binary arithmetic operations, for GNU compiler. Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of GCC. @@ -427,9 +427,14 @@ simplify_expand_binop (enum machine_mode mode, optab binoptab, enum optab_methods methods) { if (CONSTANT_P (op0) && CONSTANT_P (op1)) - return simplify_gen_binary (binoptab->code, mode, op0, op1); - else - return expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods); + { + rtx x = simplify_binary_operation (binoptab->code, mode, op0, op1); + + if (x) + return x; + } + + return expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods); } /* Like simplify_expand_binop, but always put the result in TARGET. |