Uros Bizjak [Thu, 8 May 2014 19:02:28 +0000 (21:02 +0200)]
re PR target/61092 (wide-int merge broke alpha bootstrap)
PR target/61092
* config/alpha/alpha.c: Include gimple-iterator.h.
(alpha_gimple_fold_builtin): New function. Move
ALPHA_BUILTIN_UMULH folding from ...
(alpha_fold_builtin): ... here.
(TARGET_GIMPLE_FOLD_BUILTIN): New define.
Marek Polacek [Thu, 8 May 2014 17:42:09 +0000 (17:42 +0000)]
re PR c/61077 (_Atomic in the return type or argument types of main not diagnosed)
PR c/61077
c-family/
* c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
parameter type of main.
c/
* c-decl.c (start_function): Warn for _Atomic-qualified return type
of main.
testsuite/
* gcc.dg/pr61077.c: New test.
Tobias Burnus [Thu, 8 May 2014 17:00:07 +0000 (19:00 +0200)]
gfortran.h (gfc_isym_id): Add GFC_ISYM_CAF_GET and GFC_ISYM_CAF_SEND.
2014-05-08 Tobias Burnus <burnus@net-b.de>
* gfortran.h (gfc_isym_id): Add GFC_ISYM_CAF_GET
and GFC_ISYM_CAF_SEND.
* intrinsic.c (add_functions): Add only internally
accessible caf_get and caf_send functions.
* resolve.c (add_caf_get_intrinsic,
remove_caf_get_intrinsic): New functions.
(resolve_variable): Resolve expression rank and
prepare for add_caf_get_intrinsic call.
(gfc_resolve_expr): For variables, remove rank
resolution.
(resolve_ordinary_assign): Prepare call to
GFC_ISYM_CAF_SEND.
(resolve_code): Avoid call to GFC_ISYM_CAF_GET for
the LHS of an assignment.
Marc Glisse [Thu, 8 May 2014 13:17:01 +0000 (15:17 +0200)]
re PR tree-optimization/59100 (requesting optimization of safe rotate function)
2014-05-08 Marc Glisse <marc.glisse@inria.fr>
PR tree-optimization/59100
gcc/
* tree-ssa-phiopt.c: Include tree-inline.h.
(neutral_element_p, absorbing_element_p): New functions.
(value_replacement): Handle conditional binary operations with a
neutral or absorbing element.
gcc/testsuite/
* gcc.dg/tree-ssa/phi-opt-12.c: New file.
* gcc.dg/tree-ssa/phi-opt-13.c: Likewise.
Richard Biener [Thu, 8 May 2014 12:39:07 +0000 (12:39 +0000)]
tree-ssa-sccvn.c (vn_get_expr_for): Valueize operands before folding the expression.
2014-05-08 Richard Biener <rguenther@suse.de>
* tree-ssa-sccvn.c (vn_get_expr_for): Valueize operands before
folding the expression.
(valueize_expr): Remove.
(visit_reference_op_load): Do not valueize the result of
vn_get_expr_for.
(simplify_binary_expression): Likewise.
(simplify_unary_expression): Likewise.
Gary Benson [Thu, 8 May 2014 09:13:44 +0000 (09:13 +0000)]
cp-demangle.c (struct d_component_stack): New structure.
libiberty/
2014-05-08 Gary Benson <gbenson@redhat.com>
* cp-demangle.c (struct d_component_stack): New structure.
(struct d_print_info): New field component_stack.
(d_print_init): Initialize the above.
(d_print_comp_inner): Renamed from d_print_comp.
Do not restore template stack if it would cause a loop.
(d_print_comp): New function.
* testsuite/demangle-expected: New test cases.
DJ Delorie [Thu, 8 May 2014 03:08:12 +0000 (23:08 -0400)]
c-cppbuiltin.c (print_bits_of_hex): New.
* c-cppbuiltin.c (print_bits_of_hex): New.
(builtin_define_type_minmax): Print values using hex so as not to
require a pre-computed list of string values.
Alan Modra [Thu, 8 May 2014 02:05:19 +0000 (11:35 +0930)]
re PR target/60737 (rs6000 expand_block_clear uses word stores on double word pointer)
PR target/60737
* config/rs6000/rs6000.c (expand_block_move): Allow 64-bit
loads and stores when -mno-strict-align at any alignment.
(expand_block_clear): Similarly. Also correct calculation of
instruction count.
2014-05-07 Thomas Preud'homme <thomas.preudhomme@arm.com>
PR middle-end/39246
* tree-complex.c (expand_complex_move): Keep line info when expanding
complex move.
* tree-ssa-uninit.c (warn_uninit): New argument. Ignore assignment
of complex expression. Use new argument to display correct location
for values coming from phi statement.
(warn_uninitialized_vars): Adapt to new signature of warn_uninit.
(warn_uninitialized_phi): Pass location of phi argument to
warn_uninit.
* tree-ssa.c (ssa_undefined_value_p): For SSA_NAME initialized by a
COMPLEX_EXPR, recurse on each part of the COMPLEX_EXPR.
testsuite:
* gcc.dg/uninit-13.c: Move warning on the actual source line where
the uninitialized complex is used.
* gcc.dg/uninit-17.c: New test to check partial initialization of
complex with branches.
* gcc.dg/uninit-17-O0.c: Likewise.
2014-05-07 Thomas Preud'homme <thomas.preudhomme@arm.com>
PR middle-end/39246
* tree-complex.c (expand_complex_move): Keep line info when expanding
complex move.
* tree-ssa-uninit.c (warn_uninit): New argument. Ignore assignment
of complex expression. Use new argument to display correct location
for values coming from phi statement.
(warn_uninitialized_vars): Adapt to new signature of warn_uninit.
(warn_uninitialized_phi): Pass location of phi argument to
warn_uninit.
* tree-ssa.c (ssa_undefined_value_p): For SSA_NAME initialized by a
COMPLEX_EXPR, recurse on each part of the COMPLEX_EXPR.
testsuite:
* gcc.dg/uninit-13.c: Move warning on the actual source line where
the uninitialized complex is used.
* gcc.dg/uninit-17.c: New test to check partial initialization of
complex with branches.
* gcc.dg/uninit-17-O0.c: Likewise.
2014-05-07 Thomas Preud'homme <thomas.preudhomme@arm.com>
PR middle-end/39246
* tree-complex.c (expand_complex_move): Keep line info when expanding
complex move.
* tree-ssa-uninit.c (warn_uninit): New argument. Ignore assignment
of complex expression. Use new argument to display correct location
for values coming from phi statement.
(warn_uninitialized_vars): Adapt to new signature of warn_uninit.
(warn_uninitialized_phi): Pass location of phi argument to
warn_uninit.
* tree-ssa.c (ssa_undefined_value_p): For SSA_NAME initialized by a
COMPLEX_EXPR, recurse on each part of the COMPLEX_EXPR.
testsuite:
* gcc.dg/uninit-13.c: Move warning on the actual source line where
the uninitialized complex is used.
* gcc.dg/uninit-17.c: New test to check partial initialization of
complex with branches.
* gcc.dg/uninit-17-O0.c: Likewise.
rs6000: New attributes for load/store: "sign_extend", "update" and "indexed"
The new attributes replace the instruction types *_ext*, *_u, *_ux.
This simplifies all code that does not care about the addressing modes,
putting the burden on the code that does care (mostly the scheduling
descriptions for certain CPUs).
It fixes a few minor bugs in the process.
The "update" and "indexed" attributes are automatic for any insn that
has a MEM as operand 0 or 1. Other insns have to set it manually, if
they do not like the default (which is "no"). Insns that are type
load/store/fpload/fpstore but have fewer than two operands need to set
it too, or the compiler will crash. There are very few of those.
This tries not to change semantics anywhere; in particular, the string
and multiple instructions set both "update" and "indexed" (although
they are neither).
David Malcolm [Wed, 7 May 2014 19:35:23 +0000 (19:35 +0000)]
Const-correctness of gimple_call_builtin_p
gcc/
2014-05-07 David Malcolm <dmalcolm@redhat.com>
* gimple.h (gimple_builtin_call_types_compatible_p): Accept a
const_gimple, rather than a gimple.
(gimple_call_builtin_p): Likewise, for the three variants.
* gimple.c (gimple_builtin_call_types_compatible_p): Likewise.
(gimple_call_builtin_p): Likewise, for the three variants.
Richard Biener [Wed, 7 May 2014 14:19:14 +0000 (14:19 +0000)]
re PR tree-optimization/61034 (Optimizing takes too many passes)
2014-05-07 Richard Biener <rguenther@suse.de>
PR tree-optimization/61034
* tree-ssa-alias.c (call_may_clobber_ref_p_1): Export.
(maybe_skip_until): Use translate to take into account
lattices when trying to do disambiguations.
(get_continuation_for_phi_1): Likewise.
(get_continuation_for_phi): Adjust for added translate
arguments.
(walk_non_aliased_vuses): Likewise.
* tree-ssa-alias.h (get_continuation_for_phi): Adjust
prototype.
(walk_non_aliased_vuses): Likewise.
(call_may_clobber_ref_p_1): Declare.
* tree-ssa-sccvn.c (vn_reference_lookup_3): Also
disambiguate against calls. Stop early if we are
only supposed to disambiguate.
* tree-ssa-pre.c (translate_vuse_through_block): Adjust.
Joern Rennecke [Wed, 7 May 2014 13:21:59 +0000 (13:21 +0000)]
epiphany.c (epiphany_handle_interrupt_attribute): Emit an error when the function has arguments.
gcc:
* config/epiphany/epiphany.c (epiphany_handle_interrupt_attribute):
Emit an error when the function has arguments.
gcc/testsuite:
* gcc.target/epiphany/isr-arg.c: New file.
re PR tree-optimization/52252 (An opportunity for x86 gcc vectorizer (gain up to 3 times))
gcc/
* tree-vect-data-refs.c (vect_grouped_load_supported): New
check for loads group of length 3.
(vect_permute_load_chain): New permutations for loads group of
length 3.
* tree-vect-stmts.c (vect_model_load_cost): Change cost
of vec_perm_shuffle for the new permutations.
gcc/testsuite/
PR tree-optimization/52252
* gcc.dg/vect/pr52252-ld.c: Test on loads group of size 3.
Alan Lawrence [Wed, 7 May 2014 10:58:43 +0000 (10:58 +0000)]
Add execution + assembler tests of AArch64 REV Neon Intrinsics.
* gcc.target/aarch64/simd/vrev16p8_1.c: New file.
* gcc.target/aarch64/simd/vrev16p8.x: New file.
* gcc.target/aarch64/simd/vrev16qp8_1.c: New file.
* gcc.target/aarch64/simd/vrev16qp8.x: New file.
* gcc.target/aarch64/simd/vrev16qs8_1.c: New file.
* gcc.target/aarch64/simd/vrev16qs8.x: New file.
* gcc.target/aarch64/simd/vrev16qu8_1.c: New file.
* gcc.target/aarch64/simd/vrev16qu8.x: New file.
* gcc.target/aarch64/simd/vrev16s8_1.c: New file.
* gcc.target/aarch64/simd/vrev16s8.x: New file.
* gcc.target/aarch64/simd/vrev16u8_1.c: New file.
* gcc.target/aarch64/simd/vrev16u8.x: New file.
* gcc.target/aarch64/simd/vrev32p16_1.c: New file.
* gcc.target/aarch64/simd/vrev32p16.x: New file.
* gcc.target/aarch64/simd/vrev32p8_1.c: New file.
* gcc.target/aarch64/simd/vrev32p8.x: New file.
* gcc.target/aarch64/simd/vrev32qp16_1.c: New file.
* gcc.target/aarch64/simd/vrev32qp16.x: New file.
* gcc.target/aarch64/simd/vrev32qp8_1.c: New file.
* gcc.target/aarch64/simd/vrev32qp8.x: New file.
* gcc.target/aarch64/simd/vrev32qs16_1.c: New file.
* gcc.target/aarch64/simd/vrev32qs16.x: New file.
* gcc.target/aarch64/simd/vrev32qs8_1.c: New file.
* gcc.target/aarch64/simd/vrev32qs8.x: New file.
* gcc.target/aarch64/simd/vrev32qu16_1.c: New file.
* gcc.target/aarch64/simd/vrev32qu16.x: New file.
* gcc.target/aarch64/simd/vrev32qu8_1.c: New file.
* gcc.target/aarch64/simd/vrev32qu8.x: New file.
* gcc.target/aarch64/simd/vrev32s16_1.c: New file.
* gcc.target/aarch64/simd/vrev32s16.x: New file.
* gcc.target/aarch64/simd/vrev32s8_1.c: New file.
* gcc.target/aarch64/simd/vrev32s8.x: New file.
* gcc.target/aarch64/simd/vrev32u16_1.c: New file.
* gcc.target/aarch64/simd/vrev32u16.x: New file.
* gcc.target/aarch64/simd/vrev32u8_1.c: New file.
* gcc.target/aarch64/simd/vrev32u8.x: New file.
* gcc.target/aarch64/simd/vrev64f32_1.c: New file.
* gcc.target/aarch64/simd/vrev64f32.x: New file.
* gcc.target/aarch64/simd/vrev64p16_1.c: New file.
* gcc.target/aarch64/simd/vrev64p16.x: New file.
* gcc.target/aarch64/simd/vrev64p8_1.c: New file.
* gcc.target/aarch64/simd/vrev64p8.x: New file.
* gcc.target/aarch64/simd/vrev64qf32_1.c: New file.
* gcc.target/aarch64/simd/vrev64qf32.x: New file.
* gcc.target/aarch64/simd/vrev64qp16_1.c: New file.
* gcc.target/aarch64/simd/vrev64qp16.x: New file.
* gcc.target/aarch64/simd/vrev64qp8_1.c: New file.
* gcc.target/aarch64/simd/vrev64qp8.x: New file.
* gcc.target/aarch64/simd/vrev64qs16_1.c: New file.
* gcc.target/aarch64/simd/vrev64qs16.x: New file.
* gcc.target/aarch64/simd/vrev64qs32_1.c: New file.
* gcc.target/aarch64/simd/vrev64qs32.x: New file.
* gcc.target/aarch64/simd/vrev64qs8_1.c: New file.
* gcc.target/aarch64/simd/vrev64qs8.x: New file.
* gcc.target/aarch64/simd/vrev64qu16_1.c: New file.
* gcc.target/aarch64/simd/vrev64qu16.x: New file.
* gcc.target/aarch64/simd/vrev64qu32_1.c: New file.
* gcc.target/aarch64/simd/vrev64qu32.x: New file.
* gcc.target/aarch64/simd/vrev64qu8_1.c: New file.
* gcc.target/aarch64/simd/vrev64qu8.x: New file.
* gcc.target/aarch64/simd/vrev64s16_1.c: New file.
* gcc.target/aarch64/simd/vrev64s16.x: New file.
* gcc.target/aarch64/simd/vrev64s32_1.c: New file.
* gcc.target/aarch64/simd/vrev64s32.x: New file.
* gcc.target/aarch64/simd/vrev64s8_1.c: New file.
* gcc.target/aarch64/simd/vrev64s8.x: New file.
* gcc.target/aarch64/simd/vrev64u16_1.c: New file.
* gcc.target/aarch64/simd/vrev64u16.x: New file.
* gcc.target/aarch64/simd/vrev64u32_1.c: New file.
* gcc.target/aarch64/simd/vrev64u32.x: New file.
* gcc.target/aarch64/simd/vrev64u8_1.c: New file.
* gcc.target/aarch64/simd/vrev64u8.x: New file.
Alan Lawrence [Wed, 7 May 2014 10:51:15 +0000 (10:51 +0000)]
Add execution + assembler tests of AArch64 EXT intrinsics.
gcc.target/aarch64/simd/ext_f32.x: New file.
gcc.target/aarch64/simd/ext_f32_1.c: New file.
gcc.target/aarch64/simd/ext_p16.x: New file.
gcc.target/aarch64/simd/ext_p16_1.c: New file.
gcc.target/aarch64/simd/ext_p8.x: New file.
gcc.target/aarch64/simd/ext_p8_1.c: New file.
gcc.target/aarch64/simd/ext_s16.x: New file.
gcc.target/aarch64/simd/ext_s16_1.c: New file.
gcc.target/aarch64/simd/ext_s32.x: New file.
gcc.target/aarch64/simd/ext_s32_1.c: New file.
gcc.target/aarch64/simd/ext_s64.x: New file.
gcc.target/aarch64/simd/ext_s64_1.c: New file.
gcc.target/aarch64/simd/ext_s8.x: New file.
gcc.target/aarch64/simd/ext_s8_1.c: New file.
gcc.target/aarch64/simd/ext_u16.x: New file.
gcc.target/aarch64/simd/ext_u16_1.c: New file.
gcc.target/aarch64/simd/ext_u32.x: New file.
gcc.target/aarch64/simd/ext_u32_1.c: New file.
gcc.target/aarch64/simd/ext_u64.x: New file.
gcc.target/aarch64/simd/ext_u64_1.c: New file.
gcc.target/aarch64/simd/ext_u8.x: New file.
gcc.target/aarch64/simd/ext_u8_1.c: New file.
gcc.target/aarch64/simd/ext_f64.c: New file.
gcc.target/aarch64/simd/extq_f32.x: New file.
gcc.target/aarch64/simd/extq_f32_1.c: New file.
gcc.target/aarch64/simd/extq_p16.x: New file.
gcc.target/aarch64/simd/extq_p16_1.c: New file.
gcc.target/aarch64/simd/extq_p8.x: New file.
gcc.target/aarch64/simd/extq_p8_1.c: New file.
gcc.target/aarch64/simd/extq_s16.x: New file.
gcc.target/aarch64/simd/extq_s16_1.c: New file.
gcc.target/aarch64/simd/extq_s32.x: New file.
gcc.target/aarch64/simd/extq_s32_1.c: New file.
gcc.target/aarch64/simd/extq_s64.x: New file.
gcc.target/aarch64/simd/extq_s64_1.c: New file.
gcc.target/aarch64/simd/extq_s8.x: New file.
gcc.target/aarch64/simd/extq_s8_1.c: New file.
gcc.target/aarch64/simd/extq_u16.x: New file.
gcc.target/aarch64/simd/extq_u16_1.c: New file.
gcc.target/aarch64/simd/extq_u32.x: New file.
gcc.target/aarch64/simd/extq_u32_1.c: New file.
gcc.target/aarch64/simd/extq_u64.x: New file.
gcc.target/aarch64/simd/extq_u64_1.c: New file.
gcc.target/aarch64/simd/extq_u8.x: New file.
gcc.target/aarch64/simd/extq_u8_1.c: New file.
gcc.target/aarch64/simd/extq_f64.c: New file.
Alan Lawrence [Wed, 7 May 2014 10:20:54 +0000 (10:20 +0000)]
Add execution + assembler tests of AArch64 TRN Intrinsics.
* gcc.target/aarch64/simd/vtrnf32_1.c: New file.
* gcc.target/aarch64/simd/vtrnf32.x: New file.
* gcc.target/aarch64/simd/vtrnp16_1.c: New file.
* gcc.target/aarch64/simd/vtrnp16.x: New file.
* gcc.target/aarch64/simd/vtrnp8_1.c: New file.
* gcc.target/aarch64/simd/vtrnp8.x: New file.
* gcc.target/aarch64/simd/vtrnqf32_1.c: New file.
* gcc.target/aarch64/simd/vtrnqf32.x: New file.
* gcc.target/aarch64/simd/vtrnqp16_1.c: New file.
* gcc.target/aarch64/simd/vtrnqp16.x: New file.
* gcc.target/aarch64/simd/vtrnqp8_1.c: New file.
* gcc.target/aarch64/simd/vtrnqp8.x: New file.
* gcc.target/aarch64/simd/vtrnqs16_1.c: New file.
* gcc.target/aarch64/simd/vtrnqs16.x: New file.
* gcc.target/aarch64/simd/vtrnqs32_1.c: New file.
* gcc.target/aarch64/simd/vtrnqs32.x: New file.
* gcc.target/aarch64/simd/vtrnqs8_1.c: New file.
* gcc.target/aarch64/simd/vtrnqs8.x: New file.
* gcc.target/aarch64/simd/vtrnqu16_1.c: New file.
* gcc.target/aarch64/simd/vtrnqu16.x: New file.
* gcc.target/aarch64/simd/vtrnqu32_1.c: New file.
* gcc.target/aarch64/simd/vtrnqu32.x: New file.
* gcc.target/aarch64/simd/vtrnqu8_1.c: New file.
* gcc.target/aarch64/simd/vtrnqu8.x: New file.
* gcc.target/aarch64/simd/vtrns16_1.c: New file.
* gcc.target/aarch64/simd/vtrns16.x: New file.
* gcc.target/aarch64/simd/vtrns32_1.c: New file.
* gcc.target/aarch64/simd/vtrns32.x: New file.
* gcc.target/aarch64/simd/vtrns8_1.c: New file.
* gcc.target/aarch64/simd/vtrns8.x: New file.
* gcc.target/aarch64/simd/vtrnu16_1.c: New file.
* gcc.target/aarch64/simd/vtrnu16.x: New file.
* gcc.target/aarch64/simd/vtrnu32_1.c: New file.
* gcc.target/aarch64/simd/vtrnu32.x: New file.
* gcc.target/aarch64/simd/vtrnu8_1.c: New file.
* gcc.target/aarch64/simd/vtrnu8.x: New file.
revert: lra-constraints.c (valid_address_p): Move earlier in file.
gcc/
Revert:
2014-05-03 Richard Sandiford <rdsandiford@googlemail.com>
* lra-constraints.c (valid_address_p): Move earlier in file.
Add a constraint argument to the address_info version.
(satisfies_memory_constraint_p): New function.
(satisfies_address_constraint_p): Likewise.
(process_alt_operands, curr_insn_transform): Use them.
(process_address): Pass the constraint to valid_address_p when
checking address operands.
emit-rtl.c (init_derived_machine_modes): New functionm, split out from...
gcc/
* emit-rtl.c (init_derived_machine_modes): New functionm, split
out from...
(init_emit_once): ...here.
* rtl.h (init_derived_machine_modes): Declare.
* toplev.c (do_compile): Call it even if no_backend.
Chris Manghane [Tue, 6 May 2014 13:50:01 +0000 (13:50 +0000)]
compiler: Store flags for division checks in Gogo object instead of using global variables.
* go-c.h (go_create_gogo): Update declaration to add
check_divide_zero and check_divide_overflow parameters.
* go-lang.c (go_langhook_init): Pass new arguments to
go_create_gogo.
If the same type was embedded in a struct at different levels,
only the first embedded instance was considered when building
the set of all methods. A second instance was ignored, even
if it was at a higher level and should therefore override the
first instance.
Richard Biener [Mon, 5 May 2014 17:40:08 +0000 (17:40 +0000)]
passes.c (execute_function_todo): Don't reset TODO_verify_ssa from last_verified if update_ssa ran.
2014-05-05 Richard Biener <rguenther@suse.de>
* passes.c (execute_function_todo): Don't reset TODO_verify_ssa
from last_verified if update_ssa ran. Move TODO_verify_rtl_sharing
under the TODO_verify_il umbrella.