This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: apsi bug
- From: Jan Hubicka <jh at suse dot cz>
- To: Richard Henderson <rth at redhat dot com>, Jan Hubicka <jh at suse dot cz>,Andreas Jaeger <aj at suse dot de>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 1 Nov 2002 10:34:57 +0100
- Subject: Re: apsi bug
- References: <u8vg3iy2qn.fsf@gromit.moeb> <20021031172531.GQ4085@kam.mff.cuni.cz> <20021101013409.GK5029@redhat.com>
> On Thu, Oct 31, 2002 at 06:25:31PM +0100, Jan Hubicka wrote:
> > if (optimize
> > && FLOAT_MODE_P (GET_MODE (x))
> > + && !VECTOR_MODE_P (GET_MODE (x))
>
> We should have
>
> #define SCALAR_FLOAT_MODE_P(MODE)
> (GET_MODE_CLASS (MODE) == MODE_FLOAT)
>
> and use that.
Good idea. I've installed this version of patch.
Fri Nov 1 10:30:15 CET 2002 Jan Hubicka <jh@suse.cz>
* expr.c (emit_move_insn): Use SCALAR_FLOAT_MODE_P
* machmode.h (SCALAR_FLOAT_MODE_P): New macro.
Index: expr.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/expr.c,v
retrieving revision 1.478.4.6
diff -c -3 -p -r1.478.4.6 expr.c
*** expr.c 15 Oct 2002 01:32:50 -0000 1.478.4.6
--- expr.c 1 Nov 2002 09:04:01 -0000
*************** emit_move_insn (x, y)
*** 3098,3104 ****
else if (CONSTANT_P (y))
{
if (optimize
! && FLOAT_MODE_P (GET_MODE (x))
&& (last_insn = compress_float_constant (x, y)))
return last_insn;
--- 3098,3104 ----
else if (CONSTANT_P (y))
{
if (optimize
! && SCALAR_FLOAT_MODE_P (GET_MODE (x))
&& (last_insn = compress_float_constant (x, y)))
return last_insn;
Index: machmode.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/machmode.h,v
retrieving revision 1.30
diff -c -3 -p -r1.30 machmode.h
*** machmode.h 19 Aug 2002 18:18:11 -0000 1.30
--- machmode.h 1 Nov 2002 09:04:01 -0000
*************** extern const enum mode_class mode_class[
*** 80,85 ****
--- 80,89 ----
(GET_MODE_CLASS (MODE) == MODE_INT \
|| GET_MODE_CLASS (MODE) == MODE_PARTIAL_INT)
+ /* Nonzero if MODE is a scalar floating point mode. */
+ #define SCALAR_FLOAT_MODE_P(MODE) \
+ (GET_MODE_CLASS (MODE) == MODE_FLOAT)
+
/* Get the size in bytes of an object of mode MODE. */
extern const unsigned char mode_size[NUM_MACHINE_MODES];