This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] expand_sdiv_pow2 improvements for cmove targets
- From: Richard Henderson <rth at redhat dot com>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 25 Jul 2004 17:41:13 -0700
- Subject: Re: [PATCH] expand_sdiv_pow2 improvements for cmove targets
- References: <Pine.LNX.4.44.0407250710460.1248-100000@www.eyesopen.com>
On Sun, Jul 25, 2004 at 07:31:59AM -0600, Roger Sayle wrote:
> + /* Construct "temp2 = (temp2 < 0) ? temp : temp2". */
> + cmov = gen_rtx_LT (VOIDmode, temp2, const0_rtx);
> + cmov = gen_rtx_IF_THEN_ELSE (mode, cmov, temp, temp2);
> + cmov = gen_rtx_SET (mode, temp2, cmov);
> + emit_insn (cmov);
Why are you building this by hand instead of using emit_conditional_move,
and/or leaving this for ifcvt to handle? With the latermost option, I'd
simply emit the branch if HAVE_conditional_move is defined.
r~