2011-08-19 Andrew Stubbs <ams@codesourcery.com>
gcc/
* tree-ssa-math-opts.c (is_widening_mult_rhs_p): Add new argument
'type'.
Use 'type' from caller, not inferred from 'rhs'.
Don't reject non-conversion statements. Do return lhs in this case.
(is_widening_mult_p): Add new argument 'type'.
Use 'type' from caller, not inferred from 'stmt'.
Pass type to is_widening_mult_rhs_p.
(convert_mult_to_widen): Pass type to is_widening_mult_p.
(convert_plusminus_to_widen): Likewise.
gcc/testsuite/
* gcc.target/arm/wmul-8.c: New file.
From-SVN: r177907
2011-08-19 Andrew Stubbs <ams@codesourcery.com>
gcc/
* tree-ssa-math-opts.c (is_widening_mult_p): Remove FIXME.
Ensure the the larger type is the first operand.
gcc/testsuite/
* gcc.target/arm/wmul-7.c: New file.
From-SVN: r177906
2011-08-19 Richard Guenther <rguenther@suse.de>
PR tree-optimization/50067
* tree-data-ref.c (dr_analyze_indices): Simplify, strip MEM_REF
offset only if we accounted for it.
From-SVN: r177903
2011-08-19 Andrew Stubbs <ams@codesourcery.com>
gcc/
* config/arm/arm.md (maddhidi4): Remove '*' from name.
* expr.c (expand_expr_real_2): Use find_widening_optab_handler.
* optabs.c (find_widening_optab_handler_and_mode): New function.
(expand_widen_pattern_expr): Use find_widening_optab_handler.
(expand_binop_directly): Likewise.
(expand_binop): Likewise.
* optabs.h (find_widening_optab_handler): New macro define.
(find_widening_optab_handler_and_mode): New prototype.
* tree-cfg.c (verify_gimple_assign_binary): Adjust WIDEN_MULT_EXPR
type precision rules.
(verify_gimple_assign_ternary): Likewise for WIDEN_MULT_PLUS_EXPR.
* tree-ssa-math-opts.c (build_and_insert_cast): New function.
(is_widening_mult_rhs_p): Allow widening by more than one mode.
Explicitly disallow mis-matched input types.
(convert_mult_to_widen): Use find_widening_optab_handler, and cast
input types to fit the new handler.
(convert_plusminus_to_widen): Likewise.
gcc/testsuite/
* gcc.target/arm/wmul-bitfield-1.c: New file.
From-SVN: r177902
2011-08-19 Andrew Stubbs <ams@codesourcery.com>
gcc/
* expr.c (expand_expr_real_2): Use widening_optab_handler.
* genopinit.c (optabs): Use set_widening_optab_handler for $N.
(gen_insn): $N now means $a must be wider than $b, not consecutive.
* optabs.c (widened_mode): New function.
(expand_widen_pattern_expr): Use widening_optab_handler.
(expand_binop_directly): Likewise.
(expand_binop): Likewise.
* optabs.h (widening_optab_handlers): New struct.
(optab_d): New member, 'widening'.
(widening_optab_handler): New function.
(set_widening_optab_handler): New function.
* tree-ssa-math-opts.c (convert_mult_to_widen): Use
widening_optab_handler.
(convert_plusminus_to_widen): Likewise.
From-SVN: r177901
PR fortran/49792
* trans-expr.c (gfc_trans_assignment_1): Set OMPWS_SCALARIZER_WS
bit in ompws_flags only if loop.temp_ss is NULL, and clear it if
lhs needs reallocation.
* trans-openmp.c (gfc_trans_omp_workshare): Don't return early if
code is NULL, emit a barrier if workshare emitted no code at all
and NOWAIT clause isn't present.
* testsuite/libgomp.fortran/pr49792-1.f90: New test.
* testsuite/libgomp.fortran/pr49792-2.f90: New test.
From-SVN: r177898
2011-08-18 Mikael Morin <mikael.morin@sfr.fr>
PR fortran/50071
* symbol.c (gfc_get_st_label): Use the derived type namespace when
we are parsing a derived type definition.
2011-08-18 Mikael Morin <mikael.morin@sfr.fr>
PR fortran/50071
* gfortran.dg/duplicate_labels_2.f: New test.
From-SVN: r177882
2011-08-18 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/49890
* ira-costs.c (setup_regno_cost_classes_by_aclass): Don't exclude
subclasses of class which is superset of a pressure class.
From-SVN: r177874
2011-08-18 H.J. Lu <hongjiu.lu@intel.com>
Igor Zamyatin <igor.zamyatin@intel.com>
* config/i386/i386-c.c (ix86_target_macros_internal): Replace int
with HOST_WIDE_INT for isa_flag.
(ix86_pragma_target_parse): Replace int with HOST_WIDE_INT for
isa variables.
* config/i386/i386.c (ix86_target_string): Replace int with
HOST_WIDE_INT for isa. Use HOST_WIDE_INT_PRINT to print isa.
(ix86_target_opts): Replace int with HOST_WIDE_INT on mask.
(pta_flags): Removed.
(PTA_XXX): Redefined as (HOST_WIDE_INT_1 << X).
(pta): Use HOST_WIDE_INT on flags.
(builtin_isa): Use HOST_WIDE_INT on isa.
(ix86_add_new_builtins): Likewise.
(def_builtin): Use HOST_WIDE_INT on mask.
(def_builtin_const): Likewise.
(builtin_description): Likewise.
* config/i386/i386.opt (ix86_isa_flags): Replace int with
HOST_WIDE_INT.
(ix86_isa_flags_explicit): Likewise.
(x_ix86_isa_flags_explicit): Likewise.
Co-Authored-By: Igor Zamyatin <igor.zamyatin@intel.com>
From-SVN: r177870
2011-08-17 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/50107
* ira-int.h (ira_hard_reg_not_in_set_p): Remove.
(ira_hard_reg_in_set_p): New.
* ira-color.c (calculate_saved_nregs): New.
(assign_hard_reg): Use it. Set up allocated_hard_reg_p for all
hard regs.
(allocno_reload_assign, fast_allocation): Use
ira_hard_reg_set_intersection_p instead of
ira_hard_reg_not_in_set_p.
* ira.c (setup_reg_renumber): Use
ira_hard_reg_set_intersection_p instead of
ira_hard_reg_not_in_set_p.
(setup_allocno_assignment_flags, calculate_allocation_cost): Use
ira_hard_reg_in_set_p instead of ira_hard_reg_not_in_set_p.
* ira-costs.c (ira_tune_allocno_costs): Use
ira_hard_reg_set_intersection_p instead of
ira_hard_reg_not_in_set_p.
From-SVN: r177865
PR target/50009
* stor-layout.c (update_alignment_for_field): Don't ICE on
packed flexible array members if ms_bitfield_layout_p.
* gcc.c-torture/compile/pr50009.c: New test.
From-SVN: r177860
PR target/50092
* config/i386/i386.c (assign_386_stack_local): Call validize_mem
on the result before returning it.
* gcc.dg/torture/pr50092.c: New test.
From-SVN: r177859
PR debug/50017
* tree-vect-stmts.c (vect_finish_stmt_generation): If gsi_stmt (*gsi)
is a debug stmt, use location of the first non-debug stmt after it.
* gcc.dg/pr50017.c: New test.
From-SVN: r177857
2011-08-18 Richard Guenther <rguenther@suse.de>
* expr.c (get_inner_reference): Sign-extend the constant
twos-complement offset before doing arbitrary precision
arithmetic on it.
* tree-ssa-structalias.c (get_constraint_for_ptr_offset): Likewise.
(get_constraint_for_1): Pass the offset of a MEM_REF unchanged
to get_constraint_for_ptr_offset.
From-SVN: r177847
gcc/cp/
* pt.c (parameter_of_template_p): Handle comparison with DECLs of
template parameters as created by process_template_parm.
gcc/testsuite/
* g++.dg/lookup/hidden-var1.C: New test case.
From-SVN: r177846