OSDN Git Service

PR target/36992
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 3 Aug 2008 06:13:04 +0000 (06:13 +0000)
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 3 Aug 2008 06:13:04 +0000 (06:13 +0000)
* config/i386/sse.md (vec_concatv2di): Add Y2 constraint to
alternative 0 of operand 1.
(*vec_concatv2di_rex64_sse): Ditto.
(*vec_concatv2di_rex64_sse4_1): Add x constraint to alternative 0
of operand 1.
(*sse2_storeq_rex64): Penalize allocation of "r" registers.
* config/i386/mmx.md (*mov<mode>_internal_rex64): Penalize allocation
of "Y2" registers to avoid SSE <-> MMX conversions for DImode moves.
(*movv2sf_internal_rex64): Ditto.

testsuite/ChangeLog:

PR target/36992
* gcc.target/i386/pr36992-1.c: New test.
* gcc.target/i386/pr36992-2.c: Ditto.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138564 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 496647c..7ff6c0c 100644 (file)
@@ -1,3 +1,16 @@
+2008-08-03  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/36992
+       * config/i386/sse.md (vec_concatv2di): Add Y2 constraint to
+       alternative 0 of operand 1.
+       (*vec_concatv2di_rex64_sse): Ditto.
+       (*vec_concatv2di_rex64_sse4_1): Add x constraint to alternative 0
+       of operand 1.
+       (*sse2_storeq_rex64): Penalize allocation of "r" registers.
+       * config/i386/mmx.md (*mov<mode>_internal_rex64): Penalize allocation
+       of "Y2" registers to avoid SSE <-> MMX conversions for DImode moves.
+       (*movv2sf_internal_rex64): Ditto.
+
 2008-08-02  Richard Guenther  <rguenther@suse.de>
 
        PR target/35252
        * matrix-reorg.c: Re-enable all code.
        (struct malloc_call_data): Change CALL_STMT to gimple type.
        (collect_data_for_malloc_call): Tuplify.
-       (struct access_site_info): Change STMT to gimple type.
+       (struct access_site_info): Change STMT to gimple type.
        (struct matrix_info): Change MIN_INDIRECT_LEVEL_ESCAPE_STMT,
        and MALLOC_FOR_LEVEL to gimple and gimple pointer type.
        (struct free_info): Change STMT to gimple type.
-       (struct matrix_access_phi_node):  Change PHI to gimple type.
+       (struct matrix_access_phi_node):  Change PHI to gimple type.
        (get_inner_of_cast_expr): Remove.
        (may_flatten_matrices_1): Tuplify.
        (may_flatten_matrices): Ditto.
        (mark_min_matrix_escape_level): Ditto.
-       (ssa_accessed_in_tree): Refactor statement RHS related code into ...
+       (ssa_accessed_in_tree): Refactor statement RHS related code into ...
        (ssa_accessed_in_call_rhs): New
        (ssa_accessed_in_assign_rhs): New
        (record_access_alloc_site_info): Tuplify.
@@ -50,7 +63,7 @@
        (can_calculate_expr_before_stmt): Factor out statement related code
        into ...
        (can_calculate_stmt_before_stmt): New.
-       (check_allocation_function): Tuplify.
+       (check_allocation_function): Tuplify.
        (find_sites_in_func): Ditto.
        (record_all_accesses_in_func): Ditto.
        (transform_access_sites): Ditto.
        * dwarf2out.c (based_loc_descr): Check crtl->stack_realign_tried
        for stack alignment.
 
-       * function.h (rtl_data): Add stack_realign_tried.  Update
-       comments.
+       * function.h (rtl_data): Add stack_realign_tried.  Update comments.
 
 2008-07-31  Kaz Kojima  <kkojima@gcc.gnu.org>
 
        * config/sh/sh.c (sh_canonical_va_list_type): Remove.
-       (TARGET_CANONICAL_VA_LIST_TYPE): Remove.            
+       (TARGET_CANONICAL_VA_LIST_TYPE): Remove.
 
 2008-07-31  Jakub Jelinek  <jakub@redhat.com>
 
 
        * passes.c (init_optimization_passes): Always call
        pass_early_warn_uninitialized.
-       * opts.c (decode_options): Do not warn about -Wuninitialized
-       at -O0.
+       * opts.c (decode_options): Do not warn about -Wuninitialized at -O0.
        * doc/invoke.texi (-Wuninitialized): Correct for enabling at -O0.
        * doc/passes.texi (Warn for uninitialized variables): Adjust.
 
        (TARGET_CALLS): Add TARGET_UPDATE_STACK_BOUNDARY and
        TARGET_GET_DRAP_RTX.
 
-       * target.h (gcc_target): Add update_stack_boundary and
-       get_drap_rtx.
+       * target.h (gcc_target): Add update_stack_boundary and get_drap_rtx.
 
        * tree-vectorizer.c (vect_can_force_dr_alignment_p): Replace
        STACK_BOUNDARY with MAX_STACK_ALIGNMENT.
        force_align_arg_pointer.
        (ix86_handle_cconv_attribute): Likewise.
        (ix86_function_regparm): Likewise.
-       (setup_incoming_varargs_64): Don't set stack_alignment_needed
-       here.
+       (setup_incoming_varargs_64): Don't set stack_alignment_needed here.
        (ix86_va_start): Replace virtual_incoming_args_rtx with
        crtl->args.internal_arg_pointer.
        (ix86_select_alt_pic_regnum): Check DRAP register.
        (ix86_save_reg): Replace force_align_arg_pointer with drap_reg.
        (ix86_compute_frame_layout): Compute frame layout wrt stack
        realignment.
-       (ix86_internal_arg_pointer): Just return
-       virtual_incoming_args_rtx.
+       (ix86_internal_arg_pointer): Just return virtual_incoming_args_rtx.
        (ix86_expand_prologue): Decide if stack realignment is needed
        and generate prologue code accordingly.
        (ix86_expand_epilogue): Generate epilogue code wrt stack
 
 2008-07-30  Rafael Avila de Espindola  <espindola@google.com>
 
-       * final.c (call_from_call_insn): New.
-       (final_scan_insn): Call assemble_external on FUNCTION_DECLs.
+       * final.c (call_from_call_insn): New.
+       (final_scan_insn): Call assemble_external on FUNCTION_DECLs.
 
 2008-07-30  Paolo Bonzini  <bonzini@gnu.org>
 
 
 2008-07-29  Richard Guenther  <rguenther@suse.de>
 
-       * gimplify.c (gimplify_expr): Clear TREE_SIDE_EFFECTS for
-       OBJ_TYPE_REF.
+       * gimplify.c (gimplify_expr): Clear TREE_SIDE_EFFECTS for OBJ_TYPE_REF.
 
 2008-07-29  Jakub Jelinek  <jakub@redhat.com>
 
        (insert_fake_stores): Remove.
        (realify_fake_stores): Likewise.
        (execute_pre): Remove dead code.
-       * tree-ssa-structalias.c (get_constraint_for_1): Remove tcc_unary
-       case.
+       * tree-ssa-structalias.c (get_constraint_for_1): Remove tcc_unary case.
        (find_func_aliases): Deal with it here instead.
        Re-enable gcc_unreachable call.
 
 
 2008-07-25  Jan Hubicka  <jh@suse.cz>
 
-       * cgraph.c (cgraph_function_possibly_inlined_p): Do not rely on DECL_INLINE.
+       * cgraph.c (cgraph_function_possibly_inlined_p): Do not rely on
+       DECL_INLINE.
        * cgraphunit.c (record_cdtor_fn): Do not initialize DECL_INLINE
        (cgraph_preserve_function_body_p): Do not rely on DECL_INLINE.
        * dojump.c (clear_pending_stack_adjust): Likewise.
 
        * config/sh/sh.h (OPTIMIZATION_OPTIONS): Set flag_omit_frame_pointer
        to 2 instead of -1.
-       (OVERRIDE_OPTIONS): Check if flag_omit_frame_pointer is equal
-       to 2.
+       (OVERRIDE_OPTIONS): Check if flag_omit_frame_pointer is equal to 2.
 
 2008-07-24  Kai Tietz  <kai.tietz@onevision.com>
 
        (optimize_args): New static vector to remember the optimization
        arguments.
        (parse_optimize_options): New function to set up the optimization
-       arguments from either the optimize attribute or #pragma GCC
-       optimize.
+       arguments from either the optimize attribute or #pragma GCC optimize.
 
        * c-common.h (c_cpp_builtins_optimize_pragma): Add declaration.
        (builtin_define_std): Ditto.
 
        * config.gcc (i[3467]86-*-*): Add i386-c.o to C/C++ languages.
-       Add t-i386 Makefile fragment to add i386-c.o and i386.o
-       dependencies.
+       Add t-i386 Makefile fragment to add i386-c.o and i386.o dependencies.
        (x86_64-*-*): Ditto.
 
        * Makefile.in (TREE_H): Add options.h.
        (Save): Document Save option to create target specific options
        that can be saved/restored on a function specific context.
 
-       * doc/c-tree.texi (DECL_FUNCTION_SPECIFIC_TARGET): Document new
-       macro.
+       * doc/c-tree.texi (DECL_FUNCTION_SPECIFIC_TARGET): Document new macro.
        (DECL_FUNCTION_SPECIFIC_OPTIMIZATION): Ditto.
 
-       * doc/tm.texi (TARGET_VALID_OPTION_ATTRIBUTE_P): Document new
-       hook.
+       * doc/tm.texi (TARGET_VALID_OPTION_ATTRIBUTE_P): Document new hook.
        (TARGET_OPTION_SAVE): Ditto.
        (TARGET_OPTION_RESTORE): Ditto.
        (TARGET_OPTION_PRINT): Ditto.
 2008-07-23  Michael Meissner  <gnu@the-meissners.org>
            Karthik Kumar  <karthikkumar@gmail.com>
 
-       * config/i386/i386.h (TARGET_ABM): Move switch into
-       ix86_isa_flags.
+       * config/i386/i386.h (TARGET_ABM): Move switch into ix86_isa_flags.
        (TARGET_POPCNT): Ditto.
        (TARGET_SAHF): Ditto.
        (TARGET_AES): Ditto.
        (REGISTER_TARGET_PRAGMAS): Define, call ix86_register_pragmas.
 
        * config/i386/i386.opt (arch): New TargetSave field to define
-       fields that need to be saved for function specific option
-       support.
+       fields that need to be saved for function specific option support.
        (tune): Ditto.
        (fpmath): Ditto.
        (branch_cost): Ditto.
        (i386.o): Make dependencies mirror the include files used.
        (i386-c.o): New file, add dependencies.
 
-       * config/i386/i386-protos.h (override_options): Add bool
-       argument.
+       * config/i386/i386-protos.h (override_options): Add bool argument.
        (ix86_valid_option_attribute_tree): Add declaration.
        (ix86_target_macros): Ditto.
        (ix86_register_macros): Ditto.
        masks for the tune variables.
        (ix86_arch_features): Move initialization of the target masks to
        initial_ix86_arch_features to allow functions to have different
-       target options.  Make type unsigned char, instead of unsigned
-       int.
+       target options.  Make type unsigned char, instead of unsigned int.
        (initial_ix86_arch_features): New static vector to hold processor
        masks for the arch variables.
        (enum ix86_function_specific_strings): New enum to describe the
        (ix86_debug_options): New function to print the current options in
        the debugger.
        (ix86_function_specific_save): New function hook to save the
-       function specific global variables in the cl_target_option
-       structure.
+       function specific global variables in the cl_target_option structure.
        (ix86_function_specific_restore): New function hook to restore the
        function specific variables from the cl_target_option structure to
        the global variables.
        attribute((option(...))) arguments.
        (ix86_valid_option_attribute_tree): New function that is common
        code between attribute((option(...))) and #pragma GCC option
-       support that parses the options and returns a tree holding the
-       options.
+       support that parses the options and returns a tree holding the options.
        (ix86_valid_option_attribute_inner_p): New helper function for
        ix86_valid_option_attribute_tree.
        (ix86_can_inline_p): New function hook to decide if one function
        (struct ptt): Move to static file scope from override_options.
        (processor_target_table): Ditto.
        (cpu_names): Ditto.
-       (ix86_handle_option): Add support for options that are now isa
-       options.
+       (ix86_handle_option): Add support for options that are now isa options.
        (override_options): Add support for declaring functions that
        support different target options than were specified on the
        command line.  Move struct ptt, processor_target_table, cpu_names,
 
 2008-07-22  Rafael Avila de Espindola  <espindola@google.com>
 
-       * c-typeck.c (build_external_ref): Don't call assemble_external.
-       * final.c (output_operand): Call assemble_external.
+       * c-typeck.c (build_external_ref): Don't call assemble_external.
+       * final.c (output_operand): Call assemble_external.
 
 2008-07-21  DJ Delorie  <dj@redhat.com>
 
 
 2007-07-16  Rafael Avila de Espindola  <espindola@google.com>
 
-       * c-decl.c (merge_decls): Keep DECL_SOURCE_LOCATION and
-       DECL_IN_SYSTEM_HEADER in sync.
+       * c-decl.c (merge_decls): Keep DECL_SOURCE_LOCATION and
+       DECL_IN_SYSTEM_HEADER in sync.
 
 2008-07-15  Daniel Berlin  <dberlin@dberlin.org>
 
        (finish_optimization_passes): Update.
        (all_passes, all_ipa_passes, all_lowering_passes): Update declaration.
        (register_one_dump_file, register_dump_files_1, next_pass_1):
-       Update arguments.
+       Update arguments.
        (init_optimization_passes): Update handling of new types.
        (execute_one_pass, execute_pass_list, execute_ipa_pass_list): Update.
        * ipa-struct-reorg.c: Update tree_pass descriptors.
        * config/avr/avr.c (avr_arch_types): Add avr6 entry.
        (avr_arch): Add ARCH_AVR6.
        (avr_mcu_types): Add 'atmega2560' and 'atmega2561' entry.
-       (initial_elimination_offset): Initialize and use 'avr_pc_size'
+       (initial_elimination_offset): Initialize and use 'avr_pc_size'
        instead of fixed value 2.
        (print_operand_address): Use gs() asm specifier instead of pm().
        (avr_assemble_integer): (Ditto.).
        'have_elpm', 'have_elpmx', 'have_eijmp_eicall', 'reserved'. Rename
        'mega' to 'have_jmp_call'.
        (TARGET_CPU_CPP_BUILTINS): Define "__AVR_HAVE_JMP_CALL__",
-       "__AVR_HAVE_RAMPZ__",   "__AVR_HAVE_ELPM__" and  "__AVR_HAVE_ELPMX__"
+       "__AVR_HAVE_RAMPZ__", "__AVR_HAVE_ELPM__" and "__AVR_HAVE_ELPMX__"
        macros.
        (LINK_SPEC, CRT_BINUTILS_SPECS, ASM_SPEC): Add 'avr31' and 'avr51'
        architectures.
        * config/avr/t-avr (MULTILIB_OPTIONS, MULTILIB_DIRNAMES,
-       MULTILIB_MATCHES): (Ditto.).
+       MULTILIB_MATCHES): Ditto.
 
 2008-01-23  Richard Guenther  <rguenther@suse.de>
 
index 0a507e0..ca09587 100644 (file)
@@ -65,9 +65,9 @@
 
 (define_insn "*mov<mode>_internal_rex64"
   [(set (match_operand:MMXMODEI8 0 "nonimmediate_operand"
-                               "=rm,r,!?y,!?y ,m  ,!y,Y2,x,x ,m,r,x")
+                               "=rm,r,!?y,!?y ,m  ,!y,*Y2,x,x ,m,r,x")
        (match_operand:MMXMODEI8 1 "vector_move_operand"
-                               "Cr ,m,C  ,!?ym,!?y,Y2,!y,C,xm,x,x,r"))]
+                               "Cr ,m,C  ,!?ym,!?y,*Y2,!y,C,xm,x,x,r"))]
   "TARGET_64BIT && TARGET_MMX
    && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
   "@
 
 (define_insn "*movv2sf_internal_rex64"
   [(set (match_operand:V2SF 0 "nonimmediate_operand"
-                               "=rm,r ,!?y,!?y ,m ,!y,Y2,x,x,x,m,r,x")
+                               "=rm,r ,!?y,!?y ,m ,!y,*Y2,x,x,x,m,r,x")
         (match_operand:V2SF 1 "vector_move_operand"
-                               "Cr ,m ,C  ,!?ym,!y,Y2,!y,C,x,m,x,x,r"))]
+                               "Cr ,m ,C  ,!?ym,!y,*Y2,!y,C,x,m,x,x,r"))]
   "TARGET_64BIT && TARGET_MMX
    && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
   "@
index 9c0030b..baa9976 100644 (file)
   "")
 
 (define_insn "*sse2_storeq_rex64"
-  [(set (match_operand:DI 0 "nonimmediate_operand" "=mx,r,r")
+  [(set (match_operand:DI 0 "nonimmediate_operand" "=mx,*r,r")
        (vec_select:DI
          (match_operand:V2DI 1 "nonimmediate_operand" "x,Yi,o")
          (parallel [(const_int 0)])))]
    (set_attr "mode" "TI,V4SF,V2SF")])
 
 (define_insn "vec_concatv2di"
-  [(set (match_operand:V2DI 0 "register_operand"     "=Y2,?Y2,Y2,x,x,x")
+  [(set (match_operand:V2DI 0 "register_operand"     "=Y2 ,?Y2,Y2,x,x,x")
        (vec_concat:V2DI
-         (match_operand:DI 1 "nonimmediate_operand" "  m,*y ,0 ,0,0,m")
-         (match_operand:DI 2 "vector_move_operand"  "  C,  C,Y2,x,m,0")))]
+         (match_operand:DI 1 "nonimmediate_operand" " mY2,*y ,0 ,0,0,m")
+         (match_operand:DI 2 "vector_move_operand"  " C  ,  C,Y2,x,m,0")))]
   "!TARGET_64BIT && TARGET_SSE"
   "@
    movq\t{%1, %0|%0, %1}
    (set_attr "mode" "TI,TI,TI,V4SF,V2SF,V2SF")])
 
 (define_insn "*vec_concatv2di_rex64_sse4_1"
-  [(set (match_operand:V2DI 0 "register_operand"     "=x,x,Yi,!x,x,x,x,x")
+  [(set (match_operand:V2DI 0 "register_operand"     "=x ,x ,Yi,!x,x,x,x,x")
        (vec_concat:V2DI
-         (match_operand:DI 1 "nonimmediate_operand" " 0,m,r ,*y,0,0,0,m")
-         (match_operand:DI 2 "vector_move_operand"  "rm,C,C ,C ,x,x,m,0")))]
+         (match_operand:DI 1 "nonimmediate_operand" " 0 ,mx,r ,*y,0,0,0,m")
+         (match_operand:DI 2 "vector_move_operand"  " rm,C ,C ,C ,x,x,m,0")))]
   "TARGET_64BIT && TARGET_SSE4_1"
   "@
    pinsrq\t{$0x1, %2, %0|%0, %2, 0x1}
    (set_attr "mode" "TI,TI,TI,TI,TI,V4SF,V2SF,V2SF")])
 
 (define_insn "*vec_concatv2di_rex64_sse"
-  [(set (match_operand:V2DI 0 "register_operand"     "=Y2,Yi,!Y2,Y2,x,x,x")
+  [(set (match_operand:V2DI 0 "register_operand"     "=Y2 ,Yi,!Y2,Y2,x,x,x")
        (vec_concat:V2DI
-         (match_operand:DI 1 "nonimmediate_operand" "  m,r ,*y ,0 ,0,0,m")
-         (match_operand:DI 2 "vector_move_operand"  "  C,C ,C  ,Y2,x,m,0")))]
+         (match_operand:DI 1 "nonimmediate_operand" " mY2,r ,*y ,0 ,0,0,m")
+         (match_operand:DI 2 "vector_move_operand"  " C  ,C ,C  ,Y2,x,m,0")))]
   "TARGET_64BIT && TARGET_SSE"
   "@
    movq\t{%1, %0|%0, %1}
index 9937b9b..e3d7628 100644 (file)
@@ -1,3 +1,9 @@
+2008-08-03  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/36992
+       * gcc.target/i386/pr36992-1.c: New test.
+       * gcc.target/i386/pr36992-2.c: Ditto.
+
 2008-08-02  Richard Guenther  <rguenther@suse.de>
 
        PR target/35252
 
 2008-07-21  Paolo Carlini  <paolo.carlini@oracle.com>
 
-        PR c++/36871
+       PR c++/36871
        PR c++/36872
-        * g++.dg/ext/has_nothrow_copy.C: Rename to...
-        * g++.dg/ext/has_nothrow_copy-1.C: ... this.
-        * g++.dg/ext/has_nothrow_copy-2.C: New.
-        * g++.dg/ext/has_nothrow_copy-3.C: Likewise.
-        * g++.dg/ext/has_nothrow_copy-4.C: Likewise.
-        * g++.dg/ext/has_nothrow_copy-5.C: Likewise.
-        * g++.dg/ext/has_nothrow_copy-6.C: Likewise.
-        * g++.dg/ext/has_nothrow_copy-7.C: Likewise.
+       * g++.dg/ext/has_nothrow_copy.C: Rename to...
+       * g++.dg/ext/has_nothrow_copy-1.C: ... this.
+       * g++.dg/ext/has_nothrow_copy-2.C: New.
+       * g++.dg/ext/has_nothrow_copy-3.C: Likewise.
+       * g++.dg/ext/has_nothrow_copy-4.C: Likewise.
+       * g++.dg/ext/has_nothrow_copy-5.C: Likewise.
+       * g++.dg/ext/has_nothrow_copy-6.C: Likewise.
+       * g++.dg/ext/has_nothrow_copy-7.C: Likewise.
 
 2008-07-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
diff --git a/gcc/testsuite/gcc.target/i386/pr36992-1.c b/gcc/testsuite/gcc.target/i386/pr36992-1.c
new file mode 100644 (file)
index 0000000..aad6f7c
--- /dev/null
@@ -0,0 +1,12 @@
+/* { dg-do compile }
+/* { dg-options "-O2 -msse2" } */
+
+#include <emmintrin.h>
+
+__m128i
+test (__m128i b)
+{
+  return _mm_move_epi64 (b);
+}
+
+/* { dg-final { scan-assembler-times "mov\[qd\]\[ \\t\]+.*%xmm" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr36992-2.c b/gcc/testsuite/gcc.target/i386/pr36992-2.c
new file mode 100644 (file)
index 0000000..eb9c3a2
--- /dev/null
@@ -0,0 +1,12 @@
+/* { dg-do compile }
+/* { dg-options "-O0 -msse2" } */
+
+#include <emmintrin.h>
+
+__m128i
+test (__m128i b)
+{
+  return _mm_move_epi64 (b);
+}
+
+/* { dg-final { scan-assembler-not "%mm" } } */