This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Bug fix for rs6000 fsel generation


When generating patterns to take advantage of the fsel
instruction, rs6000_emit_cmove derives the
mode on the if_then_else from the operands being compared.
This is not right; it should match the result(s).  It matters
when generating *fselsfdf4; invalid RTL is generated.
Bootstrapped on Darwin.

2001-11-05  Dale Johannesen  <dalej@apple.com>

         * config/rs6000/rs6000.c (rs6000_emit_cmove):  Derive mode
           of the IF_THEN_ELSE from the result, not the operands


Index: rs6000.c
===================================================================
RCS file: /cvs/Darwin/Commands/GNU/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.86
*************** rs6000_emit_cmove (dest, op, true_cond,
*** 6672,6678 ****
       }

     emit_insn (gen_rtx_SET (VOIDmode, dest,
!                         gen_rtx_IF_THEN_ELSE (mode,
                                                 gen_rtx_GE (VOIDmode,
                                                             op0, op1),
                                                 true_cond, false_cond)));
--- 6694,6700 ----
       }

     emit_insn (gen_rtx_SET (VOIDmode, dest,
!                         gen_rtx_IF_THEN_ELSE (GET_MODE (dest),
                                                 gen_rtx_GE (VOIDmode,
                                                             op0, op1),
                                                 true_cond, false_cond)));


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]