* optabs.c (expand_abs_nojump): Split out from ...
(expand_abs): ... here.
* optabs.h (expand_abs_nojump): Declare.
* ifcvt.c: (noce_try_abs): Use expand_abs_nojump.
* Makefile.in (ifcvt.o): Depend on optabs.h.
From-SVN: r67404
+2003-06-03 Richard Henderson <rth@redhat.com>
+
+ * optabs.c (expand_abs_nojump): Split out from ...
+ (expand_abs): ... here.
+ * optabs.h (expand_abs_nojump): Declare.
+ * ifcvt.c: (noce_try_abs): Use expand_abs_nojump.
+ * Makefile.in (ifcvt.o): Depend on optabs.h.
+
2003-06-03 Alan Modra <amodra@bigpond.net.au>
* dwarf2out.c (DEBUG_STR_SECTION_FLAGS): Heed flag_merge_constants.
regrename.o : regrename.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h $(RECOG_H) function.h \
resource.h $(OBSTACK_H) flags.h $(TM_P_H)
-ifcvt.o : ifcvt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) toplev.h \
- flags.h insn-config.h function.h $(RECOG_H) $(BASIC_BLOCK_H) $(EXPR_H) \
- output.h except.h $(TM_P_H) real.h
+ifcvt.o : ifcvt.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
+ $(REGS_H) toplev.h flags.h insn-config.h function.h $(RECOG_H) \
+ $(BASIC_BLOCK_H) $(EXPR_H) output.h except.h $(TM_P_H) real.h optabs.h
params.o : params.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(PARAMS_H) toplev.h
hooks.o: hooks.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(HOOKS_H)
#include "expr.h"
#include "real.h"
#include "output.h"
+#include "optabs.h"
#include "toplev.h"
#include "tm_p.h"
start_sequence ();
- target = expand_simple_unop (GET_MODE (if_info->x), ABS, b, if_info->x, 0);
+ target = expand_abs_nojump (GET_MODE (if_info->x), b, if_info->x, 1);
/* ??? It's a quandry whether cmove would be better here, especially
for integers. Perhaps combine will clean things up. */
*/
rtx
-expand_abs (mode, op0, target, result_unsignedp, safe)
+expand_abs_nojump (mode, op0, target, result_unsignedp)
enum machine_mode mode;
rtx op0;
rtx target;
int result_unsignedp;
- int safe;
{
- rtx temp, op1;
+ rtx temp;
if (! flag_trapv)
result_unsignedp = 1;
return temp;
}
+ return NULL_RTX;
+}
+
+rtx
+expand_abs (mode, op0, target, result_unsignedp, safe)
+ enum machine_mode mode;
+ rtx op0;
+ rtx target;
+ int result_unsignedp;
+ int safe;
+{
+ rtx temp, op1;
+
+ temp = expand_abs_nojump (mode, op0, target, result_unsignedp);
+ if (temp != 0)
+ return temp;
+
/* If that does not win, use conditional jump and negate. */
/* It is safe to use the target if it is the same
extern rtx expand_unop PARAMS ((enum machine_mode, optab, rtx, rtx, int));
/* Expand the absolute value operation. */
+extern rtx expand_abs_nojump PARAMS ((enum machine_mode, rtx, rtx, int));
extern rtx expand_abs PARAMS ((enum machine_mode, rtx, rtx, int, int));
/* Expand the complex absolute value operation. */