Commit 974e0ad6 by Uros Bizjak

i386.c (standard_sse_constant_p): Handle AVX2 modes.

2011-09-08  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.c (standard_sse_constant_p): Handle AVX2 modes.
	(standard_sse_constant_opcode) <case 2>: Change vpcmpeqd template.

testsuite/ChangeLog:

2011-09-08  Uros Bizjak  <ubizjak@gmail.com>

	* gcc.target/i386/all_one_m256i.c: New test.

From-SVN: r178704
parent bd2777de
2011-09-08 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.c (standard_sse_constant_p): Handle AVX2 modes.
(standard_sse_constant_opcode) <case 2>: Change vpcmpeqd template.
2011-09-08 Bernd Schmidt <bernds@codesourcery.com> 2011-09-08 Bernd Schmidt <bernds@codesourcery.com>
* config/arm/arm.md (push_multi): Emit predicates. * config/arm/arm.md (push_multi): Emit predicates.
...@@ -8,19 +13,16 @@ ...@@ -8,19 +13,16 @@
PR c++/33255 - Support -Wunused-local-typedefs warning PR c++/33255 - Support -Wunused-local-typedefs warning
* c-decl.c (lookup_name): Use the new maybe_record_typedef_use. * c-decl.c (lookup_name): Use the new maybe_record_typedef_use.
(pushdecl): Use the new (pushdecl): Use the new record_locally_defined_typedef.
record_locally_defined_typedef. (store_parm_decls): Allocate cfun->language.
(store_parm_decls): Allocate cfun->language. (finish_function): Use the new maybe_warn_unused_local_typedefs,
(finish_function): Use the new maybe_warn_unused_local_typedefs, and free cfun->language.
and free cfun->language. (c_push_function_context): Allocate cfun->language here only if needed.
(c_push_function_context): Allocate cfun->language here only if (c_pop_function_context): Likewise, mark cfun->language
needed. for collection only when it should be done.
(c_pop_function_context): Likewise, mark cfun->language * c-common.c (handle_used_attribute): Don't ignore TYPE_DECL nodes.
for collection only when it should be done. * c-typeck.c (c_expr_sizeof_type, c_cast_expr): Use the new
* c-common.c (handle_used_attribute): Don't ignore TYPE_DECL maybe_record_local_typedef_use.
nodes.
* c-typeck.c (c_expr_sizeof_type, c_cast_expr): Use the new
maybe_record_local_typedef_use.
* doc/invoke.texi: Update documentation for * doc/invoke.texi: Update documentation for
-Wunused-local-typedefs. -Wunused-local-typedefs.
...@@ -78,8 +80,9 @@ ...@@ -78,8 +80,9 @@
2011-09-08 Iain Sandoe <iains@gcc.gnu.org> 2011-09-08 Iain Sandoe <iains@gcc.gnu.org>
*config/darwin-driver.c (darwin_find_version_from_kernel): New routine * config/darwin-driver.c (darwin_find_version_from_kernel): New routine
cut from ... (darwin_default_min_version): Amended to provide defaults cut from ...
(darwin_default_min_version): Amended to provide defaults
for the cross directory case. for the cross directory case.
(darwin_driver_init): call darwin_default_min_version unconditionally. (darwin_driver_init): call darwin_default_min_version unconditionally.
* config/darwin.h (DEF_MIN_OSX_VERSION): New. * config/darwin.h (DEF_MIN_OSX_VERSION): New.
...@@ -114,8 +117,7 @@ ...@@ -114,8 +117,7 @@
(merge_overlapping_regs): Use chain_from_id. Assert that (merge_overlapping_regs): Use chain_from_id. Assert that
chains don't conflict with themselves. chains don't conflict with themselves.
(rename_chains): Take no argument. Iterate over id_to_chain (rename_chains): Take no argument. Iterate over id_to_chain
rather to find chains to rename. Clear tick before the main rather to find chains to rename. Clear tick before the main loop.
loop.
(struct incoming_reg_info): New struct. (struct incoming_reg_info): New struct.
(struct bb_rename_info): New struct. (struct bb_rename_info): New struct.
(init_rename_info, set_incoming_from_chain, merge_chains): New (init_rename_info, set_incoming_from_chain, merge_chains): New
...@@ -239,18 +241,15 @@ ...@@ -239,18 +241,15 @@
* hooks.c (hook_int_uint_mode_1): Likewise. * hooks.c (hook_int_uint_mode_1): Likewise.
* config/i386/i386.h (ix86_tune_indices): Add * config/i386/i386.h (ix86_tune_indices): Add
X86_TUNE_REASSOC_INT_TO_PARALLEL and X86_TUNE_REASSOC_INT_TO_PARALLEL and X86_TUNE_REASSOC_FP_TO_PARALLEL.
X86_TUNE_REASSOC_FP_TO_PARALLEL.
(TARGET_REASSOC_INT_TO_PARALLEL): New. (TARGET_REASSOC_INT_TO_PARALLEL): New.
(TARGET_REASSOC_FP_TO_PARALLEL): Likewise. (TARGET_REASSOC_FP_TO_PARALLEL): Likewise.
* config/i386/i386.c (initial_ix86_tune_features): Add * config/i386/i386.c (initial_ix86_tune_features): Add
X86_TUNE_REASSOC_INT_TO_PARALLEL and X86_TUNE_REASSOC_INT_TO_PARALLEL and X86_TUNE_REASSOC_FP_TO_PARALLEL.
X86_TUNE_REASSOC_FP_TO_PARALLEL.
(ix86_reassociation_width) implementation of (ix86_reassociation_width): New function.
new hook for i386 target.
* params.def (PARAM_TREE_REASSOC_WIDTH): New param added. * params.def (PARAM_TREE_REASSOC_WIDTH): New param added.
...@@ -259,12 +258,11 @@ ...@@ -259,12 +258,11 @@
(swap_ops_for_binary_stmt): Likewise. (swap_ops_for_binary_stmt): Likewise.
(rewrite_expr_tree_parallel): Likewise. (rewrite_expr_tree_parallel): Likewise.
(rewrite_expr_tree): Refactored. Part of code moved into (rewrite_expr_tree): Refactored. Part of code moved into
swap_ops_for_binary_stmt. swap_ops_for_binary_stmt.
(reassociate_bb): Now checks reassociation width to be used (reassociate_bb): Now checks reassociation width to be used and
and call rewrite_expr_tree_parallel instead of rewrite_expr_tree call rewrite_expr_tree_parallel instead of rewrite_expr_tree if needed.
if needed.
2011-09-06 Richard Guenther <rguenther@suse.de> 2011-09-06 Richard Guenther <rguenther@suse.de>
...@@ -342,8 +340,7 @@ ...@@ -342,8 +340,7 @@
2011-09-06 Richard Guenther <rguenther@suse.de> 2011-09-06 Richard Guenther <rguenther@suse.de>
* tree-ssa-sccvn.c (visit_use): CSE stmt pieces and simplify * tree-ssa-sccvn.c (visit_use): CSE stmt pieces and simplify matching.
matching.
2011-09-06 Tom de Vries <tom@codesourcery.com> 2011-09-06 Tom de Vries <tom@codesourcery.com>
...@@ -401,11 +398,9 @@ ...@@ -401,11 +398,9 @@
* config/sparc/sparc.md: Add to "cpu" attribute. * config/sparc/sparc.md: Add to "cpu" attribute.
* config/sparc/sparc.h (TARGET_CPU_niagara3, * config/sparc/sparc.h (TARGET_CPU_niagara3,
TARGET_CPU_niagara4): New, treat as niagara2. TARGET_CPU_niagara4): New, treat as niagara2.
* config/sparc/linux64.h: Handle niagara3 and niagara4 * config/sparc/linux64.h: Handle niagara3 and niagara4 like niagara2.
like niagara2.
* config/sparc/sol2.h: Likewise. * config/sparc/sol2.h: Likewise.
* config/sparc/niagara2.md: Schedule niagara3 like * config/sparc/niagara2.md: Schedule niagara3 like niagara2.
niagara2.
* config/sparc/sparc.c (sparc_option_override): Add * config/sparc/sparc.c (sparc_option_override): Add
niagara3 and niagara4 handling. niagara3 and niagara4 handling.
(sparc32_initialize_trampoline): Likewise. (sparc32_initialize_trampoline): Likewise.
...@@ -712,8 +707,7 @@ ...@@ -712,8 +707,7 @@
* gimple-fold.c (fold_gimple_assign): Move COND_EXPR folding. * gimple-fold.c (fold_gimple_assign): Move COND_EXPR folding.
* tree-object-size.c (cond_expr_object_size): Adjust. * tree-object-size.c (cond_expr_object_size): Adjust.
(collect_object_sizes_for): Likewise. (collect_object_sizes_for): Likewise.
* tree-scalar-evolution.c (interpret_expr): Don't handle * tree-scalar-evolution.c (interpret_expr): Don't handle ternary RHSs.
ternary RHSs.
* tree-ssa-forwprop.c (forward_propagate_into_cond): Fix and simplify. * tree-ssa-forwprop.c (forward_propagate_into_cond): Fix and simplify.
(ssa_forward_propagate_and_combine): Adjust. (ssa_forward_propagate_and_combine): Adjust.
* tree-ssa-loop-im.c (move_computations_stmt): Build the COND_EXPR * tree-ssa-loop-im.c (move_computations_stmt): Build the COND_EXPR
...@@ -8176,7 +8176,7 @@ standard_80387_constant_rtx (int idx) ...@@ -8176,7 +8176,7 @@ standard_80387_constant_rtx (int idx)
} }
/* Return 1 if X is all 0s and 2 if x is all 1s /* Return 1 if X is all 0s and 2 if x is all 1s
in supported SSE vector mode. */ in supported SSE/AVX vector mode. */
int int
standard_sse_constant_p (rtx x) standard_sse_constant_p (rtx x)
...@@ -8194,6 +8194,12 @@ standard_sse_constant_p (rtx x) ...@@ -8194,6 +8194,12 @@ standard_sse_constant_p (rtx x)
case V2DImode: case V2DImode:
if (TARGET_SSE2) if (TARGET_SSE2)
return 2; return 2;
case V32QImode:
case V16HImode:
case V8SImode:
case V4DImode:
if (TARGET_AVX2)
return 2;
default: default:
break; break;
} }
...@@ -8235,7 +8241,8 @@ standard_sse_constant_opcode (rtx insn, rtx x) ...@@ -8235,7 +8241,8 @@ standard_sse_constant_opcode (rtx insn, rtx x)
} }
case 2: case 2:
return "%vpcmpeqd\t%0, %d0"; return "%vpcmpeqd\t%0, %0, %0";
default: default:
break; break;
} }
2011-09-08 Uros Bizjak <ubizjak@gmail.com>
* gcc.target/i386/all_one_m256i.c: New test.
2011-09-08 Paolo Carlini <paolo.carlini@oracle.com> 2011-09-08 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50324 PR c++/50324
...@@ -56,7 +60,7 @@ ...@@ -56,7 +60,7 @@
PR middle-end/48571 PR middle-end/48571
* gcc.c-torture/execute/pr48571-1.c (bar): Use offsets sizeof(int) * gcc.c-torture/execute/pr48571-1.c (bar): Use offsets sizeof(int)
instead of 4. instead of 4.
2011-09-07 Paolo Carlini <paolo.carlini@oracle.com> 2011-09-07 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50309 PR c++/50309
......
/* { dg-do compile } */
/* { dg-options "-O2 -mavx2" } */
typedef long long __m256i __attribute__ ((__vector_size__ (32)));
typedef int __v8si __attribute__ ((__vector_size__ (32)));
__m256i foo ()
{
__m256i minus_1 = (__m256i) (__v8si) { -1, -1, -1, -1, -1, -1, -1, -1 };
return minus_1;
}
/* { dg-final { scan-assembler "vpcmpeqd" } } */
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