re PR target/36710 (FAIL: gcc.dg/torture/fp-int-convert-float128.c -Os (internal...
authorUros Bizjak <uros@gcc.gnu.org>
Thu, 3 Jul 2008 18:57:11 +0000 (20:57 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Thu, 3 Jul 2008 18:57:11 +0000 (20:57 +0200)
PR target/36710
* config/i386/i386.md (mode): Add TF to mode attribute.
(*pushtf_sse): New insn pattern.
(pushtf splitters): New splitters.

testsuite/ChangeLog:

PR target/36710
* gcc.target/i386/float128-2.c: New test.

From-SVN: r137427

gcc/ChangeLog
gcc/config/i386/i386.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/float128-2.c [new file with mode: 0644]

index 184ce612034fb3da7a13b68dcb99fdb3e2de9631..da6051d1fda5d5e97a582b9ed11b51d793528ba3 100644 (file)
@@ -1,3 +1,10 @@
+2008-07-03  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/36710
+       * config/i386/i386.md (mode): Add TF to "mode" attribute.
+       (*pushtf_sse): New insn pattern.
+       (pushtf splitters): New splitters.
+
 2008-07-03  Michael Meissner  <gnu@the-meissners.org>
 
        PR middle-end/35736
 
 2008-07-01  Martin Jambor  <mjambor@suse.cz>
 
-        * Makefile.in (tree-switch-conversion.o): Add.
-        (OBJS-common): Add tree-swtch-conversion.o.
-        * passes.c (init_optimization_passes): Add pass_convert_switch.
-        * tree-pass.h: (pass_convert_switch): Add.
-        * tree-switch-conversion.c: New file.
-        * gcc.dg/tree-ssa/cswtch.c: New testcase.
-        * common.opt (ftree-cswtch): New option.
-        * params.h (PARAM_SWITCH_CONVERSION_BRANCH_RATIO): New parameter.
-        * params.def (PARAM_SWITCH_CONVERSION_BRANCH_RATIO): New parameter.
-        * opts.c (decode_options): Set flag_tree_switch_conversion when
-        optimization level is >= 2.
-        * doc/invoke.texi (Optimize Options): Added description of
-        -ftree-swtch-conversion and switch-conversion-max-branch-ratio.
+       * Makefile.in (tree-switch-conversion.o): Add.
+       (OBJS-common): Add tree-swtch-conversion.o.
+       * passes.c (init_optimization_passes): Add pass_convert_switch.
+       * tree-pass.h: (pass_convert_switch): Add.
+       * tree-switch-conversion.c: New file.
+       * gcc.dg/tree-ssa/cswtch.c: New testcase.
+       * common.opt (ftree-cswtch): New option.
+       * params.h (PARAM_SWITCH_CONVERSION_BRANCH_RATIO): New parameter.
+       * params.def (PARAM_SWITCH_CONVERSION_BRANCH_RATIO): New parameter.
+       * opts.c (decode_options): Set flag_tree_switch_conversion when
+       optimization level is >= 2.
+       * doc/invoke.texi (Optimize Options): Added description of
+       -ftree-swtch-conversion and switch-conversion-max-branch-ratio.
 
 2008-06-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
 
        PR rtl-optimization/34744
        * df-scan.c (df_scan_free_ref_vec, df_scan_free_mws_vec): New macros.
-               (df_scan_free_internal): Free data structures not
+       (df_scan_free_internal): Free data structures not
        allocated in storage pools.
        (df_mw_hardreg_chain_delete_eq_uses): Use df_scan_free_mws_vec.
        (df_refs_add_to_chains): Use df_scan_free_ref_vec and
index c67cf467bc90ac522094a40e4e59e08cecd0f44d..6c06184f8796ce504217c435786e01c653dc7f89 100644 (file)
 
 ;; Main data type used by the insn
 (define_attr "mode"
-  "unknown,none,QI,HI,SI,DI,SF,DF,XF,TI,V4SF,V2DF,V2SF,V1DF"
+  "unknown,none,QI,HI,SI,DI,TI,SF,DF,XF,TF,V4SF,V2DF,V2SF,V1DF"
   (const_string "unknown"))
 
 ;; The CPU unit operations uses.
                   (const_string "TI"))]
               (const_string "DI")))])
 
+(define_insn "*pushtf_sse"
+  [(set (match_operand:TF 0 "push_operand" "=<,<,<")
+       (match_operand:TF 1 "general_no_elim_operand" "x,Fo,*r"))]
+  "TARGET_SSE2"
+{
+  /* This insn should be already split before reg-stack.  */
+  gcc_unreachable ();
+}
+  [(set_attr "type" "multi")
+   (set_attr "unit" "sse,*,*")
+   (set_attr "mode" "TF,SI,SI")])
+
+(define_split
+  [(set (match_operand:TF 0 "push_operand" "")
+       (match_operand:TF 1 "general_operand" ""))]
+  "TARGET_SSE2 && reload_completed
+   && !SSE_REG_P (operands[1])"
+  [(const_int 0)]
+  "ix86_split_long_move (operands); DONE;")
+
+(define_split
+  [(set (match_operand:TF 0 "push_operand" "")
+       (match_operand:TF 1 "any_fp_register_operand" ""))]
+  "TARGET_SSE2"
+  [(set (reg:P SP_REG) (plus:P (reg:P SP_REG) (const_int -16)))
+   (set (mem:TF (reg:P SP_REG)) (match_dup 1))]
+  "")
+
 (define_split
   [(set (match_operand 0 "nonimmediate_operand" "")
        (match_operand 1 "general_operand" ""))]
index bd58e5576e913491715bb9ee50c5746b39c574de..4f4e3b92fdf3e642ab7bce6a67acee6b892da3f2 100644 (file)
@@ -1,3 +1,8 @@
+2008-07-03  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/36710
+       * gcc.target/i386/float128-2.c: New test.
+
 2008-07-03  Michael Meissner  <gnu@the-meissners.org>
 
        PR middle-end/35736
@@ -14,8 +19,7 @@
 
 2008-07-03  H.J. Lu  <hongjiu.lu@intel.com>
 
-       * gcc.dg/compat/struct-by-value-17a_main.c: Remove duplicated
-       code.
+       * gcc.dg/compat/struct-by-value-17a_main.c: Remove duplicated code.
 
 2008-07-03  H.J. Lu  <hongjiu.lu@intel.com>
            Uros Bizjak  <ubizjak@gmail.com>
@@ -40,8 +44,7 @@
 
 2008-07-02  Joseph Myers  <joseph@codesourcery.com>
 
-       * g++.dg/compat/struct-layout-1.exp: Compile generator on build
-       system.
+       * g++.dg/compat/struct-layout-1.exp: Compile generator on build system.
        * gcc.dg/compat/struct-layout-1.exp: Likewise.
        * objc.dg/gnu-encoding/gnu-encoding.exp: Likewise.
 
diff --git a/gcc/testsuite/gcc.target/i386/float128-2.c b/gcc/testsuite/gcc.target/i386/float128-2.c
new file mode 100644 (file)
index 0000000..94408d2
--- /dev/null
@@ -0,0 +1,17 @@
+/* PR target/36710 */
+
+/* { dg-do run { target *-*-linux* *-*-darwin* } } */
+/* { dg-options "-Os -msse2" } */
+
+#include "sse2-check.h"
+
+extern void abort (void);
+
+static void
+sse2_test (void)
+{
+  static volatile __float128 a = 123.0q;
+
+  if ((int) a != 123)
+    abort ();
+}