Commit c919858d by Michael Meissner Committed by Michael Meissner

Fix 42747, make -mvsx enable sqrt

From-SVN: r155923
parent ef5d1181
2010-01-14 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/42747
* config/rs6000/rs6000.md (sqrtdf2): Split into expander and insn
to allow generation of the xssqrtdp instruction on power7.
(sqrtdf2_fpr): Ditto.
2010-01-14 Jakub Jelinek <jakub@redhat.com>
PR middle-end/42674
......
;; Machine description for IBM RISC System 6000 (POWER) for GNU C compiler
;; Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
;; 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
;; 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
;; Free Software Foundation, Inc.
;; Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
......@@ -6310,7 +6310,14 @@
[(set_attr "type" "dmul")
(set_attr "fp_type" "fp_maddsub_d")])
(define_insn "sqrtdf2"
(define_expand "sqrtdf2"
[(set (match_operand:DF 0 "gpc_reg_operand" "")
(sqrt:DF (match_operand:DF 1 "gpc_reg_operand" "")))]
"(TARGET_PPC_GPOPT || TARGET_POWER2) && TARGET_HARD_FLOAT && TARGET_FPRS
&& TARGET_DOUBLE_FLOAT"
"")
(define_insn "*sqrtdf2_fpr"
[(set (match_operand:DF 0 "gpc_reg_operand" "=d")
(sqrt:DF (match_operand:DF 1 "gpc_reg_operand" "d")))]
"(TARGET_PPC_GPOPT || TARGET_POWER2) && TARGET_HARD_FLOAT && TARGET_FPRS
......
2010-01-14 Michael Meissner <meissner@linux.vnet.ibm.com>
* gcc.target/powerpc/pr42747.c: New file.
2010-01-14 Jakub Jelinek <jakub@redhat.com>
PR middle-end/42674
......
/* { dg-do compile { target { powerpc*-*-* } } } */
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
/* { dg-require-effective-target powerpc_vsx_ok } */
/* { dg-options "-O2 -mcpu=power7 -ffast-math" } */
double foo (double x) { return __builtin_sqrt (x); }
/* { dg-final { scan-assembler "xssqrtdp" } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment