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]

Re: fsel patch for rs6000


> cc: gcc-patches@gcc.gnu.org
> Date: Fri, 25 May 2001 19:02:22 -0400
> From: David Edelsohn <dje@watson.ibm.com>
> 
> 	Why is the fseldfsf4 pattern now the only one that compares a
> DFmode operand with an SFmode operand?
> 
> 
> (define_insn "*fseldfsf4"
>   [(set (match_operand:SF 0 "gpc_reg_operand" "=f")
>         (if_then_else:SF (ge (match_operand:DF 1 "gpc_reg_operand" "f")
>                              (match_operand:SF 4 "zero_fp_constant" "F"))
>                          (match_operand:SF 2 "gpc_reg_operand" "f")
>                          (match_operand:SF 3 "gpc_reg_operand" "f")))]
>   "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT"
>   "fsel %0,%1,%2,%3"
>   [(set_attr "type" "fp")])
> 
> 
> The other three variants perform the comparison between two arguments of
> the same mode (although the selected value may have a different mode than
> the comparison.  I think this is a cut-and-paste a typo.

Yup, it is.  I'll commit this when the testrun on powerpc-eabisim
completes:

2001-05-25  Geoffrey Keating  <geoffk@redhat.com>

	* config/rs6000/rs6000.md (fseldfsf4): Correct mode of operand 4.

Index: rs6000.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.md,v
retrieving revision 1.118
diff -p -c -r1.118 rs6000.md
*** rs6000.md	2001/05/21 18:38:25	1.118
--- rs6000.md	2001/05/25 23:24:20
***************
*** 4879,4885 ****
  (define_insn "*fseldfsf4"
    [(set (match_operand:SF 0 "gpc_reg_operand" "=f")
  	(if_then_else:SF (ge (match_operand:DF 1 "gpc_reg_operand" "f")
! 			     (match_operand:SF 4 "zero_fp_constant" "F"))
  			 (match_operand:SF 2 "gpc_reg_operand" "f")
  			 (match_operand:SF 3 "gpc_reg_operand" "f")))]
    "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT"
--- 4879,4885 ----
  (define_insn "*fseldfsf4"
    [(set (match_operand:SF 0 "gpc_reg_operand" "=f")
  	(if_then_else:SF (ge (match_operand:DF 1 "gpc_reg_operand" "f")
! 			     (match_operand:DF 4 "zero_fp_constant" "F"))
  			 (match_operand:SF 2 "gpc_reg_operand" "f")
  			 (match_operand:SF 3 "gpc_reg_operand" "f")))]
    "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT"

-- 
- Geoffrey Keating <geoffk@geoffk.org>


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