OSDN Git Service

Improve AGU stalls avoidance optimization.
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog
1 2011-09-08  Enkovich Ilya  <ilya.enkovich@intel.com>
2
3         * config/i386/i386-protos.h (ix86_lea_outperforms): New.
4         (ix86_avoid_lea_for_add): Likewise.
5         (ix86_avoid_lea_for_addr): Likewise.
6         (ix86_split_lea_for_addr): Likewise.
7
8         * config/i386/i386.c (LEA_MAX_STALL): New.
9         (increase_distance): Likewise.
10         (insn_defines_reg): Likewise.
11         (insn_uses_reg_mem): Likewise.
12         (distance_non_agu_define_in_bb): Likewise.
13         (distance_agu_use_in_bb): Likewise.
14         (ix86_lea_outperforms): Likewise.
15         (ix86_ok_to_clobber_flags): Likewise.
16         (ix86_avoid_lea_for_add): Likewise.
17         (ix86_avoid_lea_for_addr): Likewise.
18         (ix86_split_lea_for_addr): Likewise.
19         (distance_non_agu_define): Search in pred BBs added.
20         (distance_agu_use): Search in succ BBs added.
21         (IX86_LEA_PRIORITY): Value changed from 2 to 0.
22         (LEA_SEARCH_THRESHOLD): Now depends on LEA_MAX_STALL.
23         (ix86_lea_for_add_ok): Use ix86_lea_outperforms to make decision.
24
25         * config/i386/i386.md: Split added to transform non destructive
26         add into move and add.
27         (lea_1): transformed into insn_and_split to avoid AGU stalls.
28         (lea<mode>_2): Likewise.
29
30 2011-09-08  Martin Jambor  <mjambor@suse.cz>
31
32         PR tree-optimization/50287
33         * ipa-split.c (split_function): Do not create SSA names for
34         non-gimple-registers.
35
36 2011-09-08  Richard Guenther  <rguenther@suse.de>
37
38         PR tree-optimization/19831
39         * tree-ssa-dce.c (mark_all_reaching_defs_necessary_1): Also
40         skip builtins with vdefs that do not really store something.
41         (propagate_necessity): For calls to free that we can associate
42         with an allocation function do not mark the freed pointer
43         definition necessary.
44         (eliminate_unnecessary_stmts): Remove a call to free if
45         the associated call to an allocation function is not necessary.
46
47 2011-09-08  Richard Guenther  <rguenther@suse.de>
48
49         PR tree-optimization/19831
50         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Do not mark
51         allocation functions as necessary.
52
53 2011-09-08  Iain Sandoe  <iains@gcc.gnu.org>
54
55         *config/darwin-driver.c (darwin_find_version_from_kernel): New routine 
56         cut from ... (darwin_default_min_version): Amended to provide defaults
57         for the cross directory case.
58         (darwin_driver_init): call darwin_default_min_version unconditionally.
59         * config/darwin.h (DEF_MIN_OSX_VERSION): New.
60         * config/darwin9.h: Likewise.
61         * config/darwin10.h: Likewise.
62         * config/rs6000/darwin7.h: Likewise.
63
64 2011-09-08  Jakub Jelinek  <jakub@redhat.com>
65
66         PR target/50310
67         * config/i386/i386.c (ix86_prepare_sse_fp_compare_args): Return
68         code early if TARGET_AVX.
69         (ix86_expand_fp_vcond): Handle LTGT and UNEQ.
70
71 2011-09-07  Jakub Jelinek  <jakub@redhat.com>
72
73         * config/i386/sse.md (sseinsnmode): Remove 32-byte integer vector
74         duplicates.
75
76         PR target/50310
77         * config/i386/sse.md (*andnot<mode>3, *<code><mode>3): Fix up
78         "mode" attribute computation.
79
80 2011-09-07  Bernd Schmidt  <bernds@codesourcery.com>
81
82         * regrename.c (struct du_head): Make nregs signed.
83         (closed_chains): Remove.
84         (create_new_chain): Return the new chain.
85         (chain_from_id): New static function.
86         (dump_def_use_chain): Change argument to be an int, indicating
87         the first ID to print.  All callers changed.
88         (merge_overlapping_regs): Use chain_from_id.  Assert that
89         chains don't conflict with themselves.
90         (rename_chains): Take no argument.  Iterate over id_to_chain
91         rather to find chains to rename.  Clear tick before the main
92         loop.
93         (struct incoming_reg_info): New struct.
94         (struct bb_rename_info): New struct.
95         (init_rename_info, set_incoming_from_chain, merge_chains): New
96         static functions.
97         (regrename_analyze): New static function, broken out of
98         regrename_optimize.  Record and make use of open chain information
99         at basic block boundaries, and merge chains where possible.
100         (scan_rtx_reg): Make this_nregs signed.  Don't update
101         closed_chains.
102         (build_def_use): Return a bool to indicate success.  All callers
103         changed.  Don't initialize global data here.
104         (regrename_optimize): Move most code out of here into
105         regrename_analyze.
106         * regs.h (add_range_to_hard_reg_set, remove_range_from_hard_reg_set,
107         range_overlaps_hard_reg_set_p, range_in_hard_reg_set_p): New
108         static inline functions.
109         * vec.h (FOR_EACH_VEC_ELT_FROM): New macro.
110
111         * bb-reorder.c (insert_section_boundary_note): Don't check
112         optimize_function_for_speed_p.
113         (gate_handle_partition_blocks): Do it here instead.
114         (gate_handle_reorder_blocks): Move preliminary checks here ...
115         (rest_of_handle_reorder_blocks): ... from here.
116
117 2011-09-07  Martin Jambor  <mjambor@suse.cz>
118
119         PR middle-end/50301
120         * ipa-cp.c (find_more_values_for_callers_subset): Check jump
121         function index bounds.
122         (perhaps_add_new_callers): Likewise.
123
124 2011-09-07  Martin Jambor  <mjambor@suse.cz>
125
126         PR tree-optimization/49911
127         * tree-sra.c (analyze_access_subtree): Change type of to-be-replaced
128         enumerations to the corresponding plain integer type.
129
130 2011-09-07  Richard Guenther  <rguenther@suse.de>
131
132         PR tree-optimization/50319
133         * tree-if-conv.c (set_bb_predicate): Assert we only set
134         canonical predicates.
135         (add_to_predicate_list): Simplify.  Allow TRUTH_NOT_EXPR
136         around canonical predicates.
137         (predicate_bbs): Do not re-gimplify already canonical
138         predicates.  Properly unshare them though.
139         (find_phi_replacement_condition): Simplify.
140
141 2011-09-07  Richard Sandiford  <richard.sandiford@linaro.org>
142
143         PR target/49030
144         * config/arm/arm-protos.h (maybe_get_arm_condition_code): Declare.
145         * config/arm/arm.c (maybe_get_arm_condition_code): New function,
146         reusing the old code from get_arm_condition_code.  Return ARM_NV
147         for invalid comparison codes.
148         (get_arm_condition_code): Redefine in terms of
149         maybe_get_arm_condition_code.
150         * config/arm/predicates.md (arm_comparison_operator): Use
151         maybe_get_arm_condition_code.
152
153 2011-09-07  Richard Guenther  <rguenther@suse.de>
154
155         * tree-ssa-forwprop.c (forward_propagate_into_gimple_cond):
156         Canonicalize negated predicates by swapping edges.
157         (forward_propagate_into_cond): Likewise.
158
159 2011-09-07  Richard Guenther  <rguenther@suse.de>
160
161         PR tree-optimization/50213
162         * tree-flow.h (simple_iv_increment_p): Declare.
163         * tree-ssa-dom.c (simple_iv_increment_p): Export.  Also handle
164         POINTER_PLUS_EXPR.
165         * tree-ssa-forwprop.c (ssa_forward_propagate_and_combine): Do
166         not propagate simple IV counter increments.
167
168 2011-09-07  Eric Botcazou  <ebotcazou@adacore.com>
169             Iain Sandoe  <iains@gcc.gnu.org>
170
171         * config/rs6000/rs6000.c (compute_save_world_info): Test
172         cfun->has_nonlocal_label to determine if the out-of-line save
173         world call may be used.
174
175 2011-09-07  Nick Clifton  <nickc@redhat.com>
176
177         * config/mn10300/mn10300.c (mn10300_insert_setlb_lcc): Set the jump
178         label on the parallel part of the insn.
179
180 2011-09-07  Jakub Jelinek  <jakub@redhat.com>
181
182         PR debug/50191
183         * dwarf2out.c (mem_loc_descriptor) <case MEM>: Try
184         avoid_constant_pool_reference first instead of last.
185
186 2011-09-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
187
188         * doc/configfiles.texi (Configuration Files): Update documentation
189         about tm_p.h and remove FIXME comment.
190
191 2011-09-06  Uros Bizjak  <ubizjak@gmail.com>
192
193         * config/i386/i386.c (ix86_function_value_regno_p): Use AX_REG.
194         (function_value_32): Do not check TARGET_MMX, TARGET_SSE or TARGET_AVX.
195
196 2011-09-06  Iain Sandoe  <iains@gcc.gnu.org>
197
198         * config/darwin10.h Remove duplicate LIB_SPEC.
199
200 2011-09-06  Enkovich Ilya  <ilya.enkovich@intel.com>
201
202         PR middle-end/44382
203         * target.def (reassociation_width): New hook.
204
205         * doc/tm.texi.in (reassociation_width): Likewise.
206
207         * doc/tm.texi (reassociation_width): Likewise.
208
209         * doc/invoke.texi (tree-reassoc-width): New param documented.
210
211         * hooks.h (hook_int_uint_mode_1): New default hook.
212
213         * hooks.c (hook_int_uint_mode_1): Likewise.
214
215         * config/i386/i386.h (ix86_tune_indices): Add
216         X86_TUNE_REASSOC_INT_TO_PARALLEL and
217         X86_TUNE_REASSOC_FP_TO_PARALLEL.
218
219         (TARGET_REASSOC_INT_TO_PARALLEL): New.
220         (TARGET_REASSOC_FP_TO_PARALLEL): Likewise.
221
222         * config/i386/i386.c (initial_ix86_tune_features): Add
223         X86_TUNE_REASSOC_INT_TO_PARALLEL and
224         X86_TUNE_REASSOC_FP_TO_PARALLEL.
225
226         (ix86_reassociation_width) implementation of
227         new hook for i386 target.
228
229         * params.def (PARAM_TREE_REASSOC_WIDTH): New param added.
230
231         * tree-ssa-reassoc.c (get_required_cycles): New function.
232         (get_reassociation_width): Likewise.
233         (swap_ops_for_binary_stmt): Likewise.
234         (rewrite_expr_tree_parallel): Likewise.
235
236         (rewrite_expr_tree): Refactored. Part of code moved into
237         swap_ops_for_binary_stmt.
238
239         (reassociate_bb): Now checks reassociation width to be used
240         and call rewrite_expr_tree_parallel instead of rewrite_expr_tree
241         if needed.
242
243 2011-09-06  Richard Guenther  <rguenther@suse.de>
244
245         PR tree-optimization/47025
246         * tree-ssa-alias.c (ref_maybe_used_by_call_p_1): BUILT_IN_VA_END
247         uses nothing.
248         (call_may_clobber_ref_p_1): BUILT_IN_VA_END is a barrier like
249         BUILT_IN_FREE.
250         (stmt_kills_ref_p_1): BUILT_IN_VA_END kills what its argument
251         definitely points to.
252         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
253         BUILT_IN_VA_START doesn't let its va_list argument escape.
254         * tree-ssa-dce.c (propagate_necessity): BUILT_IN_VA_END does
255         not make any previous stores necessary.
256
257 2011-09-06  Martin Jambor  <mjambor@suse.cz>
258
259         * ipa-inline.h (struct inline_summary): Move versionable flag...
260         * cgraph.h (struct cgraph_local_info): ...here
261         * ipa-cp.c (determine_versionability): Use the new versionable flag.
262         (determine_versionability): Likewise.
263         (ipcp_versionable_function_p): Likewise.
264         (ipcp_generate_summary): Likewise.
265         * ipa-inline-analysis.c (dump_inline_summary): Do not dump the
266         versionable flag.
267         (compute_inline_parameters): Do not clear the versionable flag.
268         (inline_read_section): Do not stream the versionable flag.
269         (inline_write_summary): Likewise.
270         * lto-cgraph.c (lto_output_node): Stream the versionable flag.
271         (input_overwrite_node): Likewise.
272
273 2011-09-06  Richard Guenther  <rguenther@suse.de>
274
275         PR tree-optimization/48149
276         * tree-ssa-sccvn.c (vn_get_expr_for): Simplify.  Fix tuplification bug.
277         (vn_valueize): Move earlier.
278         (valueize_expr): Use vn_valueize.
279         (simplify_binary_expression): Simplify, also combine COMPLEX_EXPR
280         operands.
281         (simplify_unary_expression): Simplify.
282
283 2011-09-06  Richard Guenther  <rguenther@suse.de>
284
285         PR tree-optimization/48317
286         * tree-ssa-sccvn.h (struct vn_nary_op_s): Make op a true
287         trailing array.
288         (sizeof_vn_nary_op): New inline function.
289         (vn_nary_op_lookup_pieces): Adjust.
290         (vn_nary_op_insert_pieces): Likewise.
291         * tree-ssa-sccvn.c (vn_nary_op_eq): Also compare the length.
292         (init_vn_nary_op_from_pieces): Adjust signature.  Deal with
293         any number of operands.
294         (vn_nary_length_from_stmt): New function.
295         (init_vn_nary_op_from_stmt): Adjust for CONSTRUCTOR handling.
296         (vn_nary_op_lookup_pieces): Adjust signature and allocate properly
297         sized temporary.
298         (vn_nary_op_lookup): Likewise.
299         (vn_nary_op_lookup_stmt): Likewise.
300         (vn_nary_op_insert_into): Likewise.
301         (vn_nary_op_insert_stmt): Likewise.
302         (visit_use): Handle CONSTRUCTOR as nary.
303         * tree-ssa-pre.c (phi_translate_1): Adjust.
304         (create_expression_by_pieces): Likewise.
305         (compute_avail): Likewise.
306
307 2011-09-06  Ira Rosen  <ira.rosen@linaro.org>
308
309          * config/arm/arm.c (arm_preferred_simd_mode): Check
310         TARGET_NEON_VECTORIZE_DOUBLE instead of
311         TARGET_NEON_VECTORIZE_QUAD.
312         (arm_autovectorize_vector_sizes): Likewise.
313         * config/arm/arm.opt (mvectorize-with-neon-quad): Make inverse
314         mask of mvectorize-with-neon-double.  Add RejectNegative.
315         (mvectorize-with-neon-double): New.
316
317 2011-09-06  Richard Guenther  <rguenther@suse.de>
318
319         * tree-ssa-sccvn.c (visit_use): CSE stmt pieces and simplify
320         matching.
321
322 2011-09-06  Tom de Vries  <tom@codesourcery.com>
323
324         * recog.c (asm_labels_ok): New function.
325         (check_asm_operands): Use asm_labels_ok.
326
327 2011-09-05  Richard Sandiford  <rdsandiford@googlemail.com>
328
329         PR target/49606
330         * config/mips/mips.h (ABI_HAS_64BIT_SYMBOLS): Check Pmode.
331         (PMODE_INSN): New macro.
332         * config/mips/mips.c (gen_load_const_gp): Use PMODE_INSN.
333         (mips_got_load, mips_expand_synci_loop): Likewise.
334         (mips_save_gp_to_cprestore_slot): Handle SImode and DImode
335         cprestore patterns.
336         (mips_emit_loadgp): Use PMODE_INSN.  Handle SImode and DImode
337         copygp_mips16 patterns.
338         (mips_expand_prologue): Handle SImode and DImode potential_cprestore
339         and use_cprestore patterns.
340         (mips_override_options): Check for incompatible -mabi and -mlong
341         combinations.
342         * config/mips/mips.md (unspec_got<mode>): Rename to...
343         (unspec_got_<mode>): ...this.
344         (copygp_mips16): Use the Pmode iterator.
345         (potential_cprestore, cprestore, use_cprestore): Likewise.
346         (clear_cache, indirect_jump): Use PMODE_INSN.
347         (indirect_jump<mode>): Rename to...
348         (indirect_jump_<mode>): ...this.
349         (tablejump): Use PMODE_INSN.
350         (tablejump<mode>): Rename to...
351         (tablejump_<mode>): ...this.
352         (exception_receiver): Handle restore_gp_si and restore_gp_di.
353         (restore_gp): Use the Pmode iterator.
354         * config/mips/mips-dsp.md (mips_lbux, mips_lhx, mips_lwx): Use
355         PMODE_INSN.
356
357 2011-09-05  Richard Sandiford  <rdsandiford@googlemail.com>
358
359         * config/mips/mips.c (mips_gimplify_va_arg_expr): Unshare off.
360         Fix the type of the BIT_AND_EXPR.
361
362 2011-09-05  David S. Miller  <davem@davemloft.net>
363
364         * config.host: Add driver-sparc.o and sparc/x-sparc on
365         native sparc*-*-linux* builds.
366         * config/sparc/driver-sparc.c: Correct Linux strings.
367         * config/sparc/linux.h: Add DRIVER_SELF_SPECS.
368         * config/sparc/linux64.h: Likewise.
369         * doc/invoke.texi: Document that Linux also supports
370         -mcpu=native and -mtune=native on sparc.
371
372         * config/sparc/sparc-opts.h (PROCESSOR_NIAGARA3,
373         PROCESSOR_NIAGARA4): New.
374         * config/sparc/sparc.opt: Handle new processor types.
375         * config/sparc/sparc.md: Add to "cpu" attribute.
376         * config/sparc/sparc.h (TARGET_CPU_niagara3,
377         TARGET_CPU_niagara4): New, treat as niagara2.
378         * config/sparc/linux64.h: Handle niagara3 and niagara4
379         like niagara2.
380         * config/sparc/sol2.h: Likewise.
381         * config/sparc/niagara2.md: Schedule niagara3 like
382         niagara2.
383         * config/sparc/sparc.c (sparc_option_override): Add
384         niagara3 and niagara4 handling.
385         (sparc32_initialize_trampoline): Likewise.
386         (sparc64_initialize_trampoline): Likewise.
387         (sparc_use_sched_lookahead): Likewise.
388         (sparc_issue_rate): Likewise.
389         (sparc_register_move_cost): Likewise.
390         * config/sparc/driver-sparc.c (cpu_names): Use niagara3
391         and niagara4 as appropriate.
392         * doc/invoke.texi: Document new processor types.
393         * config.gcc: Recognize niagara3 and niagara4 in --with-cpu
394         and --with-tune options.
395
396         * config/sparc/sol2-64.h: Move ...
397         * config/sparc/default-64.h: ... to here.  Update comment.
398         * config.gcc: Update Solaris sparc to use default-64.h, also
399         prefix this header into the list on sparc64-*-linux.
400         * config/sparc/linux64.h (TARGET_DEFAULT): Only override if
401         TARGET_64BIT_DEFAULT is defined.  Remove commented out reference
402         to MASK_HARD_QUAD.
403
404 2011-09-05  Georg-Johann Lay  <avr@gjlay.de>
405
406         PR target/50289
407         * config/avr/avr.c (sequent_regs_live): Don't recognize sequences
408         that contain global register variable.
409
410 2011-09-05  Richard Guenther  <rguenther@suse.de>
411
412         * tree-cfg.c (replace_uses_by): Use fold_stmt, not fold_stmt_inplace.
413
414 2011-09-05  Richard Guenther  <rguenther@suse.de>
415
416         * stor-layout.c (layout_type): Use size_binop for array size
417         calculations.
418
419 2011-09-05  Georg-Johann Lay  <avr@gjlay.de>
420
421         * config/avr/avr.h (progmem_section): Remove Declaration.
422         * config/avr/avr.c (progmem_section): Make static and rename to
423         progmem_swtable_section.
424         (avr_output_addr_vec_elt): No need to switch sections.
425         (avr_asm_init_sections): Use output_section_asm_op as section
426         callback for progmem_swtable_section.
427         (avr_output_progmem_section_asm_op): Remove Function.
428         (TARGET_ASM_FUNCTION_RODATA_SECTION): New Define.
429         (avr_asm_function_rodata_section): New static Function.
430         * config/avr/elf.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Output
431         alignment 2**1 for jump tables.
432
433 2011-09-04  Jan Hubicka  <jh@suse.cz>
434
435         * ipa-inline-analysis.c (set_cond_stmt_execution_predicate): Check that
436         parameter is SSA name.
437
438 2011-09-04  Richard Guenther  <rguenther@suse.de>
439
440         Revert
441         2011-08-31  Richard Guenther  <rguenther@suse.de>
442
443         * fold-const.c (extract_muldiv_1): Remove bogus TYPE_IS_SIZETYPE
444         special-casing.
445
446 2011-09-04  Iain Sandoe  <iains@gcc.gnu.org>
447
448         PR debug/49901
449         * config/darwin.h (DEBUG_MACRO_SECTION): New macro.
450
451 2011-09-04  Jakub Jelinek  <jakub@redhat.com>
452             Ira Rosen  <ira.rosen@linaro.org>
453
454         PR tree-optimization/50208
455         * tree-vect-patterns.c (vect_handle_widen_mult_by_const): Add an
456         argument.  Check that def_stmt is inside the loop.
457         (vect_recog_widen_mult_pattern): Update calls to
458         vect_handle_widen_mult_by_cons.
459         (vect_operation_fits_smaller_type): Check that def_stmt is
460         inside the loop.
461
462 2011-09-04  Ira Rosen  <ira.rosen@linaro.org>
463
464         * tree-vectorizer.c (vect_print_dump_info): Print line
465         number when dumping to a file.
466         (vectorize_loops): Add new messages to dump file.
467
468 2011-09-03  Martin Jambor  <mjambor@suse.cz>
469
470         * ipa-prop.h (ipa_jump_func_t): New typedef.
471         (struct ipa_edge_args): Removed field argument_count, field
472         jump_functions turned into a vector.
473         (ipa_set_cs_argument_count): Removed.
474         (ipa_get_cs_argument_count): Updated to work on vectors.
475         (ipa_get_ith_jump_func): Likewise.
476         * ipa-prop.c (ipa_count_arguments): Removed.
477         (compute_scalar_jump_functions): Use ipa_get_ith_jump_func to access
478         jump functions.  Update caller.
479         (compute_pass_through_member_ptrs): Likewise.
480         (compute_cst_member_ptr_arguments): Likewise.
481         (ipa_compute_jump_functions_for_edge): Get number of arguments from
482         the statement, allocate vector.
483         (ipa_compute_jump_functions): Do not call ipa_count_arguments.
484         (duplicate_ipa_jump_func_array): Removed.
485         (ipa_edge_duplication_hook): Use VEC_copy, do not copy argument count.
486         (ipa_read_node_info): Allocate vector.
487
488 2011-09-03  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
489
490         PR middle-end/50232
491         * config/pa/pa.md (return): Define "return" insn pattern.
492         (epilogue): Use it when no epilogue is needed.
493         * config/pa/pa.c (pa_can_use_return_insn): New function.
494         * config/pa/pa-protos.h (pa_can_use_return_insn): Declare.
495
496 2011-09-03  Eric Botcazou  <ebotcazou@adacore.com>
497
498         * cfgexpand.c (add_stack_var): Assert that the alignment is not zero.
499         * tree-ssa-ccp.c (fold_builtin_alloca_for_var): Revert latest change.
500         Force at least BITS_PER_UNIT alignment on the new variable.
501
502 2011-09-02  Gary Funck <gary@intrepid.com>
503
504         * opts.c (print_specific_help): Fix off-by-one compare in
505         assertion check.
506         * opts.h (CL_PARAMS, CL_WARNING, CL_OPTIMIZATION, CL_DRIVER,
507         CL_TARGET, CL_COMMON, CL_JOINED, CL_SEPARATE, CL_UNDOCUMENTED):
508         Increase by +5 to allow for more languages.
509         * optc-gen.awk: Generate #if that ensures that the number of
510         languages is within the implementation-defined limit.
511
512 2011-09-02  Michael Matz  <matz@suse.de>
513
514         PR middle-end/50260
515         * ipa-split.c (split_function): Call add_referenced_var.
516
517         * tree-ssa-phiopt.c (cond_store_replacement): Don't call get_var_ann.
518         (cond_if_else_store_replacement_1): Ditto.
519         * tree-ssa-pre.c (get_representative_for): Ditto.
520         (create_expression_by_pieces): Ditto.
521         (insert_into_preds_of_block): Ditto.
522         * tree-sra.c (create_access_replacement): Ditto.
523         (get_replaced_param_substitute): Ditto.
524
525 2011-09-02  Bernd Schmidt  <bernds@codesourcery.com>
526
527         * config/c6x/c6x.md (collapse-ndfa, no-comb-vect): New
528         automata_options.
529         (d1, l1, s1, m1, d2, l2, s2, m2): Changed to define_query_cpu_unit.
530         (l1w, s1w, l2w, s2w): Define in the main automaton.
531         (fps1, fpl1, adddps1, adddpl1, fps2, fpl2, adddps2, adddpl2): New
532         units.
533         * config/c6x/c6x.c (c6x_sched_insn_info): Add unit_mask member.
534         (c6x_unit_names): Add the new units.
535         (c6x_unit_codes): New static array.
536         (UNIT_QID_D1, UNIT_QID_L1, UNIT_QID_S1, UNIT_QID_M1, UNIT_QID_FPS1,
537         UNIT_QID_FPL1, UNIT_QID_ADDDPS1, UNIT_QID_ADDDPL1,
538         UNIT_QID_SIDE_OFFSET): New macros.
539         (RESERVATION_S2): Adjust value.
540         (c6x_option_override): Compute c6x_unit_codes.
541         (assign_reservations): Take the unit_mask of the last instruction
542         into account.  Detect floating point reservations by looking for
543         the new units.  Don't assign reservations if the field is already
544         nonzero.
545         (struct c6x_sched_context): Add member prev_cycle_state_ctx.
546         (init_sched_state): Initialize it.
547         (c6x_clear_sched_context): Free it.
548         (insn_set_clock): Clear reservation.
549         (prev_cycle_state): New static variable.
550         (c6x_init_sched_context): Save it.
551         (c6x_sched_init): Allocate space for it and clear it.
552         (c6x_sched_dfa_pre_cycle_insn): New static function.
553         (c6x_dfa_new_cycle): Save state at the start of a new cycle.
554         (c6x_variable_issue): Only record units in the unit_mask that
555         were not set at the start of the cycle.
556         (c6x_variable_issue): Compute and store the unit_mask from the
557         current state.
558         (reorg_split_calls): Ensure the new information remains correct.
559         (TARGET_SCHED_DFA_NEW_CYCLE, TARGET_SCHED_CLEAR_SCHED_CONTEXT,
560         TARGET_SCHED_DFA_PRE_CYCLE_INSN): Define.
561         * config/c6x/c6x.h (CPU_UNITS_QUERY): Define.
562         * config/c6x/c6x-sched.md.in (fp4_ls_N__CROSS_, adddp_ls_N__CROSS_):
563         Add special reservations.
564         * config/c6x/c6x-sched.md: Regenerate.
565
566 2011-09-02  Martin Jambor  <mjambor@suse.cz>
567
568         * ipa-prop.h (ipa_node_params): Removed fields
569         called_with_var_arguments and node_versionable.
570         (ipa_set_called_with_variable_arg): Removed.
571         (ipa_is_called_with_var_arguments): Likewise.
572         * ipa-cp.c (ipa_get_lattice): Fixed index check in an assert.
573         (determine_versionability): Do not check for type attributes and va
574         builtins.  Record versionability into inline summary.
575         (initialize_node_lattices): Do not check
576         ipa_is_called_with_var_arguments.
577         (propagate_constants_accross_call): Likewise, ignore arguments we do
578         not have PARM_DECLs for, set variable flag for parameters that were
579         not passed a value.
580         (create_specialized_node): Dump info that we cannot change signature.
581         * ipa-prop.c (ipa_compute_jump_functions): Do not care about variable
582         number of arguments.
583         (ipa_make_edge_direct_to_target): Likewise.
584         (ipa_update_after_lto_read): Likewise.
585         (ipa_node_duplication_hook): Do not copy called_with_var_arguments flag.
586         * tree-inline.c (copy_arguments_for_versioning): Copy PARM_DECLs if
587         they were remapped.
588
589 2011-09-02  Richard Guenther  <rguenther@suse.de>
590
591         PR tree-optimization/27460
592         PR middle-end/29269
593         * doc/md.texi (vcond): Document.
594         * genopinit.c (optabs): Turn vcond{,u}_optab into a conversion
595         optab with two modes.
596         * optabs.h (enum convert_optab_index): Add COI_vcond, COI_vcondu.
597         (enum direct_optab_index): Remove DOI_vcond, DOI_vcondu.
598         (vcond_optab): Adjust.
599         (vcondu_optab): Likewise.
600         (expand_vec_cond_expr_p): Adjust prototype.
601         * optabs.c (get_vcond_icode): Adjust.
602         (expand_vec_cond_expr_p): Likewise.
603         (expand_vec_cond_expr): Likewise.
604         * tree-vect-stmts.c (vect_is_simple_cond): Return the comparison
605         vector type.
606         (vectorizable_condition): Allow differing types for comparison
607         and result.
608         * config/i386/i386.c (ix86_expand_sse_cmp): Use proper mode
609         for the comparison.
610         * config/i386/sse.md (vcond<mode>): Split to
611         vcond<V_256:mode><VF_256:mode>, vcond<V_128:mode><VF_128:mode>,
612         vcond<V_128:mode><VI124_128:mode> and
613         vcondu<V_128:mode><VI124_128:mode>.
614         (vcondv2di): Change to vcond<VI8F_128:mode>v2di.
615         (vconduv2di): Likewise.
616         * config/arm/neon.md (vcond<mode>): Change to vcond*<mode><mode>.
617         (vcondu<mode>): Likewise.
618         * config/ia64/vect.md (vcond<mode>): Likewise.
619         (vcondu<mode>): Likewise.
620         (vcondv2sf): Likewise.
621         * config/mips/mips-ps-3d.md (vcondv2sf): Likewise.
622         * config/rs6000/paired.md (vcondv2sf): Likewise.
623         * config/rs6000/vector.md (vcond<mode>): Likewise.
624         (vcondu<mode>): Likewise.
625         * config/spu/spu.md (vcond<mode>): Likewise.
626         (vcondu<mode>): Likewise.
627
628 2011-09-02  Richard Guenther  <rguenther@suse.de>
629
630         * pretty-print.h (pp_unsigned_wide_integer): New.
631         * tree-pretty-print.c (dump_generic_node): Print unsigned
632         host-wide-int fitting INTEGER_CSTs with pp_unsigned_wide_integer.
633
634 2011-09-02  Richard Sandiford  <richard.sandiford@linaro.org>
635
636         PR target/49987
637         * config/rs6000/rs6000.c (paired_expand_vector_init): Check for
638         valid CONST_VECTOR operands.
639         (rs6000_expand_vector_init): Likewise.
640
641 2011-09-02  Martin Jambor  <mjambor@suse.cz>
642
643         * cgraph.h (cgraph_indirect_call_info): Removed field thunk_delta.
644         * gimple-fold.c (gimple_get_virt_method_for_binfo): Rewritten to use
645         BINFO_VTABLE.  Parameter delta removed, all callers updated.
646         * tree.c (free_lang_data_in_binfo): Clear BINFO_VIRTUALs instead
647         BINFO_VTABLE.
648         * cgraph.c (cgraph_make_edge_direct): Removed parameter delta, updated
649         all calls.
650         * cgraphunit.c (cgraph_redirect_edge_call_stmt_to_callee): Removed
651         handling of thunk_delta.
652         * ipa-cp.c (get_indirect_edge_target): Removed parameter delta.
653         (devirtualization_time_bonus): Do not handle thunk deltas.
654         (ipcp_discover_new_direct_edges): Likewise.
655         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
656         (try_make_edge_direct_simple_call): Likewise.
657         (try_make_edge_direct_virtual_call): Likewise.
658         * lto-cgraph.c (output_cgraph_opt_summary_p): Likewise.  Mark
659         parameter set as unused.
660         (output_edge_opt_summary): Likewise.  Mark both parameters as unused.
661         * lto-cgraph.c (output_cgraph_opt_summary_p): Likewise.  Mark
662         parameter set as unused.
663         (output_edge_opt_summary): Likewise.  Mark both parameters as unused.
664         (input_edge_opt_summary): Likewise.
665         * lto-streamer-out.c (lto_output_ts_binfo_tree_pointers): Do not stream
666         BINFO_VIRTUALS at all.
667         * lto-streamer-in.c (lto_input_ts_binfo_tree_pointers): Likewise.
668
669 2011-09-02  Richard Guenther  <rguenther@suse.de>
670
671         * tree-ssa-ccp.c (fold_builtin_alloca_for_var): Do not fold alloca (0).
672         (ccp_fold_stmt): Continue replacing args when folding alloca fails.
673
674 2011-08-31  Richard Guenther  <rguenther@suse.de>
675
676         * expr.c (expand_expr_real_2): Move COND_EXPR and VEC_COND_EXPR
677         handling here, from ...
678         (expand_expr_real_1): ... here.
679         * gimple-pretty-print.c (dump_ternary_rhs): Handle COND_EXPR
680         and VEC_COND_EXPR.
681         * gimple.c (gimple_rhs_class_table): Make COND_EXPR and VEC_COND_EXPR
682         a GIMPLE_TERNARY_RHS.
683         * tree-cfg.c (verify_gimple_assign_ternary): Handle COND_EXPR
684         and VEC_COND_EXPR here ...
685         (verify_gimple_assign_single): ... not here.
686         * gimple-fold.c (fold_gimple_assign): Move COND_EXPR folding.
687         * tree-object-size.c (cond_expr_object_size): Adjust.
688         (collect_object_sizes_for): Likewise.
689         * tree-scalar-evolution.c (interpret_expr): Don't handle
690         ternary RHSs.
691         * tree-ssa-forwprop.c (forward_propagate_into_cond): Fix and simplify.
692         (ssa_forward_propagate_and_combine): Adjust.
693         * tree-ssa-loop-im.c (move_computations_stmt): Build the COND_EXPR
694         as ternary.
695         * tree-ssa-threadedge.c (fold_assignment_stmt): Adjust.
696         * tree-vect-loop.c (vect_is_simple_reduction_1): Likewise.
697         * tree-vect-stmt.c (vectorizable_condition): Likewise.
698         * tree-vrp.c (extract_range_from_cond_expr): Likewise.
699         (extract_range_from_assignment): Likewise.
700
701 2011-08-31  Richard Sandiford  <rdsandiford@googlemail.com>
702
703         * config/i386/i386.md: Use (match_test ...) for attribute tests.
704         * config/i386/mmx.md: Likewise.
705         * config/i386/sse.md: Likewise.
706         * config/i386/predicates.md (call_insn_operand): Use
707         (not (match_test "...")) instead of (match_test "!...")
708         * config/i386/constraints.md (w): Likewise.
709
710 2011-08-31  Richard Sandiford  <rdsandiford@googlemail.com>
711
712         * doc/md.texi: Describe the use of match_tests in attribute tests.
713         * rtl.def (MATCH_TEST): Update commentary.
714         * genattrtab.c (attr_copy_rtx, check_attr_test, clear_struct_flag)
715         (write_test_expr, walk_attr_value): Handle MATCH_TEST.
716
717 2011-08-31  Richard Sandiford  <rdsandiford@googlemail.com>
718
719         * genattrtab.c (attr_rtx_1): Hash SYMBOL_REFs.
720         (attr_string): Use copy_md_ptr_loc.
721
722 2011-08-31  Martin Jambor  <mjambor@suse.cz>
723
724         PR middle-end/49886
725         * ipa-inline-analysis.c (compute_inline_parameters): Set
726         can_change_signature of noes with typde attributes.
727         * ipa-split.c (split_function): Do not skip any arguments if
728         can_change_signature is set.
729
730 2011-08-31  Martin Jambor  <mjambor@suse.cz>
731
732         * cgraphunit.c (cgraph_redirect_edge_call_stmt_to_callee): Alias
733         check removed.
734
735 2011-08-31  Richard Guenther  <rguenther@suse.de>
736
737         * fold-const.c (extract_muldiv_1): Remove bogus TYPE_IS_SIZETYPE
738         special-casing.
739
740 2011-08-31  Marc Glisse  <marc.glisse@inria.fr>
741
742         * doc/generic.texi (Types for C++): CP_TYPE_QUALS -> cp_type_quals.
743
744 2011-08-31  Tom de Vries  <tom@codesourcery.com>
745
746         PR middle-end/43513
747         * Makefile.in (tree-ssa-ccp.o): Add $(PARAMS_H) to rule.
748         * tree-ssa-ccp.c (params.h): Include.
749         (fold_builtin_alloca_for_var): New function.
750         (ccp_fold_stmt): Use fold_builtin_alloca_for_var.
751
752 2011-08-30  Uros Bizjak  <ubizjak@gmail.com>
753
754         * config/i386/i386.c (ix86_valid_target_attribute_inner_p):
755         Handle FMA option.
756
757 2011-08-30  Andrew Stubbs  <ams@codesourcery.com>
758
759         * config/arm/arm.c (optimal_immediate_sequence_1): Make b1, b2,
760         b3 and b4 unsigned.
761
762 2011-08-30  Andrew Stubbs  <ams@codesourcery.com>
763
764         * config/arm/arm.c (arm_gen_constant): Set can_negate correctly
765         when code is SET.
766
767 2011-08-30  Richard Guenther  <rguenther@suse.de>
768
769         PR middle-end/48571
770         * gimple.h (maybe_fold_offset_to_address): Remove.
771         (maybe_fold_offset_to_reference): Likewise.
772         (maybe_fold_stmt_addition): Likewise.
773         (may_propagate_address_into_dereference): Likewise.
774         * tree-inline.c (remap_gimple_op_r): Do not reconstruct
775         array references.
776         * gimple-fold.c (canonicalize_constructor_val): Likewise.
777         Canonicalize invariant POINTER_PLUS_EXPRs to invariant MEM_REF
778         addresses instead.
779         (may_propagate_address_into_dereference): Remove.
780         (maybe_fold_offset_to_array_ref): Likewise.
781         (maybe_fold_offset_to_reference): Likewise.
782         (maybe_fold_offset_to_address): Likewise.
783         (maybe_fold_stmt_addition): Likewise.
784         (fold_gimple_assign): Do not reconstruct array references but
785         instead canonicalize invariant POINTER_PLUS_EXPRs to invariant
786         MEM_REF addresses.
787         (gimple_fold_stmt_to_constant_1): Likewise.
788         * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Likewise.
789         * gimplify.c (gimplify_conversion): Likewise.
790         (gimplify_expr): Likewise.
791
792 2011-08-30  Ilya Tocar  <ilya.tocar@intel.com>
793
794         * config/i386/fmaintrin.h: New.
795         * config.gcc: Add fmaintrin.h.
796         * config/i386/i386.c
797         (enum ix86_builtins) <IX86_BUILTIN_VFMADDSS3>: New.
798         <IX86_BUILTIN_VFMADDSD3>: Likewise.
799         * config/i386/sse.md (fmai_vmfmadd_<mode>): New.
800         (*fmai_fmadd_<mode>): Likewise.
801         (*fmai_fmsub_<mode>): Likewise.
802         (*fmai_fnmadd_<mode>): Likewise.
803         (*fmai_fnmsub_<mode>): Likewise.
804         * config/i386/immintrin.h: Add fmaintrin.h.
805
806 2011-08-30  Bernd Schmidt  <bernds@codesourcery.com>
807
808         * genautomata.c (NO_COMB_OPTION): New macro.
809         (no_comb_flag): New static variable.
810         (gen_automata_option): Handle NO_COMB_OPTION.
811         (comb_vect_p): False if no_comb_flag.
812         (add_vect): Move computation of min/max values.  Return early if
813         no_comb_flag.
814         * doc/md.texi (automata_option): Document no-comb-vect.
815
816         * config/i386/i386.c (get_pc_thunk_name): Change prefix to
817         "__x86.get_pc_thunk".
818
819         * bb-reorder.c (insert_section_boundary_note): Only do it if
820         we reordered the blocks; i.e. not if !optimize_function_for_speed_p.
821
822 2011-08-30  Christian Bruel  <christian.bruel@st.com>
823
824         * coverage.c (coverage_init): Check flag_branch_probabilities instead of
825         flag_profile_use.
826
827 2011-08-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
828
829         * config/rs6000/rs6000.opt (-msave-toc-indirect): Change default
830         to off.  Document switch.
831         * doc/invoke.texi (-msave-toc-indirect): Ditto.
832
833 2011-08-29  Jakub Jelinek  <jakub@redhat.com>
834
835         * gthr-posix.h (__gthread_active_p): Do not use preprocessor
836         conditionals and comments inside macro arguments.
837
838 2011-08-29  Artjoms Sinkarovs  <artyom.shinkaroff@gmail.com>
839             Richard Guenther  <rguenther@suse.de>
840
841         * tree.h (constant_boolean_node): Adjust prototype.
842         * fold-const.c (fold_convert_loc): Move aggregate conversion
843         leeway down.
844         (constant_boolean_node): Make value parameter boolean, add
845         vector type handling.
846         (fold_unary_loc): Use constant_boolean_node.
847         (fold_binary_loc): Preserve types properly when folding
848         COMPLEX_EXPR <__real x, __imag x>.
849         * gimplify.c (gimplify_expr): Handle vector comparison.
850         * tree.def (EQ_EXPR, ...): Document behavior on vector typed
851         comparison.
852         * tree-cfg.c (verify_gimple_comparison): Verify vector typed
853         comparisons.
854
855 2011-08-29  Jakub Jelinek  <jakub@redhat.com>
856
857         PR middle-end/48722
858         * emit-rtl.c (unshare_all_rtl_again): For CALL_INSNs,
859         reset_used_flags also in CALL_INSN_FUNCTION_USAGE.
860         (verify_rtl_sharing): Likewise and verify_rtx_sharing
861         in there too.
862         (unshare_all_rtl_in_chain): For CALL_INSNs
863         copy_rtx_if_shared also CALL_INSN_FUNCTION_USAGE.
864
865 2011-08-29  Richard Guenther  <rguenther@suse.de>
866
867         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Set a location
868         on the built ADDR_EXPR.
869
870 2011-08-29  Jakub Jelinek  <jakub@redhat.com>
871
872         PR debug/50215
873         * var-tracking.c (create_entry_value): Call cselib_lookup_from_insn
874         before adding ENTRY_VALUE to val->locs.
875
876 2011-08-28  Mikael Pettersson  <mikpe@it.uu.se>
877
878         PR bootstrap/50218
879         * tree-ssa-loop-ivopts.c (determine_use_iv_cost_condition): Initialize
880         comp.
881
882 2011-08-27  Bernd Schmidt  <bernds@codesourcery.com>
883
884         * doc/rtl.texi (simple_return): Document.
885         (parallel, PATTERN): Here too.
886         * doc/md.texi (return): Mention it's allowed to expand to simple_return
887         in some cases.
888         (simple_return): Document standard pattern.
889         * gengenrtl.c (special_rtx): SIMPLE_RETURN is special.
890         * final.c (final_scan_insn): Use ANY_RETURN_P on body.
891         * reorg.c (function_return_label, function_simple_return_label):
892         New static variables, replacing...
893         (end_of_function_label): ... this.
894         (simplejump_or_return_p): New static function.
895         (optimize_skip, steal_delay_list_from_fallthrough,
896         fill_slots_from_thread): Use it.
897         (relax_delay_slots): Likewise.  Use ANY_RETURN_P on body.
898         (rare_destination, follow_jumps): Use ANY_RETURN_P on body.
899         (find_end_label): Take a new arg which is one of the two return
900         rtxs.  Depending on which, set either function_return_label or
901         function_simple_return_label.  All callers changed.
902         (make_return_insns): Make both kinds.
903         (dbr_schedule): Adjust for two kinds of end labels.
904         * function.c (emit_return_into_block): Set JUMP_LABEL properly.
905         * genemit.c (gen_exp): Handle SIMPLE_RETURN.
906         (gen_expand, gen_split): Use ANY_RETURN_P.
907         * df-scan.c (df_uses_record): Handle SIMPLE_RETURN.
908         * rtl.def (SIMPLE_RETURN): New code.
909         * ifcvt.c (find_if_case_1): Be more careful about
910         redirecting jumps to the EXIT_BLOCK.
911         * jump.c (condjump_p, condjump_in_parallel_p, any_condjump_p,
912         returnjump_p_1): Handle SIMPLE_RETURNs.
913         * print-rtl.c (print_rtx): Likewise.
914         * rtl.c (copy_rtx): Likewise.
915         * bt-load.c (compute_defs_uses_and_gen): Use ANY_RETURN_P.
916         * combine.c (simplify_set): Likewise.
917         * resource.c (find_dead_or_set_registers, mark_set_resources):
918         Likewise.
919         * emit-rtl.c (verify_rtx_sharing, classify_insn, copy_insn_1,
920         copy_rtx_if_shared_1, mark_used_flags): Handle SIMPLE_RETURNs.
921         (init_emit_regs): Initialize simple_return_rtx.
922         * cfglayout.c (fixup_reorder_chain): Pass a JUMP_LABEL to
923         force_nonfallthru_and_redirect.
924         * rtl.h (ANY_RETURN_P): Allow SIMPLE_RETURN.
925         (GR_SIMPLE_RETURN): New enum value.
926         (simple_return_rtx): New macro.
927         * basic-block.h (force_nonfallthru_and_redirect): Adjust
928         declaration.
929         * cfgrtl.c (force_nonfallthru_and_redirect): Take a new jump_label
930         argument.  All callers changed.  Be careful about what kinds of
931         returnjumps to generate.
932         * config/i386/3i86.c (ix86_pad_returns, ix86_count_insn_bb,
933         ix86_pad_short_function): Likewise.
934         * config/arm/arm.c (arm_final_prescan_insn): Handle both kinds
935         of return.
936         * config/mips/mips.md (any_return): New code_iterator.
937         (optab): Add cases for return and simple_return.
938         (return): Expand to a simple_return.
939         (simple_return): New pattern.
940         (*<optab>, *<optab>_internal for any_return): New patterns.
941         (return_internal): Remove.
942         * config/mips/mips.c (mips_expand_epilogue): Make the last insn
943         a simple_return_internal.
944
945 2011-08-27  Uros Bizjak  <ubizjak@gmail.com>
946
947         * config/i386/sse.md (*absneg<mode>2): Fix split condition.
948         (vec_extract_lo_<mode>): Prevent both operands in memory.
949         (vec_extract_lo_v16hi): Ditto.
950         (*vec_extract_v4sf_mem): Add TARGET_SSE insn constraint.
951
952 2011-08-27  Uros Bizjak  <ubizjak@gmail.com>
953
954         * config/i386/sse.md (mulv16qi3): Attach REG_EQUAL note.
955         (*sse2_mulv4si3): Ditto.
956         (mulv2di3): Ditto.
957         * config/i386/i386.c (legitimize_tls_address): Change REG_EQIV
958         notes to REG_EQUAL.
959
960 2011-08-27  Uros Bizjak  <ubizjak@gmail.com>
961
962         PR target/50202
963         * config/i386/sse.md (sse4_2_pcmpestr): Emit NOTE_INSN_DELETED note
964         when all outputs are unused.
965         (sse4_2_pcmpistr): Ditto.
966
967 2011-08-26  Uros Bizjak  <ubizjak@gmail.com>
968
969         * config/i386/i386.md (round<mode>2): New expander.
970         * config/i386/i386.c (enum ix86_builtins): Add
971         IX86_BUILTIN_ROUND{PS,PD}_AZ{,256}.
972         (struct builtin_description): Add __builtin_ia32_round{ps,pd}_az{,256}
973         descriptions.
974         (ix86_builtin_vectorized_function): Handle BUILT_IN_ROUND{,F} builtins.
975         (ix86_build_const_vector): Rewrite using loop with RTVEC_ELT accessor.
976
977 2011-08-26  Uros Bizjak  <ubizjak@gmail.com>
978
979         PR middle-end/50083
980         * convert.c (convert_to_integer) <BUIT_IN_ROUND{,F,L}>: Convert
981         only when TARGET_C99_FUNCTIONS.
982         <BUILT_IN_NEARBYINT{,F,L}>: Ditto.
983         <BUILT_IN_RINT{,F,L}>: Ditto.
984
985 2011-08-26  Michael Matz  <matz@suse.de>
986             Jakub Jelinek  <jakub@redhat.com>
987
988         PR lto/50165
989         * lto-streamer-in.c (canon_file_name): Initialize new_slot->len;
990         don't call strlen twice, use memcpy.
991
992 2011-08-26  H.J. Lu  <hongjiu.lu@intel.com>
993
994         * config/i386/bmi2intrin.h: Allow in <immintrin.h>.
995         * config/i386/bmiintrin.h: Likewise.
996         * config/i386/lzcntintrin.h: Likewise.
997
998         * config/i386/immintrin.h: Include <lzcntintrin.h>,
999         <bmiintrin.h> and <bmi2intrin.h>.
1000
1001 2011-08-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1002
1003         PR target/50166
1004         * acinclude.m4 (gcc_AC_INITFINI_ARRAY): Check count in main.
1005         * configure: Regenerate.
1006
1007 2011-08-26  Jakub Jelinek  <jakub@redhat.com>
1008
1009         PR c/50179
1010         * c-typeck.c (c_process_expr_stmt): Skip over nops and
1011         call mark_exp_read even if exprv is ADDR_EXPR.
1012
1013 2011-08-26  Richard Sandiford  <richard.sandiford@linaro.org>
1014
1015         * df-problems.c (df_note_bb_compute): Pass uses rather than defs
1016         to df_set_dead_notes_for_mw.
1017
1018 2011-08-26  Richard Guenther  <rguenther@suse.de>
1019
1020         * varasm.c (decode_addr_const): Handle MEM_REF[&X, OFF].
1021
1022 2011-08-26  Zdenek Dvorak  <ook@ucw.cz>
1023             Tom de Vries  <tom@codesourcery.com>
1024
1025         * tree-ssa-loop-ivopts.c (struct cost_pair): Add comp field.
1026         (struct ivopts_data): Add loop_single_exit_p field.
1027         (niter_for_exit): Change parameter desc_p into return value.  Return
1028         desc if desc->may_be_zero.  Free desc if unused.
1029         (niter_for_single_dom_exit): Change return type.
1030         (find_induction_variables): Handle changed return type of
1031         niter_for_single_dom_exit.  Dump may_be_zero.
1032         (add_candidate_1): Keep original base and step type for IP_ORIGINAL.
1033         (set_use_iv_cost): Add and handle comp parameter.
1034         (determine_use_iv_cost_generic, determine_use_iv_cost_address): Add
1035         comp argument to set_use_iv_cost.
1036         (strip_wrap_conserving_type_conversions, expr_equal_p)
1037         (difference_cannot_overflow_p, iv_elimination_compare_lt): New function.
1038         (may_eliminate_iv): Add comp parameter.  Handle new return type of
1039         niter_for_exit.  Use loop_single_exit_p.  Use iv_elimination_compare_lt.
1040         (determine_use_iv_cost_condition): Add comp argument to set_use_iv_cost
1041         and may_eliminate_iv.
1042         (rewrite_use_compare): Move call to iv_elimination_compare to ...
1043         (may_eliminate_iv): Here.
1044         (tree_ssa_iv_optimize_loop): Initialize loop_single_exit_p.
1045
1046 2011-08-26  Tom de Vries  <tom@codesourcery.com>
1047
1048         * tree-pretty-print (dump_generic_node): Test for NULL_TREE before
1049         accessing TREE_TYPE.
1050
1051 2011-08-26  Jiangning Liu  <jiangning.liu@arm.com>
1052
1053         * config/arm/arm.md (*ior_scc_scc): Enable for Thumb2 as well.
1054         (*ior_scc_scc_cmp): Likewise
1055         (*and_scc_scc): Likewise.
1056         (*and_scc_scc_cmp): Likewise.
1057         (*and_scc_scc_nodom): Likewise.
1058         (*cmp_ite0, *cmp_ite1, *cmp_and, *cmp_ior): Handle Thumb2.
1059
1060 2011-08-26  Jakub Jelinek  <jakub@redhat.com>
1061
1062         * rtlanal.c (nonzero_bits1): Handle CLRSB.
1063
1064 2011-08-26  Richard Guenther  <rguenther@suse.de>
1065
1066         * expr.c (string_constant): Handle &MEM_REF.
1067
1068 2011-08-26  Andrew Stubbs  <ams@codesourcery.com>
1069
1070         * config/arm/arm.c (struct four_ints): New type.
1071         (count_insns_for_constant): Delete function.
1072         (find_best_start): Delete function.
1073         (optimal_immediate_sequence): New function.
1074         (optimal_immediate_sequence_1): New function.
1075         (arm_gen_constant): Move constant splitting code to
1076         optimal_immediate_sequence.
1077         Rewrite constant negation/invertion code.
1078
1079 2011-08-26  Andrew Stubbs  <ams@codesourcery.com>
1080
1081         * config/arm/arm-protos.h (const_ok_for_op): Add prototype.
1082         * config/arm/arm.c (const_ok_for_op): Add support for addw/subw.
1083         Remove prototype. Remove static function type.
1084         * config/arm/arm.md (*arm_addsi3): Add addw/subw support.
1085         Add arch attribute.
1086         * config/arm/constraints.md (Pj, PJ): New constraints.
1087
1088 2011-08-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
1089
1090         * config/arm/cortex-a9.md ("cortex_a9_mult_long"): New.
1091         ("cortex_a9_multiply_long"): New and use above.  Handle all
1092         long multiply cases.
1093         ("cortex_a9_multiply"): Handle smmul and smmulr.
1094         ("cortex_a9_mac"): Handle smmla.
1095
1096 2011-08-25  Richard Henderson  <rth@redhat.com>
1097
1098         PR 50132
1099         PR 49864
1100         * cfgcleanup.c (old_insns_match_p): Don't allow cross-jump for
1101         non-constant stack adjutment.
1102         * expr.c (find_args_size_adjust): Break out from ...
1103         (fixup_args_size_notes): ... here.
1104         * rtl.h (find_args_size_adjust): Declare.
1105
1106 2011-08-25  Uros Bizjak  <ubizjak@gmail.com>
1107
1108         * config/i386/i386.md (isa): Add sse2, sse2_noavx, sse3,
1109         sse4 and sse4_noavx.
1110         (enabled): Handle sse2, sse2_noavx, sse3, sse4 and sse4_noavx.
1111         (*pushdf_rex64): Change Y2 register constraint to x.
1112         (*movdf_internal_rex64): Ditto.
1113         (*zero_extendsidi2_rex64): Ditto.
1114         (*movdi_internal): Change Y2 register constraint to x
1115         and update "isa" attribute.
1116         (*pushdf): Ditto.
1117         (*movdf internal): Ditto.
1118         (zero_extendsidi2_1): Ditto.
1119         (*truncdfdf_mixed): Ditto.
1120         (*truncxfdf2_mixed): Ditto.
1121         * config/i386/mmx.md (*mov<mode>_internal_rex64): Change Y2
1122         register constraint to x.
1123         (*movv2sf_internal_rex64): Ditto.
1124         (*mov<mode>_internal): Change Y2 register constraint to x
1125         and add "isa" attribute.
1126         (*movv2sf_internal): Ditto.
1127         (*vec_extractv2si_1): Ditto.
1128         * config/i386/sse.md ("vec_set<mode>_0): Change Y2 and Y4 register
1129         constraints to x and update "isa" attribute.
1130         (*vec_interleave_highv2df): Change Y3 registerconstraint
1131         to x and update "isa" attribute.
1132         (*vec_interleave_lowv2df): Ditto.
1133         (*vec_concatv2df): Change Y2 register constraint to x and
1134         update "isa" attribute.
1135         (sse2_loadld): Ditto.
1136         (*vec_extractv2di_1): Ditto.
1137         (*vec_dupv4si): Ditto.
1138         (*vec_dupv2di): Ditto.
1139         (*vec_concatv4si): Ditto.
1140         (vec_concatv2di): Ditto.
1141         * config/i386/constraints.md (Y2): Remove.
1142         (Y3): Ditto.
1143         (Y4): Ditto.
1144
1145 2011-08-25  Bernd Schmidt  <bernds@codesourcery.com>
1146
1147         * regrename.c (scan_rtx_reg, scan_rtx_address, build_def_use,
1148         dump_def_use_chain): Don't declare.
1149         (mark_conflict, create_new_chain): Move before users.
1150         (regrename_optimize): Move to near end of file.
1151
1152 2011-08-25  Georg-Johann Lay  <avr@gjlay.de>
1153
1154         * config/avr-protos.h (byte_immediate_operand): Remove Prototype.
1155         (secondary_input_reload_class): Remove Prototype.
1156         * config/avr/avr.c (byte_immediate_operand): Remove Function.
1157         * config/avr/avr.md (setmemhi): Use u8_operand.
1158         (strlenhi): Use const0_rtx for comparison.
1159         * config/avr/avr.h (avr_reg_order): Remove Declaration.
1160
1161 2011-08-25  Georg-Johann Lay  <avr@gjlay.de>
1162
1163         * config/avr/avr.c (reg_class_tab): Make local to
1164         avr_regno_reg_class.  Return smallest register class available.
1165
1166 2011-08-25  Georg-Johann Lay  <avr@gjlay.de>
1167
1168         * config/avr/avr.c (STR_PREFIX_P): New Define.
1169         (avr_asm_declare_function_name): Use it.
1170         (avr_asm_named_section): Use it.
1171         (avr_section_type_flags): Use it.
1172
1173 2011-08-25  Bernd Schmidt  <bernds@codesourcery.com>
1174
1175         * doc/md.texi (automata_option): Document collapse-ndfa.
1176         * genautomata.c (COLLAPSE_OPTION): New macro.
1177         (collapse_flag): New static variable.
1178         (struct description): New member normal_decls_num.
1179         (struct automaton): New members advance_ainsn and collapse_ainsn.
1180         (gen_automata_option): Check for COLLAPSE_OPTION.
1181         (collapse_ndfa_insn_decl): New static variable.
1182         (add_collapse_ndfa_insn_decl, special_decl_p): New functions.
1183         (find_arc): If insn is the collapse-ndfa insn, accept any arc we find.
1184         (transform_insn_regexps): Call add_collapse_ndfa_insn_decl if
1185         necessary.  Use normal_decls_num rather than decls_num, remove
1186         test for special decls.
1187         (create_alt_states, form_ainsn_with_same_reservs): Use special_decl_p.
1188         (make_automaton); Likewise.  Use the new advance_cycle_insn member
1189         of struct automaton.
1190         (create_composed_state): Disallow advance-cycle arcs if collapse_flag
1191         is set.
1192         (NDFA_to_DFA): Don't create composed states for the collapse-ndfa
1193         transition.  Create the necessary transitions for it.
1194         (create_ainsns): Return void.  Take an automaton_t argument, and
1195         update its ainsn_list, advance_ainsn and collapse_ainsn members.  All
1196         callers changed.
1197         (COLLAPSE_NDFA_VALUE_NAME): New macro.
1198         (output_tables): Output code to define it.
1199         (output_internal_insn_code_evaluation): Output code to accept
1200         const0_rtx as collapse-ndfa transition.
1201         (output_default_latencies, output_print_reservation_func,
1202         output_print_description): Reorganize loops to use normal_decls_num
1203         as loop bound; remove special case for advance_cycle_insn_decl.
1204         (initiate_automaton_gen): Handle COLLAPSE_OPTION.
1205         (check_automata_insn_issues): Check for collapse_ainsn.
1206         (expand_automate): Allocate sufficient space.  Initialize
1207         normal_decls_num.
1208
1209 2011-08-25  Georg-Johann Lay  <avr@gjlay.de>
1210
1211         * config/avr/avr.md: Fix indentation from r177991.
1212
1213 2011-08-25  Bernd Schmidt  <bernds@codesourcery.com>
1214
1215         * regrename.c (struct du_head): Remove member terminated.
1216         (create_new_chain): Don't initialize it.
1217         (scan_rtx_reg): Don't set or test it, test the open_chains_set
1218         bitmap instead.
1219         (tick, this_tick): New global variables, moved out of
1220         regrename_optimize.
1221         (current_id, open_chains, closed_chains, open_chains_set,
1222         live_in_chains, live_hard_regs): Reorder declarations.
1223         (dump_def_use_chain): Move function earlier in the file.
1224         (rename_chains): New static function, broken out of
1225         regrename_optimize.
1226         (regrename_optimize): Use it.  Remove #if 0'ed code.
1227
1228 2011-08-25  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
1229
1230         * varasm.c: (default_binds_local_p_1): Commentary typo fix.
1231
1232 2011-08-24  H.J. Lu  <hongjiu.lu@intel.com>
1233
1234         PR target/50172
1235         * config/i386/i386.c (ix86_expand_builtin): Convert to Pmode if needed.
1236
1237 2011-08-24  Richard Guenther  <rguenther@suse.de>
1238
1239         * tree-data-ref.c (dr_analyze_indices): Avoid unsharing the
1240         ref in the basic-block case.  Move stripping array-refs
1241         to the place we create an access-function for it.  Remove
1242         bogus stripping down a MEM_REF to its base.
1243
1244 2011-08-24  Richard Guenther  <rguenther@suse.de>
1245
1246         * fold-const.c (fold_comparison): Fold &a < &a + 4 even
1247         with -fno-strict-overflow.
1248
1249 2011-08-24  Richard Guenther  <rguenther@suse.de>
1250
1251         * tree-vectorizer.c (vect_print_dump_info): Avoid the
1252         file and location clutter when dumping to dump files.
1253
1254 2011-08-24  Simon Baldwin  <simonb@google.com>
1255
1256         * gengtype-state.c (write_state): Remove timestamped header line.
1257
1258 2011-08-24  Joseph Myers  <joseph@codesourcery.com>
1259
1260         * Makefile.in (CFLAGS-collect2.o, CFLAGS-c-family/c-opts.o)
1261         (CFLAGS-c-family/c-pch.o, CFLAGS-prefix.o, CFLAGS-version.o)
1262         (CFLAGS-lto-compress.o, CFLAGS-toplev.o, CFLAGS-intl.o)
1263         (CFLAGS-cppbuiltin.o, CFLAGS-cppdefault.o): New.
1264         (collect2.o, c-family/c-cppbuiltin.o, c-family/c-opts.o)
1265         (c-family/c-pch.o, prefix.o, version.o, lto-compress.o, toplev.o)
1266         (intl.o, cppbuiltin.o, cppdefault.o): Remove explicit compilation
1267         rules.
1268         (lto-wrapper$(exeext)): Use $(LINKER) not $(COMPILER).
1269
1270 2011-08-24  Joseph Myers  <joseph@codesourcery.com>
1271
1272         * Makefile.in (ALL_CXXFLAGS): Include $(CFLAGS-$@).
1273
1274 2011-08-24  Richard Guenther  <rguenther@suse.de>
1275
1276         PR tree-optimization/50067
1277         * tree-data-ref.c (dr_analyze_indices): Do not add an access
1278         function for a MEM_REF base that has no evolution in the loop
1279         nest or that is not analyzable.
1280
1281 2011-08-23  Vladimir Makarov  <vmakarov@redhat.com>
1282
1283         * ira.c (ira_init_register_move_cost): Check small subclasses
1284         through ira_reg_class_max_nregs and ira_available_class_regs.
1285
1286 2011-08-23  Uros Bizjak  <ubizjak@gmail.com>
1287
1288         * config/i386/constraints.md (Yp): New register constraint.
1289         * config/i386/i386.md (*addhi_1): Merge with *addhi_1_lea using
1290         Yp register constraint.
1291         (*addqi_1): Merge with *addqi_1_lea using Yp register constraint.
1292         (*ashlhi3_1): Merge with *ashlhi3_1_lea using Yp register constraint.
1293         (*ashlqi3_1): Merge with *ashlqi3_1_lea using Yp register constraint.
1294
1295 2011-08-23  Kirill Yukhin  <kirill.yukhin@intel.com>
1296
1297         * config/i386/sse.md (<s>mul<mode>3_highpart): Update.
1298
1299 2011-08-23  Mark Heffernan  <meheff@google.com>
1300
1301         PR middle-end/38509
1302         * common.opt (Wfree-nonheap-object): New option.
1303         * doc/invoke.texi (Warning options): Document -Wfree-nonheap-object.
1304         * builtins.c (maybe_emit_free_warning): Add OPT_Wfree_nonheap_object
1305         to warning.
1306         (expand_builtin): Make warning conditional.
1307
1308 2011-08-23  Uros Bizjak  <ubizjak@gmail.com>
1309
1310         * config/i386/i386.md (type): Add imulx, ishiftx and rotatex.
1311         (length_immediate): Handle imulx, ishiftx and rotatex.
1312         (imm_disp): Ditto.
1313         (isa): Add bmi2.
1314         (enabled): Handle bmi2.
1315         (*mul<mode><dwi>3): Split from *<u>mul<mode><dwi>3.
1316         (*umul<mode><dwi>3): Ditto.  Add imulx BMI2 alternative.
1317         (*bmi2_umulditi3_1): New insn pattern.
1318         (*bmi2_umulsidi3_1): Ditto.
1319         (*umul<mode><dwi>3 splitter): New splitter to avoid flags dependency.
1320         (*bmi2_ashl<mode>3_1): New insn pattern.
1321         (*ashl<mode>3_1): Add ishiftx BMI2 alternative.
1322         (*ashl<mode>3_1 splitter): New splitter to avoid flags dependency.
1323         (*bmi2_ashlsi3_1_zext): New insn pattern.
1324         (*ashlsi3_1_zext): Add ishiftx BMI2 alternative.
1325         (*ashlsi3_1_zext splitter): New splitter to avoid flags dependency.
1326         (*bmi2_<shiftrt_insn><mode>3_1): New insn pattern.
1327         (*<shiftrt_insn><mode>3_1): Add ishiftx BMI2 alternative.
1328         (*<shiftrt_insn><mode>3_1 splitter): New splitter to avoid
1329         flags dependency.
1330         (*bmi2_<shiftrt_insn>si3_1_zext): New insn pattern.
1331         (*<shiftrt_insn>si3_1_zext): Add ishiftx BMI2 alternative.
1332         (*<shiftrt_insn>si3_1_zext splitter): New splitter to avoid
1333         flags dependency.
1334         (*bmi2_rorx<mode>3_1): New insn pattern.
1335         (*<rotate_insn><mode>3_1): Add rotatex BMI2 alternative.
1336         (*rotate<mode>3_1 splitter): New splitter to avoid flags dependency.
1337         (*rotatert<mode>3_1 splitter): Ditto.
1338         (*bmi2_rorxsi3_1_zext): New insn pattern.
1339         (*<rotate_insn>si3_1_zext): Add rotatex BMI2 alternative.
1340         (*rotatesi3_1_zext splitter): New splitter to avoid flags dependency.
1341         (*rotatertsi3_1_zext splitter): Ditto.
1342
1343 2011-08-23  Kirill Yukhin  <kirill.yukhin@intel.com>
1344
1345         * common/config/i386/i386-common.c (OPTION_MASK_ISA_BMI2_SET): New.
1346         (OPTION_MASK_ISA_BMI2_UNSET): Likewise.
1347         (ix86_handle_option): Handle OPT_mbmi2 case.
1348         * config.gcc (i[34567]86-*-*): Add bmi2intrin.h.
1349         (x86_64-*-*): Likewise.
1350         * config/i386/bmi2intrin.h: New file.
1351         * config/i386/cpuid.h (bit_BMI2): New.
1352         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
1353         BMI2 feature.
1354         * config/i386/i386-c.c (ix86_target_macros_internal):
1355         Conditionally define __BMI2__.
1356         * config/i386/i386.c (ix86_option_override_internal): Define PTA_BMI2.
1357         Handle BMI2 option.
1358         (ix86_valid_target_attribute_inner_p): Handle BMI2 option.
1359         (print_reg): New code.
1360         (ix86_print_operand): Likewise.
1361         (ix86_builtins): Add IX86_BUILTIN_BZHI32, IX86_BUILTIN_BZHI64,
1362         IX86_BUILTIN_PDEP32, IX86_BUILTIN_PDEP64, IX86_BUILTIN_PEXT32,
1363         IX86_BUILTIN_PEXT64.
1364         (bdesc_args): Add IX86_BUILTIN_BZHI32, IX86_BUILTIN_BZHI64,
1365         IX86_BUILTIN_PDEP32, IX86_BUILTIN_PDEP64, IX86_BUILTIN_PEXT32,
1366         IX86_BUILTIN_PEXT64.
1367         * config/i386/i386.h (TARGET_BMI2): New.
1368         * config/i386/i386.md (UNSPEC_PDEP): New.
1369         (UNSPEC_PEXT): Likewise.
1370         (*bmi2_bzhi_<mode>3): Likewise.
1371         (*bmi2_pdep_<mode>3): Likewise.
1372         (*bmi2_pext_<mode>3): Likewise.
1373         * config/i386/i386.opt (mbmi2): New.
1374         * config/i386/x86intrin.h: Include bmi2intrin.h when __BMI2__
1375         is defined.
1376         * doc/extend.texi: Document BMI2 built-in functions.
1377         * doc/invoke.texi: Document -mbmi2.
1378
1379 2011-08-23  Jakub Jelinek  <jakub@redhat.com>
1380
1381         PR middle-end/50161
1382         * simplify-rtx.c (simplify_const_unary_operation): If
1383         op is CONST_INT, don't look at op_mode, but use instead mode.
1384         * optabs.c (add_equal_note): For FFS, CLZ, CTZ,
1385         CLRSB, POPCOUNT, PARITY and BSWAP use operand mode for
1386         operation and TRUNCATE/ZERO_EXTEND if needed.
1387         * doc/rtl.texi (ffs, clrsb, clz, ctz, popcount, parity, bswap):
1388         Document that operand mode must be same as operation mode,
1389         or VOIDmode.
1390         * config/avr/avr.md (paritysi2, *parityqihi2.libgcc,
1391         *paritysihi2.libgcc, popcountsi2, *popcountsi2.libgcc,
1392         *popcountqihi2.libgcc, clzsi2, *clzsihi2.libgcc, ctzsi2,
1393         *ctzsihi2.libgcc, ffssi2, *ffssihi2.libgcc): For unary ops
1394         use the mode of operand for the operation and add truncate
1395         or zero_extend around if needed.
1396         * config/c6x/c6x.md (ctzdi2): Likewise.
1397         * config/bfin/bfin.md (clrsbsi2, signbitssi2): Likewise.
1398
1399 2011-08-12  Michael Matz  <matz@suse.de>
1400
1401         * cfgexpand.c (expand_one_register_var): Use get_pointer_alignment.
1402         (gimple_expand_cfg): Merge alignment info for coalesced pointer
1403         SSA names.
1404
1405 2011-08-23  Richard Guenther  <rguenther@suse.de>
1406
1407         * Makefile.in (tree-data-ref.o): Add tree-affine.h dependency.
1408         * tree-affine.h (aff_comb_cannot_overlap_p): Declare.
1409         * tree-affine.c (aff_comb_cannot_overlap_p): New function, moved
1410         from ...
1411         * tree-ssa-loop-im.c (cannot_overlap_p): ... here.
1412         (mem_refs_may_alias_p): Adjust.
1413         * tree-data-ref.h (dr_may_alias_p): Adjust.
1414         * tree-data-ref.c: Include tree-affine.h.
1415         (dr_analyze_indices): Do nothing for the non-loop case.
1416         (dr_may_alias_p): Distinguish loop and non-loop case.  Disambiguate
1417         more cases in the non-loop case.
1418         * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Adjust
1419         calls to dr_may_alias_p.
1420         (write_alias_graph_to_ascii_ecc): Likewise.
1421         (write_alias_graph_to_ascii_dot): Likewise.
1422         (build_alias_set_optimal_p): Likewise.
1423
1424 2011-08-23  Richard Guenther  <rguenther@suse.de>
1425
1426         PR tree-optimization/50162
1427         * tree-vect-stmts.c (vectorizable_call): Fix argument lookup.
1428
1429 2011-08-23  Richard Guenther  <rguenther@suse.de>
1430
1431         * tree-data-ref.c (dr_analyze_indices): Add comments, handle
1432         REALPART_EXPR and IMAGPART_EXPR similar to ARRAY_REFs.
1433         (create_data_ref): Also dump access functions for the created data-ref.
1434
1435 2011-08-22  Uros Bizjak  <ubizjak@gmail.com>
1436             Kirill Yukhin  <kirill.yukhin@intel.com>
1437
1438         PR target/50155
1439         * config/i386/sse.md (VI_AVX2): New.
1440         (<plusminus_insn><mode>3): Use VI_AVX2 mode iterator.
1441         (*<plusminus_insn><mode>3): Ditto.
1442         (<sse2_avx2>_andnot<mode>3): Ditto.
1443         (*andnot<mode>3): Fix order of cond operands.
1444         Add asserts for correct TARGET_xxx.
1445         (*<any_logic:code><mode>3): Ditto.
1446
1447 2011-08-22  Anatoly Sokolov  <aesok@post.ru>
1448
1449         * config/m32c/m32c.h (CLASS_MAX_NREGS): Remove macro.
1450         * config/m32c/m32c-protos.h (m32c_class_max_nregs): Remove.
1451         * config/m32c/m32c.c (m32c_class_max_nregs): Make static. Change
1452         regclass argument type to reg_class_t. Change 'max' and 'v' vars
1453         and return types to unsigned char. Use reg_class_contents instead
1454         of class_contents.
1455         (TARGET_CLASS_MAX_NREGS): Define.
1456
1457 2011-08-22  Bernd Schmidt  <bernds@codesourcery.com>
1458
1459         * config/c6x/c6x.md (indirect_jump_shadow): Tweak representation
1460         to make computed_jump_p return true.
1461
1462 2011-08-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1463
1464         * configure.ac (GCC_PICFLAG_FOR_TARGET): Call it.
1465         (PICFLAG_FOR_TARGET): Substitute.
1466         * aclocal.m4: Regenerate.
1467         * configure: Regenerate.
1468
1469 2011-08-22  Dodji Seketeli  <dodji@redhat.com>
1470
1471         * c-family/c-pch.c (c_common_read_pch): Re-set line table right
1472         after reading in the pch.
1473
1474 2011-08-22  H.J. Lu  <hongjiu.lu@intel.com>
1475
1476         * acinclude.m4 (gcc_AC_INITFINI_ARRAY): Error if __ELF__ isn't defined.
1477         * configure: Regenerated.
1478
1479 2011-08-22  Jakub Jelinek  <jakub@redhat.com>
1480
1481         PR tree-optimization/50133
1482         * tree-vect-stmts.c (vect_finish_stmt_generation): Copy location
1483         from stmt instead of some statement around gsi.
1484
1485         PR middle-end/50141
1486         * expr.c (get_bit_range): Only use DECL_THREAD_LOCAL_P if
1487         innerdecl is a VAR_DECL.
1488
1489 2011-08-22  Kirill Yukhin  <kirill.yukhin@intel.com>
1490
1491         * config/i386/avx2intrin.h: New file.
1492         * config/i386/i386-builtin-types.def (PCINT, PCINT64, PV4SI,
1493         PV8SI, V32QI_FTYPE_V32QI, V32QI_FTYPE_V16QI, V16HI_FTYPE_V16HI,
1494         V16HI_FTYPE_V8HI, V8SI_FTYPE_V8SI, V16HI_FTYPE_V16QI,
1495         V8SI_FTYPE_V16QI, V4DI_FTYPE_V16QI, V8SI_FTYPE_V8HI,
1496         V4DI_FTYPE_V8HI, V4DI_FTYPE_V4SI, V4DI_FTYPE_PV4DI,
1497         V4DI_FTYPE_V2DI, V2DI_FTYPE_PCV2DI_V2DI, V4SI_FTYPE_PCV4SI_V4SI,
1498         V32QI_FTYPE_V16HI_V16HI, V16HI_FTYPE_V8SI_V8SI,
1499         V32QI_FTYPE_V32QI_V32QI, V16HI_FTYPE_V32QI_V32QI,
1500         V16HI_FTYPE_V16HI_V8HI, V16HI_FTYPE_V16HI_V16HI,
1501         V16HI_FTYPE_V16HI_INT, V16HI_FTYPE_V16HI_SI,
1502         V16HI_FTYPE_V16HI_V16HI_INT, V32QI_FTYPE_V32QI_V32QI_INT,
1503         V8SI_FTYPE_V8SI_V4SI, V8SI_FTYPE_V8SI_V8SI,
1504         V8SI_FTYPE_V16HI_V16HI, V8SI_FTYPE_V8SI_INT, V8SI_FTYPE_V8SI_SI,
1505         V8SI_FTYPE_PCV8SI_V8SI, V4DI_FTYPE_V4DI_V4DI,
1506         V4DI_FTYPE_V8SI_V8SI, V4DI_FTYPE_V4DI_V2DI,
1507         V4DI_FTYPE_PCV4DI_V4DI, V4DI_FTYPE_V4DI_INT,
1508         V2DI_FTYPE_V4DI_INT, V4DI_FTYPE_V4DI_V4DI_INT,
1509         V4DI_FTYPE_V4DI_V2DI_INT, VOID_FTYPE_PV2DI_V2DI_V2DI,
1510         VOID_FTYPE_PV4DI_V4DI_V4DI, VOID_FTYPE_PV4SI_V4SI_V4SI,
1511         VOID_FTYPE_PV8SI_V8SI_V8SI,
1512         V2DF_FTYPE_V2DF_PCDOUBLE_V4SI_V2DF_INT,
1513         V4DF_FTYPE_V4DF_PCDOUBLE_V4SI_V4DF_INT,
1514         V2DF_FTYPE_V2DF_PCDOUBLE_V2DI_V2DF_INT,
1515         V4DF_FTYPE_V4DF_PCDOUBLE_V4DI_V4DF_INT,
1516         V4SF_FTYPE_V4SF_PCFLOAT_V4SI_V4SF_INT,
1517         V8SF_FTYPE_V8SF_PCFLOAT_V8SI_V8SF_INT,
1518         V4SF_FTYPE_V4SF_PCFLOAT_V2DI_V4SF_INT,
1519         V4SF_FTYPE_V4SF_PCFLOAT_V4DI_V4SF_INT,
1520         V2DI_FTYPE_V2DI_PCINT64_V4SI_V2DI_INT,
1521         V4DI_FTYPE_V4DI_PCINT64_V4SI_V4DI_INT,
1522         V2DI_FTYPE_V2DI_PCINT64_V2DI_V2DI_INT,
1523         V4DI_FTYPE_V4DI_PCINT64_V4DI_V4DI_INT,
1524         V4SI_FTYPE_V4SI_PCINT_V4SI_V4SI_INT,
1525         V8SI_FTYPE_V8SI_PCINT_V8SI_V8SI_INT,
1526         V4SI_FTYPE_V4SI_PCINT_V2DI_V4SI_INT,
1527         V4SI_FTYPE_V4SI_PCINT_V4DI_V4SI_INT,
1528         V16HI_FTYPE_V16HI_SI_COUNT, V16HI_FTYPE_V16HI_V8HI_COUNT,
1529         V8SI_FTYPE_V8SI_SI_COUNT, V8SI_FTYPE_V8SI_V4SI_COUNT,
1530         V4DI_FTYPE_V4DI_INT_COUNT, V4DI_FTYPE_V4DI_V2DI_COUNT,
1531         V4DI_FTYPE_V4DI_INT_CONVERT,
1532         V4DI_FTYPE_V4DI_V4DI_INT_CONVERT): New.
1533         * config/i386/i386.c (ix86_builtins): Add IX86_BUILTIN_MPSADBW256,
1534         IX86_BUILTIN_PABSB256, IX86_BUILTIN_PABSW256,
1535         IX86_BUILTIN_PABSD256, IX86_BUILTIN_PACKSSDW256,
1536         IX86_BUILTIN_PACKSSWB256, IX86_BUILTIN_PACKUSDW256,
1537         IX86_BUILTIN_PACKUSWB256, IX86_BUILTIN_PADDB256,
1538         IX86_BUILTIN_PADDW256, IX86_BUILTIN_PADDD256,
1539         IX86_BUILTIN_PADDQ256, IX86_BUILTIN_PADDSB256,
1540         IX86_BUILTIN_PADDSW256, IX86_BUILTIN_PADDUSB256,
1541         IX86_BUILTIN_PADDUSW256, IX86_BUILTIN_PALIGNR256,
1542         IX86_BUILTIN_AND256I, IX86_BUILTIN_ANDNOT256I,
1543         IX86_BUILTIN_PAVGB256, IX86_BUILTIN_PAVGW256,
1544         IX86_BUILTIN_PBLENDVB256, IX86_BUILTIN_PBLENDVW256,
1545         IX86_BUILTIN_PCMPEQB256, IX86_BUILTIN_PCMPEQW256,
1546         IX86_BUILTIN_PCMPEQD256, IX86_BUILTIN_PCMPEQQ256,
1547         IX86_BUILTIN_PCMPGTB256, IX86_BUILTIN_PCMPGTW256,
1548         IX86_BUILTIN_PCMPGTD256, IX86_BUILTIN_PCMPGTQ256,
1549         IX86_BUILTIN_PHADDW256, IX86_BUILTIN_PHADDD256,
1550         IX86_BUILTIN_PHADDSW256, IX86_BUILTIN_PHSUBW256,
1551         IX86_BUILTIN_PHSUBD256, IX86_BUILTIN_PHSUBSW256,
1552         IX86_BUILTIN_PMADDUBSW256, IX86_BUILTIN_PMADDWD256,
1553         IX86_BUILTIN_PMAXSB256, IX86_BUILTIN_PMAXSW256,
1554         IX86_BUILTIN_PMAXSD256, IX86_BUILTIN_PMAXUB256,
1555         IX86_BUILTIN_PMAXUW256, IX86_BUILTIN_PMAXUD256,
1556         IX86_BUILTIN_PMINSB256, IX86_BUILTIN_PMINSW256,
1557         IX86_BUILTIN_PMINSD256, IX86_BUILTIN_PMINUB256,
1558         IX86_BUILTIN_PMINUW256, IX86_BUILTIN_PMINUD256,
1559         IX86_BUILTIN_PMOVMSKB256, IX86_BUILTIN_PMOVSXBW256,
1560         IX86_BUILTIN_PMOVSXBD256, IX86_BUILTIN_PMOVSXBQ256,
1561         IX86_BUILTIN_PMOVSXWD256, IX86_BUILTIN_PMOVSXWQ256,
1562         IX86_BUILTIN_PMOVSXDQ256, IX86_BUILTIN_PMOVZXBW256,
1563         IX86_BUILTIN_PMOVZXBD256, IX86_BUILTIN_PMOVZXBQ256,
1564         IX86_BUILTIN_PMOVZXWD256, IX86_BUILTIN_PMOVZXWQ256,
1565         IX86_BUILTIN_PMOVZXDQ256, IX86_BUILTIN_PMULDQ256,
1566         IX86_BUILTIN_PMULHRSW256, IX86_BUILTIN_PMULHUW256,
1567         IX86_BUILTIN_PMULHW256, IX86_BUILTIN_PMULLW256,
1568         IX86_BUILTIN_PMULLD256, IX86_BUILTIN_PMULUDQ256,
1569         IX86_BUILTIN_POR256, IX86_BUILTIN_PSADBW256,
1570         IX86_BUILTIN_PSHUFB256, IX86_BUILTIN_PSHUFD256,
1571         IX86_BUILTIN_PSHUFHW256, IX86_BUILTIN_PSHUFLW256,
1572         IX86_BUILTIN_PSIGNB256, IX86_BUILTIN_PSIGNW256,
1573         IX86_BUILTIN_PSIGND256, IX86_BUILTIN_PSLLDQI256,
1574         IX86_BUILTIN_PSLLWI256, IX86_BUILTIN_PSLLW256,
1575         IX86_BUILTIN_PSLLDI256, IX86_BUILTIN_PSLLD256,
1576         IX86_BUILTIN_PSLLQI256, IX86_BUILTIN_PSLLQ256,
1577         IX86_BUILTIN_PSRAWI256, IX86_BUILTIN_PSRAW256,
1578         IX86_BUILTIN_PSRADI256, IX86_BUILTIN_PSRAD256,
1579         IX86_BUILTIN_PSRLDQI256, IX86_BUILTIN_PSRLWI256,
1580         IX86_BUILTIN_PSRLW256, IX86_BUILTIN_PSRLDI256,
1581         IX86_BUILTIN_PSRLD256, IX86_BUILTIN_PSRLQI256,
1582         IX86_BUILTIN_PSRLQ256, IX86_BUILTIN_PSUBB256,
1583         IX86_BUILTIN_PSUBW256, IX86_BUILTIN_PSUBD256,
1584         IX86_BUILTIN_PSUBQ256, IX86_BUILTIN_PSUBSB256,
1585         IX86_BUILTIN_PSUBSW256, IX86_BUILTIN_PSUBUSB256,
1586         IX86_BUILTIN_PSUBUSW256, IX86_BUILTIN_PUNPCKHBW256,
1587         IX86_BUILTIN_PUNPCKHWD256, IX86_BUILTIN_PUNPCKHDQ256,
1588         IX86_BUILTIN_PUNPCKHQDQ256, IX86_BUILTIN_PUNPCKLBW256,
1589         IX86_BUILTIN_PUNPCKLWD256, IX86_BUILTIN_PUNPCKLDQ256,
1590         IX86_BUILTIN_PUNPCKLQDQ256, IX86_BUILTIN_PXOR256,
1591         IX86_BUILTIN_MOVNTDQA256, IX86_BUILTIN_VBROADCASTSS_PS,
1592         IX86_BUILTIN_VBROADCASTSS_PS256,
1593         IX86_BUILTIN_VBROADCASTSD_PD256,
1594         IX86_BUILTIN_VBROADCASTSI256, IX86_BUILTIN_PBLENDD256,
1595         IX86_BUILTIN_PBLENDD128, IX86_BUILTIN_PBROADCASTB256,
1596         IX86_BUILTIN_PBROADCASTW256, IX86_BUILTIN_PBROADCASTD256,
1597         IX86_BUILTIN_PBROADCASTQ256, IX86_BUILTIN_PBROADCASTB128,
1598         IX86_BUILTIN_PBROADCASTW128, IX86_BUILTIN_PBROADCASTD128,
1599         IX86_BUILTIN_PBROADCASTQ128, IX86_BUILTIN_VPERMVARSI256,
1600         IX86_BUILTIN_VPERMDF256, IX86_BUILTIN_VPERMVARSF256,
1601         IX86_BUILTIN_VPERMDI256, IX86_BUILTIN_VPERMTI256,
1602         IX86_BUILTIN_VEXTRACT128I256, IX86_BUILTIN_VINSERT128I256,
1603         IX86_BUILTIN_MASKLOADD, IX86_BUILTIN_MASKLOADQ,
1604         IX86_BUILTIN_MASKLOADD256, IX86_BUILTIN_MASKLOADQ256,
1605         IX86_BUILTIN_MASKSTORED, IX86_BUILTIN_MASKSTOREQ,
1606         IX86_BUILTIN_MASKSTORED256, IX86_BUILTIN_MASKSTOREQ256,
1607         IX86_BUILTIN_PSLLVV4DI, IX86_BUILTIN_PSLLVV2DI,
1608         IX86_BUILTIN_PSLLVV8SI, IX86_BUILTIN_PSLLVV4SI,
1609         IX86_BUILTIN_PSRAVV8SI, IX86_BUILTIN_PSRAVV4SI,
1610         IX86_BUILTIN_PSRLVV4DI, IX86_BUILTIN_PSRLVV2DI,
1611         IX86_BUILTIN_PSRLVV8SI, IX86_BUILTIN_PSRLVV4SI,
1612         IX86_BUILTIN_GATHERSIV2DF, IX86_BUILTIN_GATHERSIV4DF,
1613         IX86_BUILTIN_GATHERDIV2DF, IX86_BUILTIN_GATHERDIV4DF,
1614         IX86_BUILTIN_GATHERSIV4SF, IX86_BUILTIN_GATHERSIV8SF,
1615         IX86_BUILTIN_GATHERDIV4SF, IX86_BUILTIN_GATHERDIV8SF,
1616         IX86_BUILTIN_GATHERSIV2DI, IX86_BUILTIN_GATHERSIV4DI,
1617         IX86_BUILTIN_GATHERDIV2DI, IX86_BUILTIN_GATHERDIV4DI,
1618         IX86_BUILTIN_GATHERSIV4SI, IX86_BUILTIN_GATHERSIV8SI,
1619         IX86_BUILTIN_GATHERDIV4SI, IX86_BUILTIN_GATHERDIV8SI.
1620         (bdesc_special_args): Add IX86_BUILTIN_MOVNTDQA256,
1621         IX86_BUILTIN_MASKLOADD, IX86_BUILTIN_MASKLOADQ,
1622         IX86_BUILTIN_MASKLOADD256, IX86_BUILTIN_MASKLOADQ256,
1623         IX86_BUILTIN_MASKSTORED, IX86_BUILTIN_MASKSTOREQ,
1624         IX86_BUILTIN_MASKSTORED256, IX86_BUILTIN_MASKSTOREQ256.
1625         (bdesc_args): Add  IX86_BUILTIN_MPSADBW256,
1626         IX86_BUILTIN_PABSB256, IX86_BUILTIN_PABSW256,
1627         IX86_BUILTIN_PABSD256, IX86_BUILTIN_PACKSSDW256,
1628         IX86_BUILTIN_PACKSSWB256, IX86_BUILTIN_PACKUSDW256,
1629         IX86_BUILTIN_PACKUSWB256, IX86_BUILTIN_PADDB256,
1630         IX86_BUILTIN_PADDW256, IX86_BUILTIN_PADDD256,
1631         IX86_BUILTIN_PADDQ256, IX86_BUILTIN_PADDSB256,
1632         IX86_BUILTIN_PADDSW256, IX86_BUILTIN_PADDUSB256,
1633         IX86_BUILTIN_PADDUSW256, IX86_BUILTIN_PALIGNR256,
1634         IX86_BUILTIN_AND256I, IX86_BUILTIN_ANDNOT256I,
1635         IX86_BUILTIN_PAVGB256, IX86_BUILTIN_PAVGW256,
1636         IX86_BUILTIN_PBLENDVB256, IX86_BUILTIN_PBLENDVW256,
1637         IX86_BUILTIN_PCMPEQB256, IX86_BUILTIN_PCMPEQW256,
1638         IX86_BUILTIN_PCMPEQD256, IX86_BUILTIN_PCMPEQQ256,
1639         IX86_BUILTIN_PCMPGTB256, IX86_BUILTIN_PCMPGTW256,
1640         IX86_BUILTIN_PCMPGTD256, IX86_BUILTIN_PCMPGTQ256,
1641         IX86_BUILTIN_PHADDW256, IX86_BUILTIN_PHADDD256,
1642         IX86_BUILTIN_PHADDSW256, IX86_BUILTIN_PHSUBW256,
1643         IX86_BUILTIN_PHSUBD256, IX86_BUILTIN_PHSUBSW256,
1644         IX86_BUILTIN_PMADDUBSW256, IX86_BUILTIN_PMADDWD256,
1645         IX86_BUILTIN_PMAXSB256, IX86_BUILTIN_PMAXSW256,
1646         IX86_BUILTIN_PMAXSD256, IX86_BUILTIN_PMAXUB256,
1647         IX86_BUILTIN_PMAXUW256, IX86_BUILTIN_PMAXUD256,
1648         IX86_BUILTIN_PMINSB256, IX86_BUILTIN_PMINSW256,
1649         IX86_BUILTIN_PMINSD256, IX86_BUILTIN_PMINUB256,
1650         IX86_BUILTIN_PMINUW256, IX86_BUILTIN_PMINUD256,
1651         IX86_BUILTIN_PMOVMSKB256, IX86_BUILTIN_PMOVSXBW256,
1652         IX86_BUILTIN_PMOVSXBD256, IX86_BUILTIN_PMOVSXBQ256,
1653         IX86_BUILTIN_PMOVSXWD256, IX86_BUILTIN_PMOVSXWQ256,
1654         IX86_BUILTIN_PMOVSXDQ256, IX86_BUILTIN_PMOVZXBW256,
1655         IX86_BUILTIN_PMOVZXBD256, IX86_BUILTIN_PMOVZXBQ256,
1656         IX86_BUILTIN_PMOVZXWD256, IX86_BUILTIN_PMOVZXWQ256,
1657         IX86_BUILTIN_PMOVZXDQ256, IX86_BUILTIN_PMULDQ256,
1658         IX86_BUILTIN_PMULHRSW256, IX86_BUILTIN_PMULHUW256,
1659         IX86_BUILTIN_PMULHW256, IX86_BUILTIN_PMULLW256,
1660         IX86_BUILTIN_PMULLD256, IX86_BUILTIN_PMULUDQ256,
1661         IX86_BUILTIN_POR256, IX86_BUILTIN_PSADBW256,
1662         IX86_BUILTIN_PSHUFB256, IX86_BUILTIN_PSHUFD256,
1663         IX86_BUILTIN_PSHUFHW256, IX86_BUILTIN_PSHUFLW256,
1664         IX86_BUILTIN_PSIGNB256, IX86_BUILTIN_PSIGNW256,
1665         IX86_BUILTIN_PSIGND256, IX86_BUILTIN_PSLLDQI256,
1666         IX86_BUILTIN_PSLLWI256, IX86_BUILTIN_PSLLW256,
1667         IX86_BUILTIN_PSLLDI256, IX86_BUILTIN_PSLLD256,
1668         IX86_BUILTIN_PSLLQI256, IX86_BUILTIN_PSLLQ256,
1669         IX86_BUILTIN_PSRAWI256, IX86_BUILTIN_PSRAW256,
1670         IX86_BUILTIN_PSRADI256, IX86_BUILTIN_PSRAD256,
1671         IX86_BUILTIN_PSRLDQI256, IX86_BUILTIN_PSRLWI256,
1672         IX86_BUILTIN_PSRLW256, IX86_BUILTIN_PSRLDI256,
1673         IX86_BUILTIN_PSRLD256, IX86_BUILTIN_PSRLQI256,
1674         IX86_BUILTIN_PSRLQ256, IX86_BUILTIN_PSUBB256,
1675         IX86_BUILTIN_PSUBW256, IX86_BUILTIN_PSUBD256,
1676         IX86_BUILTIN_PSUBQ256, IX86_BUILTIN_PSUBSB256,
1677         IX86_BUILTIN_PSUBSW256, IX86_BUILTIN_PSUBUSB256,
1678         IX86_BUILTIN_PSUBUSW256, IX86_BUILTIN_PUNPCKHBW256,
1679         IX86_BUILTIN_PUNPCKHWD256, IX86_BUILTIN_PUNPCKHDQ256,
1680         IX86_BUILTIN_PUNPCKHQDQ256, IX86_BUILTIN_PUNPCKLBW256,
1681         IX86_BUILTIN_PUNPCKLWD256, IX86_BUILTIN_PUNPCKLDQ256,
1682         IX86_BUILTIN_PUNPCKLQDQ256, IX86_BUILTIN_PXOR256,
1683         IX86_BUILTIN_VBROADCASTSS_PS, IX86_BUILTIN_VBROADCASTSS_PS256,
1684         IX86_BUILTIN_VBROADCASTSD_PD256,
1685         IX86_BUILTIN_VBROADCASTSI256, IX86_BUILTIN_PBLENDD256,
1686         IX86_BUILTIN_PBLENDD128, IX86_BUILTIN_PBROADCASTB256,
1687         IX86_BUILTIN_PBROADCASTW256, IX86_BUILTIN_PBROADCASTD256,
1688         IX86_BUILTIN_PBROADCASTQ256, IX86_BUILTIN_PBROADCASTB128,
1689         IX86_BUILTIN_PBROADCASTW128, IX86_BUILTIN_PBROADCASTD128,
1690         IX86_BUILTIN_PBROADCASTQ128, IX86_BUILTIN_VPERMVARSI256,
1691         IX86_BUILTIN_VPERMDF256, IX86_BUILTIN_VPERMVARSF256,
1692         IX86_BUILTIN_VPERMDI256, IX86_BUILTIN_VPERMTI256,
1693         IX86_BUILTIN_VEXTRACT128I256, IX86_BUILTIN_VINSERT128I256,
1694         IX86_BUILTIN_PSLLVV4DI, IX86_BUILTIN_PSLLVV2DI,
1695         IX86_BUILTIN_PSLLVV8SI, IX86_BUILTIN_PSLLVV4SI,
1696         IX86_BUILTIN_PSRAVV8SI, IX86_BUILTIN_PSRAVV4SI,
1697         IX86_BUILTIN_PSRLVV4DI, IX86_BUILTIN_PSRLVV2DI,
1698         IX86_BUILTIN_PSRLVV8SI, IX86_BUILTIN_PSRLVV4SI.
1699         (ix86_init_mmx_sse_builtins): Add IX86_BUILTIN_GATHERSIV2DF,
1700         IX86_BUILTIN_GATHERSIV4DF, IX86_BUILTIN_GATHERDIV2DF,
1701         IX86_BUILTIN_GATHERDIV4DF, IX86_BUILTIN_GATHERSIV4SF,
1702         IX86_BUILTIN_GATHERSIV8SF, IX86_BUILTIN_GATHERDIV4SF,
1703         IX86_BUILTIN_GATHERDIV8SF, IX86_BUILTIN_GATHERSIV2DI,
1704         IX86_BUILTIN_GATHERSIV4DI, IX86_BUILTIN_GATHERDIV2DI,
1705         IX86_BUILTIN_GATHERDIV4DI, IX86_BUILTIN_GATHERSIV4SI,
1706         IX86_BUILTIN_GATHERSIV8SI, IX86_BUILTIN_GATHERDIV4SI,
1707         IX86_BUILTIN_GATHERDIV8SI.
1708         (ix86_preferred_simd_mode): Support AVX2 modes.
1709         (ix86_expand_args_builtin): Support AVX2 builtins.
1710         (ix86_expand_special_args_builtin): Likewise.
1711         (ix86_expand_builtin): Likewise.
1712         * config/i386/i386.md (UNSPEC_VPERMSI): New.
1713         (UNSPEC_VPERMDF): Likewise.
1714         (UNSPEC_VPERMSF): Likewise.
1715         (UNSPEC_VPERMDI): Likewise.
1716         (UNSPEC_VPERMTI): Likewise.
1717         (UNSPEC_GATHER): Likewise.
1718         (ssemodesuffix): Extend.
1719         * config/i386/immintrin.h: Include avx2intrin.h when __AVX2__
1720         is defined.
1721         * config/i386/predicates.md (const1248_operand): New.
1722         * config/i386/sse.md (VI1_AVX2): New mode iterator.
1723         (VI2_AVX2): Likewise.
1724         (VI4_AVX2): Likewise.
1725         (VI8_AVX2): Likewise.
1726         (VIMAX_AVX2): Likewise.
1727         (SSESCALARMODE): Likewise.
1728         (VI12_AVX2): Likewise.
1729         (VI24_AVX2): Likewise.
1730         (VI124_AVX2): Likewise.
1731         (VI248_AVX2): Likewise.
1732         (VI48_AVX2): Likewise.
1733         (VI4SD_AVX2): Likewise.
1734         (V48_AVX2): Likewise.
1735         (AVX256MODE2P): Likewise.
1736         (AVXMODE48P_DI): Likewise.
1737         (sse2_avx2): New mode attribute.
1738         (ssse3_avx2): Likewise.
1739         (sse4_1_avx2): Likewise.
1740         (avx_avx2): Likewise.
1741         (ssebytemode): Likewise.
1742         (AVXTOSSEMODE): Likewise.
1743         (AVXMODE48P_DI): Likewise.
1744         (gthrfirstp): Likewise.
1745         (gthrlastp): Likewise.
1746         (lshift): New code_iterator
1747         (lshift): New code attribute.
1748         (lshift): Likewise.
1749         (ssescalarmodesuffix): Update.
1750         (sseunpackmode): Likewise.
1751         (ssepackmode): Likewise.
1752         (avx2_vec_dupv4sf): New insn pattern.
1753         (avx2_vec_dupv8sf): Likewise.
1754         (avx2_interleave_highv4di): Likewise.
1755         (avx2_interleave_lowv4di): Likewise.
1756         (avx2_umulv4siv4di3): Likewise
1757         (*avx2_umulv4siv4di3): Likewise
1758         (avx2_pmaddwd): Likewise.
1759         (*avx2_pmaddwd): Likewise.
1760         (avx2_lshrqv4di3): Likewise.
1761         (avx2_lshlqv4di3): Likewise.
1762         (avx2_lshl<mode>3): Likewise.
1763         (avx2_<umaxmin:code><mode>3): Likewise.
1764         (*avx2_<umaxmin:code><mode>3): Likewise.
1765         (avx2_<smaxmin:code><mode>3): Likewise.
1766         (*avx2_<smaxmin:code><mode>3): Likewise.
1767         (avx2_eq<mode>3): Likewise.
1768         (*avx2_eq<mode>3): Likewise.
1769         (avx2_gt<mode>3): Likewise.
1770         (avx2_interleave_highv32qi): New.
1771         (avx2_interleave_lowv32qi): Likewise.
1772         (avx2_interleave_highv16hi): Likewise.
1773         (avx2_interleave_lowv16hi): Likewise.
1774         (avx2_interleave_highv8si): Likewise.
1775         (avx2_interleave_lowv8si): Likewise.
1776         (avx2_pshufd): Likewise.
1777         (avx2_pshufd_1): Likewise.
1778         (avx2_pshuflwv3): Likewise.
1779         (avx2_pshuflw_1): Likewise.
1780         (avx2_pshufhwv3): Likewise.
1781         (avx2_pshufhw_1): Likewise.
1782         (avx2_uavgv32qi3): Likewise.
1783         (*avx2_uavgv32qi3): Likewise.
1784         (avx2_uavgv16hi3): Likewise.
1785         (*avx2_uavgv16hi3): Likewise.
1786         (avx2_pmovmskb): Likewise.
1787         (avx2_phaddwv16hi3): Likewise.
1788         (avx2_phadddv8si3): Likewise.
1789         (avx2_phaddswv16hi3): Likewise.
1790         (avx2_phsubwv16hi3): Likewise.
1791         (avx2_phsubdv8si3): Likewise.
1792         (avx2_phsubswv16hi3): Likewise.
1793         (avx2_pmaddubsw256): Likewise.
1794         (avx2_umulhrswv16hi3): Likewise.
1795         (*avx2_umulhrswv16hi3): Likewise.
1796         (avx2_packusdw): Likewise.
1797         (avx2_pblendd<mode>): Likewise.
1798         (avx2_<code>v16qiv16hi2): Likewise.
1799         (avx2_<code>v8qiv8si2): Likewise.
1800         (avx2_<code>v8hiv8si2): Likewise.
1801         (avx2_<code>v4qiv4di2): Likewise.
1802         (avx2_<code>v4hiv4di2): Likewise.
1803         (avx2_<code>v4siv4di2): Likewise.
1804         (avx2_pbroadcast<mode>): Likewise.
1805         (avx2_permvarv8si): Likewise.
1806         (avx2_permv4df): Likewise.
1807         (avx2_permvarv8sf): Likewise.
1808         (avx2_permv4di): Likewise.
1809         (avx2_permv2ti): Likewise.
1810         (avx2_vec_dupv4df): Likewise.
1811         (avx2_vbroadcasti128_<mode>): Likewise.
1812         (avx2_vec_set_lo_v4di): Likewise.
1813         (avx2_vec_set_hi_v4di): Likewise.
1814         (*avx2_maskmov<avx2modesuffix><avxmodesuffix>): Likewise.
1815         (avx2_extracti128): Likewise.
1816         (avx2_inserti128): Likewise.
1817         (avx2_ashrvv8si): Likewise.
1818         (avx2_ashrvv4si): Likewise.
1819         (avx2_<lshift>vv8si): Likewise.
1820         (avx2_<lshift>v<mode>): Likewise.
1821         (avx2_<lshift>vv2di): Likewise.
1822         (avx2_gathersi<mode>): Likewise.
1823         (*avx2_gathersi<mode>): Likewise.
1824         (avx2_gatherdi<mode>): Likewise.
1825         (*avx2_gatherdi<mode>): Likewise.
1826         (avx2_gatherdi<mode>256): Likewise.
1827         (*avx2_gatherdi<mode>256): Likewise.
1828         (<plusminus_insn><mode>3): Use VI mode iterator.
1829         (*<plusminus_insn><mode>3): Use VI mode iterator.
1830         (<sse2_avx2>_<plusminus_insn><mode>3): Rename from
1831         sse2_<plusminus_insn><mode>3.  Use VI12_AVX2 mode iterator.
1832         (*<sse2_avx2>_<plusminus_insn><mode>3): Rename from
1833         *sse2_<plusminus_insn><mode>3.  Use VI12_AVX2 mode iterator.
1834         (mul<mode>3): Rename from mulv8hi3.  Use VI2_AVX2 mode iterator.
1835         (*mul<mode>3): Rename from *mulv8hi3.  Use VI2_AVX2 mode iterator.
1836         (<s>mul<mode>3_highpart): Rename from <s>mulv8hi3_highpart.
1837         Use VI2_AVX2 mode iterator.
1838         (*<s>mul<mode>3_highpart): Rename from *<s>mulv8hi3_highpart.
1839         Use VI2_AVX2 mode iterator.
1840         (mul<mode>3): Rename from mulv4si3.  Use VI4_AVX2 mode iterator.
1841         (*mul<mode>3): Rename from *mulv4si3.  Use VI4_AVX2 mode iterator.
1842         (*<sse4_1_avx2>_mulv2siv2di3): Rename from *sse4_1_mulv4si3.
1843         Use VI4_AVX2 mode iterator.
1844         (ashr<mode>3): Use VI24_AVX2 mode iterator.
1845         (lshr<mode>3): Use VI248_AVX2 mode iterator.
1846         (<sse2_avx2>_ashl<mode>3): Rename from sse2_ashlv1ti3.
1847         Use VIMAX_AVX2 mode iterator.
1848         (<sse2_avx2>_andnot<mode>3): Rename from sse2_andnot<mode>3.
1849         Use VI mode iterator.
1850         (*andnot<mode>3): Update for AVX2.
1851         (*<any_logic:code><mode>3): Likewise.
1852         (<sse2_avx2>_packsswb): Rename from sse2_packsswb.
1853         Use VI1_AVX mode iterator.
1854         (<sse2_avx2>_packssdw):  Rename from sse2_packssdw.
1855         Use VI2_AVX mode iterator.
1856         (<sse2_avx2>_packuswb): Rename from sse2_packsswb.
1857         Use VI1_AVX mode iterator.
1858         (<sse2_avx2>_psadbw): Rename from sse2_psadbw.
1859         Use VI8_AVX2 mode iterator.
1860         (<ssse3_avx2>_pshufb<mode>3): Rename from ssse3_pshufbv16qi3.
1861         Use VI1_AVX2 mode iterator.
1862         (<ssse3_avx2>_psign<mode>3): Rename from ssse3_psign<mode>3.
1863         Use VI124_AVX2 mode iterator.
1864         (<ssse3_avx2>_palignr<mode>): Rename from ssse3_palignrti.
1865         Use SSESCALARMODE mode iterator.
1866         (abs<mode>2): Use VI124_AVX2 mode iterator.
1867         (<sse4_1_avx2>_movntdqa): Rename from sse4_1_movntdqa.
1868         Use VI8_AVX2 mode iterator.
1869         (<sse4_1_avx2>_mpsadbw): Rename from sse4_1_mpsadbw.
1870         Use VI1_AVX2 mode iterator.
1871         (<sse4_1_avx2>_pblendvb): Rename from sse4_1_pblendvb.
1872         Use VI1_AVX2 mode iterator.
1873         (<sse4_1_avx2>_pblendw): Rename from sse4_1_pblendvb.
1874         Use VI2_AVX2 mode iterator.
1875         (<avx_avx2>_maskload<avx2modesuffix><avxmodesuffix>): Rename from
1876         avx_maskload<ssemodesuffix><avxsizesuffix>. Use V48_AVX2 mode iterator.
1877         (<avx_avx2>_maskstore<avx2modesuffix><avxmodesuffix>): Rename from
1878         avx_maskstore<ssemodesuffix><avxsizesuffix>.
1879         Use V48_AVX2 mode iterator.
1880         * doc/extend.texi: Document AVX2 built-in functions.
1881         * doc/invoke.texi: Document -mavx2.
1882
1883 2011-08-22  Matthias Klose <doko@debian.org>
1884
1885         Revert:
1886         2011-07-11  Arthur Loiret  <aloiret@debian.org>
1887                     Matthias Klose <doko@debian.org>
1888         * config/mips/t-linux64 (MULTILIB_DIRNAMES): Set to 'n32 . 64' if
1889         tm_defines contains MIPS_ABI_DEFAULT ABI_32, to follow the glibc
1890         convention.
1891         * config.gcc (tm_defines): Add MIPS_ABI_DEFAULT=ABI_32.
1892
1893 2011-08-22  Mikael Pettersson  <mikpe@it.uu.se>
1894
1895         PR bootstrap/50146
1896         * ira-color.c (assign_hard_reg): Move saved_nregs declaration
1897         to #ifndef HONOR_REG_ALLOC_ORDER block.
1898
1899 2011-08-21  Richard Henderson  <rth@redhat.com>
1900
1901         * rtl.h (INSN_ANNULLED_BRANCH_P): Only allow JUMP_INSN.
1902         * dwarf2cfi.c (scan_trace): Test JUMP_P before INSN_ANNULLED_BRANCH_P.
1903         * resource.c (next_insn_no_annul): Likewise.
1904         (mark_set_resources): Likewise.
1905         * reorg.c (delete_from_delay_slot): Likewise.
1906         (dbr_schedule, redundant_insn, try_merge_delay_insns): Likewise.
1907         (get_branch_condition): Test pc_rtx and LABEL_REF before dereferencing.
1908
1909 2011-08-21  Uros Bizjak  <ubizjak@gmail.com>
1910
1911         * config/i386/i386.md (any_div): Remove.
1912         (sgnprefix): Update for removal.
1913         (u): Ditto.
1914
1915 2011-08-20  Vladimir Makarov  <vmakarov@redhat.com>
1916
1917         * ira-lives.c (mark_pseudo_regno_subword_live): Use allocno class
1918         for ira_reg_class_max_nregs.  Increase pressure by 1.
1919         (mark_pseudo_regno_subword_dead): Use allocno class
1920         for ira_reg_class_max_nregs.
1921
1922 2011-08-20  Richard Henderson  <rth@redhat.com>
1923
1924         * config/c6x/eqd.c, config/c6x/eqf.c, config/c6x/ged.c,
1925         config/c6x/gef.c, config/c6x/gtd.c, config/c6x/gtf.c,
1926         config/c6x/led.c, config/c6x/lef.c, config/c6x/ltd.c,
1927         config/c6x/ltf.c: Adjust include path for soft-fp.
1928
1929 2011-08-20  H.J. Lu  <hongjiu.lu@intel.com>
1930
1931         PR other/46770
1932         * config.gcc (tm_file): Add initfini-array.h if
1933         .init_arrary/.fini_array are supported.
1934
1935         * crtstuff.c: Don't generate .ctors nor .dtors sections if
1936         USE_INITFINI_ARRAY is defined.
1937
1938         * output.h (default_elf_init_array_asm_out_constructor): New.
1939         (default_elf_fini_array_asm_out_destructor): Likewise.
1940         * varasm.c (elf_init_array_section): Likewise.
1941         (elf_fini_array_section): Likewise.
1942         (get_elf_initfini_array_priority_section): Likewise.
1943         (default_elf_init_array_asm_out_constructor): Likewise.
1944         (default_elf_fini_array_asm_out_destructor): Likewise.
1945
1946         * config/initfini-array.h: New.
1947
1948 2011-08-20  Richard Sandiford  <rdsandiford@googlemail.com>
1949
1950         * config/mips/mips.c (mips_class_max_nregs): Check that the mode is
1951         OK for ST_REGS and FP_REGS before taking those classes into account.
1952
1953 2011-08-20  Richard Sandiford  <rdsandiford@googlemail.com>
1954
1955         * config/mips/mips.c (mips_reorg_process_insns): Check for jumps
1956         before checking for annulled branches.
1957
1958 2011-08-20  Uros Bizjak  <ubizjak@gmail.com>
1959
1960         * config/i386/i386.c (ix86_binary_operator_ok): Use
1961         satisfies_constraint_L.
1962
1963 2011-08-20  Uros Bizjak  <ubizjak@gmail.com>
1964             Michael Matz  <matz@suse.de>
1965
1966         * config/i386/i386.c (ix86_expand_round_sse4): Expand as
1967         trunc (a + copysign (nextafter (0.5, 0.0), a)).
1968
1969 2011-08-20  Anatoly Sokolov  <aesok@post.ru>
1970
1971         * doc/tm.texi.in (PREFERRED_OUTPUT_RELOAD_CLASS): Remove.
1972         * doc/tm.texi: Regenerate.
1973         * targhooks.c (default_preferred_output_reload_class): Don't use
1974         PREFERRED_OUTPUT_RELOAD_CLASS macro.
1975         * system.h (PREFERRED_OUTPUT_RELOAD_CLASS): Poison.
1976
1977 2011-08-20  Jakub Jelinek  <jakub@redhat.com>
1978
1979         PR tree-optimization/48739
1980         * tree-ssa.c: Include cfgloop.h.
1981         (execute_update_addresses_taken): When updating ssa, if in loop closed
1982         SSA form, call rewrite_into_loop_closed_ssa instead of update_ssa.
1983         * Makefile.in (tree-ssa.o): Depend on $(CFGLOOP_H).
1984
1985 2011-08-19  Vladimir Makarov  <vmakarov@redhat.com>
1986
1987         PR rtl-optimization/49936
1988         * ira.c (ira_init_register_move_cost): Ignore too small subclasses
1989         for calculation of max register move costs.
1990
1991 2011-08-19  Joseph Myers  <joseph@codesourcery.com>
1992
1993         * c-parser.c (c_parser_postfix_expression): Convert operands of
1994         __builtin_complex to their semantic types.
1995
1996 2011-08-19  H.J. Lu  <hongjiu.lu@intel.com>
1997
1998         PR middle-end/49721
1999         * explow.c (convert_memory_address_addr_space): Also permute the
2000         conversion and addition of constant for zero-extend.
2001
2002 2011-08-19  Joseph Myers  <joseph@codesourcery.com>
2003
2004         * c-parser.c (c_parser_postfix_expression): Handle RID_BUILTIN_COMPLEX.
2005         * doc/extend.texi (__builtin_complex): Document.
2006
2007 2011-08-19  Andrew Stubbs  <ams@codesourcery.com>
2008
2009         * tree-ssa-math-opts.c (is_widening_mult_rhs_p): Handle constants
2010         beyond conversions.
2011         (convert_mult_to_widen): Convert constant inputs to the right type.
2012         (convert_plusminus_to_widen): Don't automatically reject inputs that
2013         are not an SSA_NAME.
2014         Convert constant inputs to the right type.
2015
2016 2011-08-19  Andrew Stubbs  <ams@codesourcery.com>
2017
2018         * tree-ssa-math-opts.c (convert_plusminus_to_widen): Convert add_rhs
2019         to the correct type.
2020
2021 2011-08-19  Andrew Stubbs  <ams@codesourcery.com>
2022
2023         * tree-ssa-math-opts.c (convert_mult_to_widen): Better handle
2024         unsigned inputs of different modes.
2025         (convert_plusminus_to_widen): Likewise.
2026
2027 2011-08-19  Andrew Stubbs  <ams@codesourcery.com>
2028
2029         * tree-ssa-math-opts.c (is_widening_mult_rhs_p): Add new argument
2030         'type'.
2031         Use 'type' from caller, not inferred from 'rhs'.
2032         Don't reject non-conversion statements. Do return lhs in this case.
2033         (is_widening_mult_p): Add new argument 'type'.
2034         Use 'type' from caller, not inferred from 'stmt'.
2035         Pass type to is_widening_mult_rhs_p.
2036         (convert_mult_to_widen): Pass type to is_widening_mult_p.
2037         (convert_plusminus_to_widen): Likewise.
2038
2039 2011-08-19  Andrew Stubbs  <ams@codesourcery.com>
2040
2041         * tree-ssa-math-opts.c (is_widening_mult_p): Remove FIXME.
2042         Ensure the the larger type is the first operand.
2043
2044 2011-08-19  Andrew Stubbs  <ams@codesourcery.com>
2045
2046         * tree-ssa-math-opts.c (convert_mult_to_widen): Convert
2047         unsupported unsigned multiplies to signed.
2048         (convert_plusminus_to_widen): Likewise.
2049
2050 2011-08-19  Andrew Stubbs  <ams@codesourcery.com>
2051
2052         * tree-ssa-math-opts.c (convert_plusminus_to_widen): Permit a single
2053         conversion statement separating multiply-and-accumulate.
2054
2055 2011-08-19  Richard Guenther  <rguenther@suse.de>
2056
2057         PR tree-optimization/50067
2058         * tree-data-ref.c (dr_analyze_indices): Simplify, strip MEM_REF
2059         offset only if we accounted for it.
2060
2061 2011-08-19  Andrew Stubbs  <ams@codesourcery.com>
2062
2063         * config/arm/arm.md (maddhidi4): Remove '*' from name.
2064         * expr.c (expand_expr_real_2): Use find_widening_optab_handler.
2065         * optabs.c (find_widening_optab_handler_and_mode): New function.
2066         (expand_widen_pattern_expr): Use find_widening_optab_handler.
2067         (expand_binop_directly): Likewise.
2068         (expand_binop): Likewise.
2069         * optabs.h (find_widening_optab_handler): New macro define.
2070         (find_widening_optab_handler_and_mode): New prototype.
2071         * tree-cfg.c (verify_gimple_assign_binary): Adjust WIDEN_MULT_EXPR
2072         type precision rules.
2073         (verify_gimple_assign_ternary): Likewise for WIDEN_MULT_PLUS_EXPR.
2074         * tree-ssa-math-opts.c (build_and_insert_cast): New function.
2075         (is_widening_mult_rhs_p): Allow widening by more than one mode.
2076         Explicitly disallow mis-matched input types.
2077         (convert_mult_to_widen): Use find_widening_optab_handler, and cast
2078         input types to fit the new handler.
2079         (convert_plusminus_to_widen): Likewise.
2080
2081 2011-08-19  Andrew Stubbs  <ams@codesourcery.com>
2082
2083         * expr.c (expand_expr_real_2): Use widening_optab_handler.
2084         * genopinit.c (optabs): Use set_widening_optab_handler for $N.
2085         (gen_insn): $N now means $a must be wider than $b, not consecutive.
2086         * optabs.c (widened_mode): New function.
2087         (expand_widen_pattern_expr): Use widening_optab_handler.
2088         (expand_binop_directly): Likewise.
2089         (expand_binop): Likewise.
2090         * optabs.h (widening_optab_handlers): New struct.
2091         (optab_d): New member, 'widening'.
2092         (widening_optab_handler): New function.
2093         (set_widening_optab_handler): New function.
2094         * tree-ssa-math-opts.c (convert_mult_to_widen): Use
2095         widening_optab_handler.
2096         (convert_plusminus_to_widen): Likewise.
2097
2098 2011-08-19  Joseph Myers  <joseph@codesourcery.com>
2099
2100         * c-decl.c (grokdeclarator): Diagnose _Noreturn for non-C1X if
2101         pedantic.
2102         * c-parser.c (c_parser_declspecs): Include _Noreturn in syntax comment.
2103         * ginclude/stdnoreturn.h (noreturn): Don't define for C++.
2104
2105 2011-08-19  Joseph Myers  <joseph@codesourcery.com>
2106
2107         * opth-gen.awk: Do not declare target save/restore structures and
2108         functions if IN_RTS defined.
2109
2110 2011-08-19  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
2111
2112         PR target/49437
2113         * config/arm/arm.c (arm_output_epilogue): Properly handle epilogue
2114         when stack was realigned in interrupt handler prologue.
2115
2116 2011-08-18  Joseph Myers  <joseph@codesourcery.com>
2117
2118         * c-decl.c (shadow_tag_warned): Check for _Noreturn.
2119         (quals_from_declspecs): Assert _Noreturn not present.
2120         (grokdeclarator): Handle _Noreturn.
2121         (build_null_declspecs): Initialize noreturn_p.
2122         (declspecs_add_scspec): Handle RID_NORETURN.
2123         * c-parser.c (c_token_starts_declspecs, c_parser_declspecs)
2124         (c_parser_attributes): Handle RID_NORETURN.
2125         * c-tree.h (struct c_declspecs): Add noreturn_p.
2126         * ginclude/stdnoreturn.h: New.
2127         * Makefile.in (USER_H): Add stdnoreturn.h.
2128
2129 2011-08-18  Kirill Yukhin  <kirill.yukhin@intel.com>
2130
2131         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX2_SET): New.
2132         (OPTION_MASK_ISA_AVX_UNSET): Update.
2133         (OPTION_MASK_ISA_AVX2_UNSET): New.
2134         (ix86_handle_option): Handle OPT_mavx2 case.
2135         * config/i386/cpuid.h (bit_AVX2): New.
2136         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
2137         AVX2 feature.
2138         * config/i386/i386-c.c (ix86_target_macros_internal):
2139         Conditionally define __AVX2__.
2140         * config/i386/i386.c (ix86_option_override_internal): Define PTA_AVX2.
2141         Define "core-avx2" processor alias.  Handle avx2 option.
2142         (ix86_valid_target_attribute_inner_p): Handle avx2 option.
2143         * config/i386/i386.h (TARGET_AVX2): New.
2144         * config/i386/i386.opt (mavx2): New.
2145         * doc/invoke.texi: Document -mavx2.
2146
2147 2011-08-18  Vladimir Makarov  <vmakarov@redhat.com>
2148
2149         PR rtl-optimization/49890
2150         * ira-costs.c (setup_regno_cost_classes_by_aclass): Don't exclude
2151         subclasses of class which is superset of a pressure class.
2152
2153 2011-08-18  H.J. Lu  <hongjiu.lu@intel.com>
2154             Igor Zamyatin <igor.zamyatin@intel.com>
2155
2156         * config/i386/i386-c.c (ix86_target_macros_internal): Replace int
2157         with HOST_WIDE_INT for isa_flag.
2158         (ix86_pragma_target_parse): Replace int with HOST_WIDE_INT for
2159         isa variables.
2160
2161         * config/i386/i386.c (ix86_target_string): Replace int with
2162         HOST_WIDE_INT for isa.  Use HOST_WIDE_INT_PRINT to print isa.
2163         (ix86_target_opts): Replace int with HOST_WIDE_INT on mask.
2164         (pta_flags): Removed.
2165         (PTA_XXX): Redefined as (HOST_WIDE_INT_1 << X).
2166         (pta): Use HOST_WIDE_INT on flags.
2167         (builtin_isa): Use HOST_WIDE_INT on isa.
2168         (ix86_add_new_builtins): Likewise.
2169         (def_builtin): Use HOST_WIDE_INT on mask.
2170         (def_builtin_const): Likewise.
2171         (builtin_description): Likewise.
2172
2173         * config/i386/i386.opt (ix86_isa_flags): Replace int with
2174         HOST_WIDE_INT.
2175         (ix86_isa_flags_explicit): Likewise.
2176         (x_ix86_isa_flags_explicit): Likewise.
2177
2178 2011-08-17  Vladimir Makarov  <vmakarov@redhat.com>
2179
2180         PR rtl-optimization/50107
2181         * ira-int.h (ira_hard_reg_not_in_set_p): Remove.
2182         (ira_hard_reg_in_set_p): New.
2183
2184         * ira-color.c (calculate_saved_nregs): New.
2185         (assign_hard_reg): Use it.  Set up allocated_hard_reg_p for all
2186         hard regs.
2187         (allocno_reload_assign, fast_allocation): Use
2188         ira_hard_reg_set_intersection_p instead of
2189         ira_hard_reg_not_in_set_p.
2190
2191         * ira.c (setup_reg_renumber): Use
2192         ira_hard_reg_set_intersection_p instead of
2193         ira_hard_reg_not_in_set_p.
2194         (setup_allocno_assignment_flags, calculate_allocation_cost): Use
2195         ira_hard_reg_in_set_p instead of ira_hard_reg_not_in_set_p.
2196
2197         * ira-costs.c (ira_tune_allocno_costs): Use
2198         ira_hard_reg_set_intersection_p instead of
2199         ira_hard_reg_not_in_set_p.
2200
2201 2011-08-18  H.J. Lu  <hongjiu.lu@intel.com>
2202             Igor Zamyatin <igor.zamyatin@intel.com>
2203
2204         * hwint.h (HOST_WIDE_INT_1): New.
2205
2206         * opt-functions.awk (switch_bit_fields): Initialize the
2207         host_wide_int field.
2208         (host_wide_int_var_name): New.
2209         (var_type_struct): Check and return HOST_WIDE_INT.
2210
2211         * opt-read.awk: Handle HOST_WIDE_INT for "Variable".
2212
2213         * optc-save-gen.awk: Support HOST_WIDE_INT on var_target_other.
2214
2215         * opth-gen.awk: Use HOST_WIDE_INT_1 on HOST_WIDE_INT.  Properly
2216         check masks for HOST_WIDE_INT.
2217
2218         * opts-common.c (set_option): Support HOST_WIDE_INT flag_var.
2219         (option_enabled): Likewise.
2220         (get_option_state): Likewise.
2221
2222         * opts.h (cl_option): Add cl_host_wide_int.  Change var_value
2223         to HOST_WIDE_INT.
2224
2225 2011-08-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2226             Marc Glisse  <marc.glisse@normalesup.org>
2227
2228         PR libstdc++-v3/1773
2229         * target.def (decl_mangling_context): New C++ hook.
2230         * doc/tm.texi: Regenerate.
2231         * config/sol2-cxx.c, config/sol2-stubs.c: New files.
2232         * config/sol2-protos.h: Group by source file.
2233         (solaris_cxx_decl_mangling_context): Declare.
2234         * config/sol2.h (TARGET_CXX_DECL_MANGLING_CONTEXT): Define.
2235         * config/t-sol2 (sol2-cxx.o, sol2-stubs.o): New targets.
2236         Use $<.
2237         * config.gcc (*-*-solaris2*): Add sol2-cxx.o to cxx_target_objs.
2238         Add sol2-stubs.o to extra_objs.
2239
2240 2011-08-18  Jakub Jelinek  <jakub@redhat.com>
2241
2242         PR target/50009
2243         * stor-layout.c (update_alignment_for_field): Don't ICE on
2244         packed flexible array members if ms_bitfield_layout_p.
2245
2246         PR target/50092
2247         * config/i386/i386.c (assign_386_stack_local): Call validize_mem
2248         on the result before returning it.
2249
2250         PR debug/50017
2251         * tree-vect-stmts.c (vect_finish_stmt_generation): If gsi_stmt (*gsi)
2252         is a debug stmt, use location of the first non-debug stmt after it.
2253
2254 2011-08-18  Richard Sandiford  <richard.sandiford@linaro.org>
2255
2256         * config/arm/arm.c (arm_rtx_costs_1): Don't modify the costs of SET.
2257         (arm_size_rtx_costs): Likewise.
2258
2259 2011-08-18  Richard Guenther  <rguenther@suse.de>
2260
2261         * tree.h (tree_int_cst_msb): Remove.
2262         * tree.c (tree_int_cst_msb): Likewise.
2263         (tree_int_cst_sign_bit): Move from ...
2264         * tree-ssa-loop-ivopts.c (tree_int_cst_sign_bit): ... here.
2265
2266 2011-08-18  Richard Sandiford  <richard.sandiford@linaro.org>
2267
2268         * doc/tm.texi.in (TARGET_RTX_COSTS): Add an opno paramter.
2269         * doc/tm.texi: Regenerate.
2270         * target.def (rtx_costs): Add an opno parameter.
2271         * hooks.h (hook_bool_rtx_int_int_intp_bool_false): Replace with...
2272         (hook_bool_rtx_int_int_int_intp_bool_false): ...this.
2273         * hooks.c (hook_bool_rtx_int_int_intp_bool_false): Replace with...
2274         (hook_bool_rtx_int_int_int_intp_bool_false): ...this.
2275         * cse.c (COST_IN): Add an opno parameter.
2276         (notreg_cost): Likewise.  Update call to rtx_cost.
2277         (COST, fold_rtx): Update accordingly.
2278         * dojump.c (prefer_and_bit_test): Update call to rtx_cost.
2279         * expmed.c (emit_store_flag): Likewise.
2280         * optabs.c (avoid_expensive_constant): Add an opno parameter.
2281         Update call to rtx_cost.
2282         (expand_binop_directly, expand_binop): Likewise.
2283         (expand_twoval_binop, prepare_cmp_insn): Likewise.
2284         * rtl.h (rtx_cost, get_full_rtx_cost): Add opno parameters.
2285         (set_src_cost, get_full_set_src_cost): Update accordingly.
2286         * rtlanal.c (rtx_cost): Add an opno parameter.  Update call
2287         to target hook.
2288         (get_full_rtx_cost): Add an opno paramter.  Update calls to rtx_cost.
2289         (default_adress_cost): Update calls to rtx_cost.
2290
2291         * config/arm/arm.c (arm_rtx_costs_1, arm_size_rtx_costs)
2292         (arm_slowmul_rtx_costs): Adjust calls to rtx_cost.
2293         (arm_rtx_costs): Add an opno parameter.
2294         * config/alpha/alpha.c (alpha_rtx_costs): Add an opno parameter and
2295         adjust any recursive rtx-cost calls.
2296         * config/avr/avr.c (avr_operand_rtx_cost, avr_rtx_costs): Likewise.
2297         * config/bfin/bfin.c (bfin_rtx_costs): Likewise.
2298         * config/c6x/c6x.c (c6x_rtx_costs): Likewise.
2299         * config/cris/cris.c (cris_rtx_costs): Likewise.
2300         * config/frv/frv.c (frv_rtx_costs): Likewise.
2301         * config/h8300/h8300.c (h8300_rtx_costs): Likewise.
2302         * config/i386/i386.c (ix86_rtx_costs): Likewise.
2303         * config/ia64/ia64.c (ia64_rtx_costs): Likewise.
2304         * config/iq2000/iq2000.c (iq2000_rtx_costs): Likewise.
2305         * config/lm32/lm32.c (lm32_rtx_costs): Likewise.
2306         * config/m32c/m32c.c (m32c_rtx_costs): Likewise.
2307         * config/m32r/m32r.c (m32r_rtx_costs): Likewise.
2308         * config/m68k/m68k.c (m68k_rtx_costs): Likewise.
2309         * config/mcore/mcore.c (mcore_rtx_costs): Likewise.
2310         * config/mep/mep.c (mep_rtx_cost): Likewise.
2311         * config/microblaze/microblaze.c (microblaze_rtx_costs): Likewise.
2312         * config/mips/mips.c (mips_binary_cost): Update call to rtx_cost.
2313         (mips_zero_extend_cost): Add an opno parameter.
2314         * config/mmix/mmix.c (mmix_rtx_costs): Likewise.
2315         * config/mn10300/mn10300.c (mn10300_address_cost): Update call
2316         to rtx_cost.
2317         (mn10300_rtx_costs): Add an opno parameter and adjust any recursive
2318         rtx-cost calls.
2319         * config/pa/pa.c (hppa_rtx_costs): Likewise.
2320         * config/pdp11/pdp11.c (pdp11_rtx_costs): Likewise.
2321         * config/picochip/picochip.c (picochip_rtx_costs): Likewise.
2322         * config/rs6000/rs6000.c (rs6000_rtx_costs): Likewise.
2323         (rs6000_debug_rtx_costs): Likewise.
2324         * config/s390/s390.c (s390_rtx_costs): Likewise.
2325         * config/score/score-protos.h (score_rtx_costs): Likewise.
2326         * config/score/score.c (score_rtx_costs): Likewise.
2327         * config/sh/sh.c (andcosts): Update call to rtx_cost.
2328         (sh_rtx_costs): Add an opno parameter.
2329         * config/sparc/sparc.c (sparc_rtx_costs): Likewise.
2330         * config/spu/spu.c (spu_rtx_costs): Likewise.
2331         * config/stormy16/stormy16.c (xstormy16_rtx_costs): Likewise.
2332         * config/v850/v850.c (v850_rtx_costs): Likewise.
2333         * config/vax/vax.c (vax_rtx_costs): Likewise.
2334         * config/xtensa/xtensa.c (xtensa_rtx_costs): Likewise.
2335
2336 2011-08-18  Richard Sandiford  <richard.sandiford@linaro.org>
2337
2338         * rtl.h (set_src_cost, get_full_set_src_cost): New functions.
2339         * auto-inc-dec.c (attempt_change): Use set_src_cost instead of
2340         rtx_cost.
2341         * calls.c (precompute_register_parameters): Likewise.
2342         * combine.c (expand_compound_operation, make_extraction): Likewise.
2343         (force_to_mode, distribute_and_simplify_rtx): Likewise.
2344         * dse.c (find_shift_sequence): Likewise.
2345         * expmed.c (init_expmed, expand_mult, expand_smod_pow2): Likewise.
2346         * expr.c (compress_float_constant): Likewise.
2347         * fwprop.c (should_replace_address, try_fwprop_subst): Likewise.
2348         * gcse.c (want_to_gcse_p): Likewise.
2349         * ifcvt.c (noce_try_sign_mask): Likewise.
2350         * loop-doloop.c (doloop_optimize): Likewise.
2351         * loop-invariant.c (create_new_invariant): Likewise.
2352         * optabs.c (avoid_expensive_constant): Likewise.
2353         * postreload.c (reload_cse_simplify_set, reload_cse_simplify_operands)
2354         (try_replace_in_use, reload_cse_move2add): Likewise.
2355         * reload1.c (calculate_elim_costs_all_insns): Likewise.
2356         (note_reg_elim_costly): Likewise.
2357         * rtlanal.c (insn_rtx_cost): Likewise.
2358         * simplify-rtx.c (simplify_binary_operation_1): Likewise.
2359         * stmt.c (lshift_cheap_p): Likewise.
2360         * tree-ssa-loop-ivopts.c (seq_cost, computation_cost): Likewise.
2361         * config/avr/avr.c (final_prescan_insn): Likewise.
2362         * config/bfin/bfin.c (bfin_rtx_costs): Likewise.
2363         * config/mips/mips.c (mips_binary_cost, mips_rtx_costs): Likewise.
2364
2365 2011-08-18  Richard Sandiford  <richard.sandiford@linaro.org>
2366
2367         * rtl.h (set_rtx_cost, get_full_set_rtx_cost): New functions.
2368         * auto-inc-dec.c (attempt_change): Use set_rtx_cost.
2369         * cfgloopanal.c (seq_cost): Likewise.
2370         * loop-invariant.c (create_new_invariant): Likewise.
2371         * postreload.c (move2add_use_add2_insn, move2add_use_add3_insn)
2372         (reload_cse_move2add): Use get_full_set_rtx_cost.
2373
2374 2011-08-18  Richard Guenther  <rguenther@suse.de>
2375
2376         * expr.c (get_inner_reference): Fix typo in last change.
2377
2378 2011-08-18  Paolo Carlini  <paolo.carlini@oracle.com>
2379             Joseph Myers  <joseph@codesourcery.com>
2380
2381         PR tree-optimization/49963
2382         * hwint.c (absu_hwi): Define.
2383         * hwint.h (absu_hwi): Declare.
2384         * fold-const.c (fold_plusminus_mult_expr): Use absu_hwi instead
2385         of abs_hwi.
2386         * tree-ssa-math-opts.c (gimple_expand_builtin_pow): Likewise.
2387         * tree-ssa-loop-prefetch.c (prune_ref_by_group_reuse): Likewise.
2388
2389 2011-08-18  Richard Guenther  <rguenther@suse.de>
2390
2391         * expr.c (get_inner_reference): Sign-extend the constant
2392         twos-complement offset before doing arbitrary precision
2393         arithmetic on it.
2394         * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Likewise.
2395         (get_constraint_for_1): Pass the offset of a MEM_REF unchanged
2396         to get_constraint_for_ptr_offset.
2397
2398 2011-08-17  Kaz Kojima  <kkojima@gcc.gnu.org>
2399
2400         PR target/50068
2401         * config/sh/sh.c (sh_output_mi_thunk): Don't call dbr_schedule.
2402
2403 2011-08-17  Richard Guenther  <rguenther@suse.de>
2404
2405         * tree.h (convert_to_ptrofftype_loc): New function.
2406         (convert_to_ptrofftype): Define.
2407         * builtins.c (expand_builtin_bzero): Use size_type_node.
2408         (fold_builtin_bzero): Likewise.
2409         (std_gimplify_va_arg_expr): Build the BIT_AND_EXPR on the pointer.
2410         * c-typeck.c (build_unary_op): Use convert_to_ptrofftype_loc.
2411         * cgraphunit.c (thunk_adjust): Use fold_build_pointer_plus_loc.
2412         (cgraph_redirect_edge_call_stmt_to_callee): Use size_int.
2413         * expr.c (expand_expr_addr_expr_1): Use fold_build_pointer_plus.
2414         * fold-const.c (build_range_check): Negate using the original type.
2415         (fold_unary_loc): Use fold_build_pointer_plus_loc.
2416         * gimple-fold.c (gimple_adjust_this_by_delta): Use
2417         convert_to_ptrofftype.
2418         * gimplify.c (gimplify_self_mod_expr): Likewise.
2419         * graphite-clast-to-gimple.c (clast_to_gcc_expression): Likewise.
2420         (graphite_create_new_loop_guard): Likewise.
2421         * graphite-sese-to-poly.c (my_long_long): Remove.
2422         (scop_ivs_can_be_represented): Adjust.
2423         * tree-cfg.c (verify_gimple_assign_unary): Use ptrofftype_p.
2424         * tree-chrec.c (chrec_fold_plus_1): Use fold_build_pointer_plus.
2425         * tree-loop-distribution.c (build_size_arg_loc): Use
2426         size_type_node.
2427         (generate_memset_zero): Simplify.
2428         * tree-mudflap.c: Use fold_convert, not convert.
2429         * tree-predcom.c (suitable_reference_p): Expand DR_OFFSET in
2430         its own type.
2431         (determine_offset): Likewise for DR_STEP.
2432         (valid_initializer_p): Likewise.
2433         * tree-profile.c (prepare_instrumented_value): Convert the pointer
2434         to an integer type of same size.
2435         * tree-scalar-evolution.c (interpret_rhs_expr): Do not refer
2436         to sizetype without need.
2437         * tree-ssa-address.c (tree_mem_ref_addr): Likewise.
2438         * tree-ssa-loop-ivopts.c (find_bivs): Use convert_to_ptrofftype.
2439         * tree-ssa-loop-manip.c (create_iv): Likewise.
2440         (determine_exit_conditions): Adjust comment.
2441         * tree-ssa-pre.c (create_expression_by_pieces): Use
2442         convert_to_ptrofftype.
2443         * tree-ssa-structalias.c (get_constraint_for_1): Likewise.
2444         * varasm.c (array_size_for_constructor): Compute using double_ints.
2445
2446 2011-08-16  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
2447
2448         * config/spu/spu.c (spu_emit_branch_or_set): Avoid reverse tests
2449         when generating an integer result where possible.  Short-cut
2450         comparison against 0 also for QImode.
2451
2452 2011-08-16  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
2453
2454         * config/spu/spu.h (LEGITIMIZE_RELOAD_ADDRESS): New macro.
2455         * config/spu/spu-protos.h (spu_legitimize_reload_address): Add
2456         prototype.
2457         * config/spu/spu.c (spu_legitimize_reload_address): New function.
2458         (spu_legitimate_address_p): Do not check displacement if the base
2459         is an eliminable stack register.
2460
2461 2011-08-16  Anatoly Sokolov  <aesok@post.ru>
2462
2463         * config/m32c/m32c.h (PREFERRED_RELOAD_CLASS,
2464         PREFERRED_OUTPUT_RELOAD_CLASS): Remove macro.
2465         * config/m32c/m32c-protos.h (m32c_preferred_reload_class,
2466         m32c_preferred_output_reload_class): Remove.
2467         * config/m32c/m32c.c (m32c_preferred_reload_class): Make static.
2468         Change rclass argument and return types to reg_class_t. Use
2469         reg_class_subset_p instead of class_sizes.
2470         (m32c_preferred_output_reload_class): Make static. Change rclass
2471         argument and return types to reg_class_t.
2472         (TARGET_PREFERRED_RELOAD_CLASS,
2473         TARGET_PREFERRED_OUTPUT_RELOAD_CLASS): Define.
2474
2475 2011-08-16  Kai Tietz  <ktietz@redhat.com>
2476
2477         * config/i386/mingw32.h (GOMP_SELF_SPEC): Add -pthread option.
2478
2479 2011-08-16  Richard GUenther  <rguenther@suse.de>
2480
2481         PR tree-optimization/50082
2482         * tree-ssa-forwprop.c (combine_cond_expr_cond): Handle overflow
2483         warnings here, instead of ...
2484         (ssa_forward_propagate_and_combine): ... here.
2485         (forward_propagate_into_comparison_1): Adjust.
2486         (forward_propagate_into_comparison): Likewise.
2487         (forward_propagate_into_gimple_cond): Likewise.
2488         (forward_propagate_into_cond): Likewise.
2489
2490 2011-08-16  Andreas Schwab  <schwab@redhat.com>
2491
2492         * ggc.h (ggc_alloc_rtvec_sized): Use ggc_alloc_zone_rtvec_def
2493         instead of ggc_alloc_zone_vec_rtvec_def.
2494
2495 2011-08-16  Richard Guenther  <rguenther@suse.de>
2496
2497         * tree.h (ptrofftype_p): New helper function.
2498         * tree-cfg.c (verify_expr): Use ptrofftype_p for POINTER_PLUS_EXPR
2499         offset verification.
2500         (verify_gimple_assign_binary): Likewise.
2501         * tree.c (build2_stat): Likewise.
2502         * tree-chrec.c (chrec_fold_plus_poly_poly): Likewise.
2503         (reset_evolution_in_loop): Likewise.
2504         * tree-chrec.h (build_polynomial_chrec): Likewise.
2505
2506 2011-08-16  Liang Wang  <lwang1@marvell.com>
2507
2508         * ggc.h (ggc_alloc_rtvec_sized): Change arguments of
2509         ggc_alloc_zone_vec_rtvec_def.
2510
2511 2011-08-16  Richard Guenther  <rguenther@suse.de>
2512
2513         * tree-vrp.c (extract_range_from_multiplicative_op_1): New
2514         helper factored out from ...
2515         (extract_range_from_binary_expr_1): ... here.  Re-structure
2516         to not glob handling too different tree codes.
2517
2518 2011-08-15  Richard Henderson  <rth@redhat.com>
2519
2520         PR middle-end/50006
2521         * explow.c (allocate_dynamic_stack_space): Move suppress_reg_args_size
2522         setting out to include allocate_stack named pattern as well.
2523         * builtins.c (expand_builtin_apply): Add ARG_SIZE 0 note.
2524         * stmt.c (expand_stack_restore): Likewise.
2525
2526 2011-08-15  Richard Guenther  <rguenther@suse.de>
2527
2528         PR middle-end/50082
2529         * fold-const.c (maybe_canonicalize_comparison_1): Properly
2530         convert the modified operand to the other operand type.
2531         (fold_comparison): Call maybe_canonicalize_comparison_1 with
2532         useless conversions stripped from comparison operands.
2533
2534 2011-08-15  Richard Guenther  <rguenther@suse.de>
2535
2536         * tree-vrp.c (value_range_nonnegative_p): Fix anti-range case.
2537         (extract_range_from_unary_expr_1): Restructure.
2538
2539 2011-08-15  Richard Guenther  <rguenther@suse.de>
2540
2541         PR tree-optimization/50058
2542         * tree-ssa-sccvn.c (vn_reference_lookup_3): Relax aggregate
2543         copy matching.
2544
2545 2011-08-15  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>
2546
2547         PR target/50022
2548         * config/arm/arm.c (output_move_double): Add 2 parameters
2549         to count the number of insns emitted and whether to emit or not.
2550         Use the flag to decide when to emit and count number of instructions
2551         that will be emitted.
2552         Handle case where output_move_double might be called for calculating
2553         lengths with an invalid constant.
2554         (arm_count_output_move_double_insns): Define.
2555         * config/arm/arm-protos.h (arm_count_output_move_double_insns): Declare.
2556         (output_move_double): Adjust prototype.
2557         * config/arm/vfp.md ("*movdi_vfp"): Adjust call to
2558         output_move_double.
2559         ("*movdi_vfp_cortexa8"): Likewise and add attribute
2560         for ce_count.
2561         * config/arm/arm.md ("*arm_movdi"): Adjust call to output_move_double.
2562         ("*movdf_soft_insn"): Likewise.
2563         * config/arm/cirrus.md ("*cirrus_arm_movdi"): Likewise.
2564         ("*cirrus_thumb2_movdi"): Likewise.
2565         ("*thumb2_cirrus_movdf_hard_insn"): Likewise.
2566         ("*cirrus_movdf_hard_insn"): Likewise.
2567         * config/arm/neon.md (*neon_mov<mode> VD): Likewise.
2568         * config/arm/iwmmxt.md ("*iwmmxt_arm_movdi"): Likewise.
2569         ("mov<mode>_internal VMMX"): Likewise.
2570         * config/arm/fpa.md (*movdf_fpa, *thumb2_movdf_fpa): Likewise.
2571
2572 2011-08-14  Uros Bizjak  <ubizjak@gmail.com>
2573
2574         * config/i386/i386.c (ix86_expand_round_sse4): New function.
2575         * config/i386/i386-protos.h (ix86_expand_round_sse4): New prototype.
2576         * config/i386/i386.md (round<mode>2): Use ix86_expand_round_sse4
2577         for TARGET_ROUND.
2578
2579         (rint<mode>2): Simplify TARGET_ROUND check.
2580         (floor<mode>2): Ditto.
2581         (ceil<mode>2): Ditto.
2582         (btrunc<mode>2): Ditto.
2583
2584 2011-08-14  Anatoly Sokolov  <aesok@post.ru>
2585
2586         * config/mmix/mmix.c (TARGET_PREFERRED_OUTPUT_RELOAD_CLASS): Redefine
2587         as mmix_preferred_output_reload_class.
2588
2589 2011-08-14  Georg-Johann Lay  <avr@gjlay.de>
2590
2591         * PR target/49903
2592         * config/avr/avr.md (UNSPEC_IDENTITY): New c_enum.
2593         (branch_unspec): New insn.
2594         (branch): Beauty farm.
2595         * config/avr/avr.c (compare_condition): Use JUMP_P.  Test SET_SRC
2596         to be IF_THEN_ELSE.
2597         (avr_compare_pattern, avr_reorg_remove_redundant_compare):
2598         New static functions.
2599         (avr_reorg): Use them.  Use next_real_insn instead of NEXT_INSN.
2600         Use CONST_INT_P.  Beauty.
2601
2602 2011-08-12  Richard Henderson  <rth@redhat.com>
2603
2604         PR rtl-opt/49994
2605         * sched-init.h (struct deps_desc): Add sched_before_next_jump.
2606         * sched-deps.c (init_deps): Clear it.
2607         (deps_analyze_insn): Consume it.
2608         (sched_analyze_insn): Fill it.
2609
2610 2011-08-12  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>
2611
2612         PR target/48328
2613         * config/arm/arm.h (CASE_VECTOR_SHORTEN_MODE): Fix distance
2614         for tbh instructions.
2615
2616 2011-08-12  Diego Novillo  <dnovillo@google.com>
2617
2618         * data-streamer.h (streamer_write_zero): Rename from output_zero.
2619         (streamer_write_uhwi): Rename from lto_output_uleb128.
2620         (streamer_write_hwi): Rename from output_sleb128.
2621         (streamer_write_string): Rename from lto_output_string.
2622         (streamer_string_index): Rename from lto_string_index.
2623         (streamer_write_string_with_length): Rename from
2624         lto_output_string_with_length.
2625         (streamer_write_uhwi_stream): Rename from lto_output_uleb128_stream.
2626         (streamer_write_hwi_stream): Rename from lto_output_sleb128_stream.
2627         (streamer_read_string): Rename from lto_input_string.
2628         (streamer_read_indexed_string): Rename from input_string_internal.
2629         (streamer_read_uhwi): Rename from lto_input_uleb128.
2630         (streamer_read_hwi): Rename from lto_input_sleb128.
2631         (streamer_write_hwi_in_range): Rename from lto_output_int_in_range.
2632         (streamer_read_hwi_in_range): Rename from lto_input_int_in_range.
2633         (streamer_write_enum): Rename from lto_output_enum.
2634         (streamer_read_enum): Rename from lto_input_enum.
2635         (streamer_write_record_start): Rename from output_record_start.
2636         (streamer_read_record_start): Rename from input_record_start.
2637         (streamer_write_bitpack): Rename from lto_output_bitpack.
2638         (streamer_read_bitpack): Rename from lto_input_bitpack.
2639         (streamer_write_char_stream): Rename from lto_output_1_stream.
2640         (streamer_read_uchar): Rename from lto_input_1_unsigned.
2641         * tree-streamer.h (streamer_cache_d): Rename from lto_streamer_cache_d.
2642         (streamer_handle_as_builtin_p): Rename from lto_stream_as_builtin_p.
2643         (streamer_read_string_cst): Rename from input_string_cst.
2644         (streamer_read_chain): Rename from lto_input_chain.
2645         (streamer_alloc_tree): Rename from lto_materialize_tree.
2646         (streamer_read_tree_body): Rename from lto_input_tree_pointers.
2647         (streamer_get_pickled_tree): Rename from lto_get_pickled_tree.
2648         (streamer_get_builtin_tree): Rename from lto_get_builtin_tree.
2649         (streamer_read_integer_cst): Rename from lto_input_integer_cst.
2650         (streamer_read_tree_bitfields): Rename from tree_read_bitfields.
2651         (streamer_write_chain): Rename from lto_output_chain.
2652         (streamer_write_tree_header): Rename from lto_output_tree_header.
2653         (streamer_pack_tree_bitfields): Rename from pack_value_fields.
2654         (streamer_write_tree_body): Rename from lto_output_tree_pointers.
2655         (streamer_write_integer_cst): Rename from lto_output_integer_cst.
2656         (streamer_write_builtin): Rename from lto_output_builtin_tree.
2657         (streamer_check_handled_ts_structures): Rename from
2658         check_handled_ts_structures.
2659         (streamer_tree_cache_insert): Rename from lto_streamer_cache_insert.
2660         (streamer_tree_cache_insert_at): Rename from
2661         lto_streamer_cache_insert_at.
2662         (streamer_tree_cache_append): Rename from lto_streamer_cache_append.
2663         (streamer_tree_cache_lookup): Rename from lto_streamer_cache_lookup.
2664         (streamer_tree_cache_get): Rename from lto_streamer_cache_get.
2665         (streamer_tree_cache_create): Rename from lto_streamer_cache_create.
2666         (streamer_tree_cache_delete): Rename from lto_streamer_cache_delete.
2667         * tree-streamer-out.c (write_string_cst): Rename from output_string_cst.
2668         (write_identifier): Rename from output_identifier.
2669         (write_ts_common_tree_pointers): Rename from
2670         lto_output_ts_common_tree_pointers.
2671         (write_ts_vector_tree_pointers): Rename from
2672         lto_output_ts_vector_tree_pointers.
2673         (write_ts_complex_tree_pointers): Rename from
2674         lto_output_ts_complex_tree_pointers.
2675         (write_ts_decl_minimal_tree_pointers): Rename from
2676         lto_output_ts_decl_minimal_tree_pointers.
2677         (write_ts_decl_common_tree_pointers): Rename from
2678         lto_output_ts_decl_common_tree_pointers.
2679         (write_ts_decl_non_common_tree_pointers): Rename from
2680         lto_output_ts_decl_non_common_tree_pointers.
2681         (write_ts_decl_with_vis_tree_pointers): Rename from
2682         lto_output_ts_decl_with_vis_tree_pointers.
2683         (write_ts_field_decl_tree_pointers): Rename from
2684         lto_output_ts_field_decl_tree_pointers.
2685         (write_ts_function_decl_tree_pointers): Rename from
2686         lto_output_ts_function_decl_tree_pointers.
2687         (write_ts_type_common_tree_pointers): Rename from
2688         lto_output_ts_type_common_tree_pointers.
2689         (write_ts_type_non_common_tree_pointers): Rename from
2690         lto_output_ts_type_non_common_tree_pointers.
2691         (write_ts_list_tree_pointers): Rename from
2692         lto_output_ts_list_tree_pointers.
2693         (write_ts_vec_tree_pointers): Rename from
2694         lto_output_ts_vec_tree_pointers.
2695         (write_ts_exp_tree_pointers): Rename from
2696         lto_output_ts_exp_tree_pointers.
2697         (write_ts_block_tree_pointers): Rename from
2698         lto_output_ts_block_tree_pointers.
2699         (write_ts_binfo_tree_pointers): Rename from
2700         lto_output_ts_binfo_tree_pointers.
2701         (write_ts_constructor_tree_pointers): Rename from
2702         lto_output_ts_constructor_tree_pointers.
2703         (write_ts_target_option): Rename from lto_output_ts_target_option.
2704         (write_ts_translation_unit_decl_tree_pointers): Rename from
2705         lto_output_ts_translation_unit_decl_tree_pointers.
2706         * tree-streamer.c (streamer_tree_cache_add_to_node_array):
2707         Rename from lto_streamer_cache_add_to_node_array.
2708         (streamer_tree_cache_insert_1): Rename from lto_streamer_cache_insert_1.
2709         (record_common_node): Rename from lto_record_common_node.
2710
2711         * streamer-hooks.h (bitpack_d, lto_streamer_cache_d): Remove forward
2712         declarations.
2713         * data-streamer-in.c (lto_input_widest_uint_uleb128): Remove unused
2714         function.
2715         * data-streamer-out.c (lto_output_widest_uint_uleb128_stream): Remove
2716         unused function.
2717         * Makefile.in (lto-section-out.o): Add dependency on DATA_STREAMER_H.
2718         (ipa-reference.o): Likewise.
2719         * lto-section-out.c: Include data-streamer.h.
2720         * ipa-reference.c: Include data-streamer.h.
2721
2722 2011-08-12  Nick Clifton  <nickc@redhat.com>
2723
2724         * builtins.c (expand_builtin_memcmp): Do not use cmpstrnsi pattern.
2725         * doc/md.texi (cmpstrn): Note that the comparison stops if both
2726         fetched bytes are zero.
2727         (cmpstr): Likewise.
2728         (cmpmem): Note that the comparison does not stop if both of the
2729         fetched bytes are zero.
2730
2731 2011-08-12  Uros Bizjak  <ubizjak@gmail.com>
2732
2733         * builtins.def (BUILT_IN_ICEIL{,F,L}, BUILT_IN_IFLOOR{,F,L}
2734         BUILT_IN_IRINT{,F,L}, BUILT_IN_IROUND{,F,L}: New builtin definitions.
2735         * convert.c (convert_to_integer): Convert to BUILT_IN_ICEIL,
2736         BUILT_IN_IFLOOR, BUILT_IN_IRINT or BUILT_INT_IROUND when converting
2737         to integer_type_node.
2738         * fold-const.c (tree_call_nonnegative_warnv_p): Handle BUILT_IN_ICEIL,
2739         BUILT_IN_IFLOOR, BUILT_IN_IRINT and BUILT_INT_IROUND.
2740         * builtins.c (expand_builtin_in): Ditto.
2741         (mathfn_built_in_1): Ditto.
2742         (expand_builtin_int_roundingfn): Handle BUILT_IN_ICEIL and
2743         BUILT_IN_IFLOOR.
2744         (expand_builtin_int_roundingfn_2): Handle BUILT_IN_IRINT and
2745         BUILT_IN_IROUND.
2746         (fold_fixed_mathfn): Canonicalize BUILT_IN_ICEIL, BUILTIN_IN_IFLOOR
2747         BUILT_IN_IRINT and BUILT_IN_IROUND to BUILT_IN_LCEIL,
2748         BUILTIN_IN_LFLOOR, BUILT_IN_LRINT and BUILT_IN_LROUND on ILP32 targets.
2749
2750 2011-08-12  Richard Guenther  <rguenther@suse.de>
2751
2752         * tree-vrp.c (extract_range_from_unary_expr_1): Implement -X as 0 - X.
2753
2754 2011-08-12  Romain Geissler  <romain.geissler@gmail.com>
2755
2756         * Makefile.in (PLUGIN_HEADERS): Add C_TREE_H.
2757
2758 2011-08-12  Richard Sandiford  <rdsandiford@googlemail.com>
2759
2760         * config/arm/arm.c (get_label_padding): New function.
2761         (create_fix_barrier, arm_reorg): Use it.
2762
2763 2011-08-11  Uros Bizjak  <ubizjak@gmail.com>
2764
2765         PR target/49781
2766         * config/i386/i386.md (*lea_5_zext): New.
2767         (*lea_6_zext): Ditto.
2768         * config/i386/predicates.md (const_32bit_mask): New predicate.
2769         (lea_address_operand): Reject AND.
2770         * config/i386/i386.c (ix86_decompose_address): Allow Dimode AND with
2771         const_32bit_mask immediate.
2772         (ix86_print_operand_address): Handle AND.
2773         (memory_address_length): Ditto.
2774
2775 2011-08-11  Romain Geissler  <romain.geissler@gmail.com>
2776             Brian Hackett  <bhackett1024@gmail.com>
2777
2778         * plugin.def: Add event for finish_decl.
2779         * plugin.c (register_callback, invoke_plugin_callbacks): Same.
2780         * c-decl.c (finish_decl): Invoke callbacks on above event.
2781         * doc/plugins.texi: Document above event.
2782
2783 2011-08-11  Richard Guenther  <rguenther@suse.de>
2784
2785         * tree-ssa-sccvn.c (vn_reference_lookup_3): Avoid redundant
2786         lookups, make looking through aggregate copies stronger.
2787
2788 2011-08-11  Richard Henderson  <rth@redhat.com>
2789
2790         PR bootstrap/50018
2791         * expr.c (fixup_args_size_notes): Accept and ignore normal calls.
2792
2793 2011-08-11  Richard Guenther  <rguenther@suse.de>
2794
2795         * lto-cgraph.c (input_node): Use DECL_BUILT_IN.
2796         * tree-vrp.c (stmt_interesting_for_vrp): Likewise.
2797         (vrp_visit_stmt): Likewise.
2798
2799 2011-08-11  Richard Guenther  <rguenther@suse.de>
2800
2801         PR middle-end/50040
2802         * gimplify.c (gimplify_modify_expr_complex_part): Mark the
2803         load of the other piece with TREE_NO_WARNING.
2804         * tree-flow.h (warn_uninit): Adjust prototype.
2805         * tree-ssa.c (warn_uninit): Take uninitialized SSA name,
2806         the base variable and the expression that is used separately.
2807         Properly query all TREE_NO_WARNING flags.
2808         (struct walk_data): Remove.
2809         (warn_uninitialized_var): Likewise.
2810         (warn_uninitialized_vars): Do not walk gimple pieces but simply
2811         look at all SSA uses of the statement.  Handle unused memory
2812         separately.
2813         * tree-ssa-uninit.c (warn_uninitialized_phi): Adjust.
2814
2815 2011-08-11   Kazuhiro Inaoka  <kazuhiro.inaoka.ud@renesas.com>
2816
2817         * config/rx/rx.md (movsicc): Allow register to register transfers.
2818         (*movsicc): Likewise.
2819         (*stcc): Restrict this pattern to EQ and NE compares.
2820         (*stcc_reg): New pattern.  Works for any comparison but only for
2821         register transfers.
2822
2823 2011-08-11   Diego Novillo  <dnovillo@google.com>
2824
2825         * tree-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers):
2826         Call stream_write_tree instead of output_record_start.
2827         (lto_output_ts_binfo_tree_pointers): Likewise.
2828
2829         * streamer-hooks.h (stream_write_tree): Move from tree-streamer.h.
2830         Convert it to a macro.
2831         (stream_read_tree): Likewise.
2832
2833         * lto-streamer.h (lto_stream_as_builtin_p): Move ...
2834         * tree-streamer.h (lto_stream_as_builtin_p): ... here.
2835
2836         * lto-streamer-in.c (lto_read_tree): Call lto_streamer_cache_append
2837         and tree_read_bitfields.
2838         * lto-streamer-out.c (lto_is_streamable): Move from lto-streamer.c
2839         (lto_write_tree): Call it.
2840         * lto-streamer.c (lto_is_streamable): Move to lto-streamer-out.c
2841         * streamer-hooks.h (struct streamer_hooks): Remove fields
2842         name, is_streamable and alloc_tree. Update all users.
2843         * tree-streamer-in.c (tree_read_bitfields): Factor out of ...
2844         (lto_materialize_tree): ... here.
2845         Handle CALL_EXPR codes.
2846         Remove call to lto_streamer_cache_append.
2847         * tree-streamer-out.c (lto_output_tree_header): Handle CALL_EXPR nodes.
2848         * tree-streamer.h (tree_read_bitfields): Declare.
2849
2850         * Makefile.in (TREE_STREAMER_H): Add STREAMER_HOOKS_H.
2851         (gimple-streamer-in.o): Add dependency on TREE_STREAMER_H.
2852         * tree-streamer.h (stream_read_tree): New.  Replace all calls
2853         to lto_input_tree with it.
2854         (stream_write_tree): New.  Replace all calls to lto_output_tree,
2855         lto_output_tree_ref and lto_output_tree_or_ref with it.
2856         * lto-streamer-in.c (lto_read_tree): Inline code from
2857         lto_streamer_read_tree.
2858         (lto_input_tree): Move from tree-streamer-in.c.
2859         * lto-streamer-out.c (lto_output_tree_ref): Make static.
2860         Remove handling of NULL values for EXPR.
2861         Do not handle EXPRs that are not indexable.
2862         (lto_write_tree): Move from tree-streamer-out.c.
2863         Inline lto_streamer_write_tree.
2864         (lto_output_tree): Move from tree-streamer-out.c.
2865         If REF_P is true and EXPR is indexable, call lto_output_tree_ref.
2866         * lto-streamer.c (lto_record_common_node): Move to tree-streamer.c.
2867         (lto_preload_common_nodes): Likewise.
2868         Remove assertions and adjustments for nodes
2869         main_identifier_node, ptrdiff_type_node and fileptr_type_node.
2870         (lto_streamer_hooks_init): Set streamer_hooks.write_tree to
2871         lto_output_tree and streamer_hooks.read_tree to lto_input_tree.
2872         * lto-streamer.h (lto_input_tree): Declare.
2873         (lto_output_tree_ref): Remove.
2874         * streamer-hooks.h (struct streamer_hooks): Remove fields
2875         preload_common_nodes, indexable_with_decls_p,
2876         pack_value_fields, unpack_value_fields and output_tree_header.
2877         Update all users.
2878         * tree-streamer-in.c (lto_materialize_tree): Make extern.
2879         (lto_input_tree_pointers): Likewise.
2880         (lto_read_tree): Move to lto-streamer-in.c.
2881         (lto_input_integer_cst): Make extern.
2882         (lto_get_pickled_tree): Likewise.
2883         (lto_get_builtin_tree): Likewise.
2884         (lto_input_tree): Move to lto-streamer-in.c.
2885         * tree-streamer-out.c (pack_value_fields): Make extern.
2886         (lto_output_tree_or_ref): Remove.  Replace all callers with
2887         calls to stream_write_tree.
2888         (lto_output_builtin_tree): Make extern.
2889         (lto_streamer_write_tree): Inline into lto_write_tree.
2890         (lto_output_tree_pointers): Make extern.
2891         (lto_output_tree_header): Likewise.
2892         (lto_output_integer_cst): Likewise.
2893         (lto_write_tree): Move to lto-streamer-out.c.
2894         (lto_output_tree): Likewise.
2895         * tree-streamer.c (lto_record_common_node): Move from lto-streamer.c
2896         (preload_common_nodes): Likewise.
2897         (lto_streamer_cache_create): Call it.
2898         * tree-streamer.h: Include streamer-hooks.h.
2899         (stream_write_tree): New.
2900         (stream_read_tree): New.
2901         (lto_input_tree): Remove.
2902         (lto_materialize_tree): Declare.
2903         (lto_input_tree_pointers): Declare.
2904         (lto_get_pickled_tree): Declare.
2905         (lto_get_builtin_tree): Declare.
2906         (lto_input_integer_cst): Declare.
2907         (lto_output_tree_header): Declare.
2908         (pack_value_fields): Declare.
2909         (lto_output_tree_pointers): Declare.
2910         (lto_output_integer_cst): Declare.
2911         (lto_output_builtin_tree): Declare.
2912
2913 2011-08-11  Sergey Grechanik  <mouseentity@ispras.ru>
2914
2915         * sel-sched-ir.c (has_dependence_note_reg_use): Call ds_full_merge
2916         only if producer writes to the register given by regno.
2917
2918 2011-08-11  Sergey Grechanik  <mouseentity@ispras.ru>
2919             Alexander Monakov  <amonakov@ispras.ru>
2920
2921         * sched-deps.c (sched_get_condition_with_rev): Rename to ...
2922         (sched_get_condition_with_rev_uncached): ... this.  Factor out
2923         condition caching logic into ...
2924         (sched_get_condition_with_rev): ... this.  Reimplement.  Do not
2925         attempt to use cache for instructions with zero luid.
2926         (sched_analyze_insn): Use INSN_CACHED_COND instead of INSN_COND.
2927         * sched-int.h (INSN_COND): Rename to INSN_CACHED_COND.
2928
2929 2011-08-11  Sergey Grechanik  <mouseentity@ispras.ru>
2930
2931         * sel-sched-ir.c (get_seqno_of_a_pred): Rename to
2932         get_seqno_for_a_jump.  Update the caller.
2933         (get_seqno_by_succs): New.  Use it ...
2934         (get_seqno_for_a_jump): ... here to find a seqno if looking at
2935         predecessors was not sufficient.
2936         (get_seqno_by_preds): Include head in iteration range, exclude insn.
2937
2938 2011-08-11  Dmitry Melnik  <dm@ispras.ru>
2939
2940         * sel-sched-ir.c (invalidate_av_set): Remove the assert.
2941
2942 2011-08-11  Sergey Grechanik  <mouseentity@ispras.ru>
2943
2944         * sel-sched-ir.h (register_unavailable_p): Declare.
2945         * sel-sched-ir.c (register_unavailable_p): New.  Use it...
2946         (set_unavailable_target_for_expr): ... here to properly test
2947         availability of a register.
2948         (speculate_expr): Ditto.
2949         * sel-sched.c (substitute_reg_in_expr): Ditto.
2950         (av_set_could_be_blocked_by_bookkeeping_p): Ditto.
2951
2952 2011-08-11  Sergey Grechanik  <mouseentity@ispras.ru>
2953
2954         * sel-sched.c (verify_target_availability): Fix usage of
2955         hard_regno_nregs.
2956
2957 2011-08-11  Dmitry Melnik  <dm@ispras.ru>
2958
2959         * sel-sched-ir.c (init_global_and_expr_for_insn): Forbid copying of
2960         recognized by cannot_copy_insn_p hook and volatile instructions.
2961
2962 2011-08-11  Dmitry Melnik  <dm@ispras.ru>
2963
2964         * sel-sched-ir.c (merge_expr_data): Take maximum spec.
2965
2966 2011-08-11  Richard Sandiford  <richard.sandiford@linaro.org>
2967
2968         * doc/md.texi (define_bypass): Say that the instruction names can
2969         be filename-style globs.
2970         * Makefile.in (FNMATCH_H): Define.
2971         (build/genattrtab.o, build/genautomata.o): Depend on $(FNMATCH_H).
2972         * genattrtab.c: Include fnmatch.h.
2973         (bypass_list): Change field name from "insn" to "pattern".
2974         (gen_bypass_1): Update accordingly.
2975         (process_bypasses): Use fnmatch to check for matches between
2976         insn reservations and define_bypasses.
2977         * genautomata.c: Include fnmatch.h.
2978         (bypass_decl): Rename in_insn_name and out_insn_name to in_pattern
2979         and out_pattern respectively.
2980         (gen_bypass, insert_bypass): Update accordingly.
2981         (for_each_matching_insn, process_bypass_2, process_bypass_1)
2982         (process_bypass): New functions.
2983         (process_decls): Use process_bypass.  Update after field name changes.
2984
2985 2011-08-11  Georg-Johann Lay  <avr@gjlay.de>
2986
2987         PR target/49687
2988         * config/avr/avr.md (smulqi3_highpart): New insn.
2989         (umulqi3_highpart): New insn.
2990         (*subqi3.ashiftrt7): New insn.
2991         (smulhi3_highpart): New expander.
2992         (umulhi3_highpart): Nex expander.
2993         (*smulhi3_highpart_call): New insn.
2994         (*umulhi3_highpart_call): New insn.
2995         (extend_u): New code attribute.
2996         (extend_prefix): Rename code attribute to extend_su.
2997         * config/avr/avr.c (avr_rtx_costs): Report costs of highpart of
2998         widening QI/HI multiply.
2999
3000 2011-08-11  Ira Rosen  <ira.rosen@linaro.org>
3001
3002         PR tree-optimization/50039
3003         * tree-vect-patterns.c (vect_operation_fits_smaller_type): Check
3004         that DEF_STMT has a stmt_vec_info.
3005
3006 2011-08-10  Richard Guenther  <rguenther@suse.de>
3007
3008         * tree.h (can_trust_pointer_alignment): Remove.
3009         * builtins.c (can_trust_pointer_alignment): Remove.
3010
3011 2011-08-10  Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
3012
3013         * c-typeck.c (scalar_to_vector): New function. Try scalar to
3014         vector conversion.
3015         (stv_conv): New enum for scalar_to_vector return type.
3016         (build_binary_op): Adjust.
3017         * doc/extend.texi: Description of scalar to vector expansion.
3018
3019 2011-08-10  Richard Guenther  <rguenther@suse.de>
3020
3021         * tree.h (get_pointer_alignment): Remove max-align argument.
3022         (get_object_alignment): Likewise.
3023         * builtins.c (get_object_alignment_1): Adjust.
3024         (get_object_alignment): Remove max-align argument.
3025         (get_pointer_alignment): Likewise.
3026         (expand_builtin_strlen): Adjust.
3027         (expand_builtin_memcpy): Likewise.
3028         (expand_builtin_mempcpy_args): Likewise.
3029         (expand_builtin_strncpy): Likewise.
3030         (expand_builtin_memset_args): Likewise.
3031         (expand_builtin_memcmp): Likewise.
3032         (expand_builtin_strcmp): Likewise.
3033         (expand_builtin_strncmp): Likewise.
3034         (get_builtin_sync_mem): Likewise.
3035         (fold_builtin_memset): Likewise.
3036         (fold_builtin_memory_op): Likewise.
3037         (expand_builtin_memory_chk): Likewise.
3038         * emit-rtl.c (get_mem_align_offset): Likewise.
3039         (set_mem_attributes_minus_bitpos): Likewise.
3040         * expr.c (expand_assignment): Likewise.
3041         (expand_expr_real_1): Likewise.
3042         * tree-sra.c (tree_non_mode_aligned_mem_p): Likewise.
3043         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
3044         * tree-ssa-loop-ivopts.c (may_be_unaligned_p): Likewise.
3045         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Likewise.
3046         * value-prof.c (gimple_stringops_transform): Likewise.
3047
3048 2011-08-10  Paulo J. Matos  <paulo.matos@csr.com>
3049
3050         * doc/tm.texi.in (CLASS_MAX_NREGS): Fix typo.
3051         * doc/tm.texi: Regenerate.
3052
3053 2011-08-10  Georg-Johann Lay  <avr@gjlay.de>
3054
3055         PR target/29560
3056         * config/avr/avr.md (*ashlhiqi3): New insn-and-split.
3057         (*ashl<extend_prefix>qihiqi3): New insn-and-splits.
3058         (*ashl<extend_prefix>qihiqi3.mem): New insn-and-splits.
3059         Add peephole2 to map ashlhi3 to ashlqi3 if high part of
3060         shift target is unused.
3061
3062 2011-08-10  Richard Guenther  <rguenther@suse.de>
3063
3064         PR tree-optimization/49937
3065         * tree-ssa-ccp.c (get_value_from_alignment): Re-implement
3066         using get_object_alignment_1.
3067
3068 2011-08-09  Uros Bizjak  <ubizjak@gmail.com>
3069
3070         * config/i386/i386.c (ix86_emit_i387_round): New function.
3071         * config/i386/i386-protos.h (ix86_emit_i387_round): Declare.
3072         * config/i386/i386.md (round<mode>2): Use X87MODEF mode iterator.
3073         Use ix86_emit_i387_round to expand round function for i387 math.
3074         (lround<X87MODEF:mode><SWI248x:mode>2): Use X87MODEF mode iterator.
3075         Use ix86_emit_i387_round to expand {l,ll}round function for i387 math.
3076
3077 2011-08-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3078
3079         * config/sync.c: Move to ../libgcc.
3080         * Makefile.in (libgcc.mvars): Remove LIBGCC_SYNC, LIBGCC_SYNC_CFLAGS.
3081         * config/mips/t-libgcc-mips16 (LIBGCC_SYNC, LIBGCC_SYNC_CFLAGS):
3082         Remove.
3083
3084 2011-08-09  Anatoly Sokolov  <aesok@post.ru>
3085
3086         * config/mmix/mmix.h (REGISTER_MOVE_COST): Remove macro.
3087         * config/mmix/mmix-protos.h (mmix_register_move_cost): Remove.
3088         * config/mmix/mmix.c (mmix_register_move_cost): Make static.
3089         Change 'from' and 'to' arguments type to reg_class_t.
3090         (TARGET_REGISTER_MOVE_COST): Define.
3091
3092 2011-08-09  Vladimir Makarov  <vmakarov@redhat.com>
3093
3094         PR target/50026
3095         Revert:
3096         PR rtl-optimization/49990
3097         * ira-costs.c (print_allocno_costs, print_pseudo_costs): Don't
3098         ignore classes which can not change mode.
3099         (find_costs_and_classes): Ditto.
3100
3101 2011-08-09  Richard Guenther  <rguenther@suse.de>
3102
3103         * tree-vrp.c (zero_nonzero_bits_from_vr): Also return precise
3104         information for ranges with only negative values.
3105         (extract_range_from_binary_expr_1): Adjust BIT_IOR_EXPR and
3106         BIT_AND_EXPR handling to handle ranges with negative values.
3107
3108 2011-08-09  Kirill Yukhin  <kirill.yukhin@intel.com>
3109
3110         * config/i386/i386.c: Remove traling spaces.
3111         * config/i386/sse.md: Likewise.
3112         (*fma_fmadd_<mode>): Fix insn alternative 1 mnemonic.
3113         (*fma_fmsub_<mode>): Likewise.
3114         (*fma_fnmadd_<mode>): Likewise.
3115         (*fma_fnmsub_<mode>): Likewise.
3116
3117 2011-08-09  Nick Clifton  <nickc@redhat.com>
3118
3119         * config/rx/rx.md: Disable extender peepholes at -O3.
3120
3121 2011-08-09  Uros Bizjak  <ubizjak@gmail.com>
3122
3123         PR target/49781
3124         * config/i386/i386.md (reload_noff_load): New.
3125         (reload_noff_store): Ditto.
3126         * config/i386/i386.c (ix86_secondary_reload): Use
3127         CODE_FOR_reload_noff_load and CODE_FOR_reload_noff_store to handle
3128         double-word moves from/to non-offsetable addresses instead of
3129         generating XMM temporary.
3130
3131 2011-08-09  Anatoly Sokolov  <aesok@post.ru>
3132
3133         * config/mmix/mmix.h (REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P): Remove.
3134
3135 2011-08-09  Ira Rosen  <ira.rosen@linaro.org>
3136
3137         PR tree-optimization/50014
3138         * tree-vect-loop.c (vectorizable_reduction): Get def type before
3139         calling vect_get_vec_def_for_stmt_copy ().
3140
3141 2011-08-08  Vladimir Makarov  <vmakarov@redhat.com>
3142
3143         PR rtl-optimization/49990
3144         * ira-costs.c (print_allocno_costs, print_pseudo_costs): Don't
3145         ignore classes which can not change mode.
3146         (find_costs_and_classes): Ditto.
3147
3148 2011-08-08  Richard Henderson  <rth@redhat.com>
3149
3150         PR middle-end/49990
3151         * config/i386/i386.c (ix86_expand_prologue): Call
3152         for SEH target gen_prologue_use instead of gen_blockage
3153         at prologue's end.
3154
3155 2011-08-08  Martin Jambor  <mjambor@suse.cz>
3156
3157         PR middle-end/49923
3158         * tree-sra.c (access_precludes_ipa_sra_p): Also check access
3159         memory alignment.
3160
3161 2011-08-08   Diego Novillo  <dnovillo@google.com>
3162
3163         * Makefile.in (LTO_STREAMER_H): Add DIAGNOSTIC_H.
3164         (DATA_STREAMER_H): New.
3165         (GIMPLE_STREAMER_H): New.
3166         (TREE_STREAMER_H): New.
3167         (STREAMER_HOOKS_H): New.
3168         (OBJS): Add data-streamer.o, data-streamer-in.o, data-streamer-out.o,
3169         gimple-streamer-in.o, gimple-streamer-out.o, streamer-hooks.o,
3170         tree-streamer.o, tree-streamer-in.o and tree-streamer-out.o.
3171         (data-streamer.o): New.
3172         (data-streamer-in.o): New.
3173         (data-streamer-out.o): New.
3174         (gimple-streamer-in.o): New.
3175         (gimple-streamer-out.o): New.
3176         (streamer-hooks.o): New.
3177         (tree-streamer.o): New.
3178         (tree-streamer-in.o): New.
3179         (tree-streamer-out.o): New.
3180         (lto-cgraph.o): Add dependency on DATA_STREAMER_H and TREE_STREAMER_H.
3181         (lto-streamer-in.o): Add dependency on DATA_STREAMER_H,
3182         GIMPLE_STREAMER_H and TREE_STREAMER_H.
3183         (lto-streamer-out.o): Add dependency on DATA_STREAMER_H,
3184         GIMPLE_STREAMER_H and TREE_STREAMER_H.
3185         (lto-streamer.o): Add dependency on STREAMER_HOOKS_H.
3186         (ipa-prop.o): Add dependency on DATA_STREAMER_H and TREE_STREAMER_H.
3187         (ipa-inline-analysis.o): Likewise.
3188         (ipa-pure-const.o): Likewise.
3189         * data-streamer-in.c: New.
3190         * data-streamer-out.c: New.
3191         * data-streamer.c: New.
3192         * data-streamer.h: New.
3193         * gimple-streamer-in.c: New.
3194         * gimple-streamer-out.c: New.
3195         * gimple-streamer.h: New.
3196         * ipa-inline-analysis.c: Include data-streamer.h.
3197         * ipa-prop.c: Include data-streamer.h.
3198         * ipa-pure-const.c: Include data-streamer.h.
3199         * lto-cgraph.c: Include data-streamer.h.
3200         * lto-section-in.c (lto_input_uleb128): Move to data-streamer-in.c.
3201         (lto_input_widest_uint_uleb128): Likewise.
3202         (lto_input_sleb128): Likewise.
3203         (bp_unpack_var_len_unsigned): Likewise.
3204         (bp_unpack_var_len_int): Likewise.
3205         * lto-section-out.c (lto_output_uleb128_stream): Move to
3206         data-streamer-out.c.
3207         (lto_output_widest_uint_uleb128_stream): Likewise.
3208         (lto_output_sleb128_stream): Likewise.
3209         (bp_pack_var_len_unsigned): Likewise.
3210         (bp_pack_var_len_int): Likewise.
3211         * lto-streamer-in.c: Include data-streamer.h and gimple-streamer.h.
3212         (struct string_slot): Remove.  Update all users.
3213         (lto_tag_check_set): Make extern.
3214         (lto_tag_check_range): Move to lto-streamer.h.
3215         (lto_tag_check): Likewise.
3216         (hash_string_slot_node): Remove.  Update all users.
3217         (eq_string_slot_node): Remove.  Update all users.
3218         (string_for_index): Move to data-streamer-in.c
3219         (input_string_internal): Likewise.
3220         (input_string_cst): Move to tree-streamer-in.c.
3221         (input_identifier): Likewise.
3222         (lto_input_string): Move to data-streamer-in.c
3223         (input_record_start): Move to data-streamer.h
3224         (canon_file_name): Use new definition of struct string_slot
3225         from data-streamer.h.  Set S_SLOT.LEN.
3226         (lto_input_location): Make extern.
3227         (lto_input_chain): Move to tree-streamer-in.c.
3228         (lto_init_eh): Make extern.
3229         (input_phi): Move to gimple-streamer-in.c.
3230         (input_gimple_stmt): Likewise.
3231         (input_bb): Likewise.
3232         (unpack_ts_base_value_fields): Move to tree-streamer-in.c.
3233         (unpack_ts_real_cst_value_fields): Likewise.
3234         (unpack_ts_fixed_cst_value_fields): Likewise.
3235         (unpack_ts_decl_common_value_fields): Likewise.
3236         (unpack_ts_decl_wrtl_value_fields): Likewise.
3237         (unpack_ts_decl_with_vis_value_fields): Likewise.
3238         (unpack_ts_function_decl_value_fields): Likewise.
3239         (unpack_ts_type_common_value_fields): Likewise.
3240         (unpack_ts_block_value_fields): Likewise.
3241         (unpack_ts_translation_unit_decl_value_fields): Likewise.
3242         (unpack_value_fields): Likewise.
3243         (lto_materialize_tree): Likewise.
3244         (lto_input_ts_common_tree_pointers): Likewise.
3245         (lto_input_ts_vector_tree_pointers): Likewise.
3246         (lto_input_ts_complex_tree_pointers): Likewise.
3247         (lto_input_ts_decl_minimal_tree_pointers): Likewise.
3248         (lto_input_ts_decl_common_tree_pointers): Likewise.
3249         (lto_input_ts_decl_non_common_tree_pointers): Likewise.
3250         (lto_input_ts_decl_with_vis_tree_pointers): Likewise.
3251         (lto_input_ts_field_decl_tree_pointers): Likewise.
3252         (lto_input_ts_function_decl_tree_pointers): Likewise.
3253         (lto_input_ts_type_common_tree_pointers): Likewise.
3254         (lto_input_ts_type_non_common_tree_pointers): Likewise.
3255         (lto_input_ts_list_tree_pointers): Likewise.
3256         (lto_input_ts_vec_tree_pointers): Likewise.
3257         (lto_input_ts_exp_tree_pointers): Likewise.
3258         (lto_input_ts_block_tree_pointers): Likewise.
3259         (lto_input_ts_binfo_tree_pointers): Likewise.
3260         (lto_input_ts_constructor_tree_pointers): Likewise.
3261         (lto_input_ts_target_option): Likewise.
3262         (lto_input_ts_translation_unit_decl_tree_pointers): Likewise.
3263         (lto_input_tree_pointers): Likewise.
3264         (lto_get_pickled_tree): Likewise.
3265         (lto_get_builtin_tree): Likewise.
3266         (lto_read_tree): Likewise.
3267         (lto_input_integer_cst): Likewise.
3268         (lto_input_tree): Likewise.
3269         * lto-streamer-out.c: Include data-streamer.h,
3270         gimple-streamer.h and streamer-hooks.h.
3271         (struct string_slot): Move to data-streamer.h.
3272         (hash_string_slot_node): Likewise.
3273         (eq_string_slot_node): Likewise.
3274         (lto_string_index): Move to data-streamer-out.c.
3275         (lto_output_string_with_length): Likewise.
3276         (lto_output_string): Likewise.
3277         (output_string_cst): Move to tree-streamer-out.c.
3278         (output_identifier): Likewise.
3279         (output_zero): Move to data-streamer-out.c
3280         (output_uleb128): Likewise.
3281         (output_sleb128): Likewise.
3282         (output_record_start): Move to data-streamer.h
3283         (pack_ts_base_value_fields): Move to tree-streamer-out.c.
3284         (pack_ts_real_cst_value_fields): Likewise.
3285         (pack_ts_fixed_cst_value_fields): Likewise.
3286         (pack_ts_decl_common_value_fields): Likewise.
3287         (pack_ts_decl_wrtl_value_fields): Likewise.
3288         (pack_ts_decl_with_vis_value_fields): Likewise.
3289         (pack_ts_function_decl_value_fields): Likewise.
3290         (pack_ts_type_common_value_fields): Likewise.
3291         (pack_ts_block_value_fields): Likewise.
3292         (pack_ts_translation_unit_decl_value_fields): Likewise.
3293         (pack_value_fields): Likewise.
3294         (lto_output_chain): Likewise.
3295         (lto_output_ts_common_tree_pointers): Likewise.
3296         (lto_output_ts_vector_tree_pointers): Likewise.
3297         (lto_output_ts_complex_tree_pointers): Likewise.
3298         (lto_output_ts_decl_minimal_tree_pointers): Likewise.
3299         (lto_output_ts_decl_common_tree_pointers): Likewise.
3300         (lto_output_ts_decl_non_common_tree_pointers): Likewise.
3301         (lto_output_ts_decl_with_vis_tree_pointers): Likewise.
3302         (lto_output_ts_field_decl_tree_pointers): Likewise.
3303         (lto_output_ts_function_decl_tree_pointers): Likewise.
3304         (lto_output_ts_type_common_tree_pointers): Likewise.
3305         (lto_output_ts_type_non_common_tree_pointers): Likewise.
3306         (lto_output_ts_list_tree_pointers): Likewise.
3307         (lto_output_ts_vec_tree_pointers): Likewise.
3308         (lto_output_ts_exp_tree_pointers): Likewise.
3309         (lto_output_ts_block_tree_pointers): Likewise.
3310         (lto_output_ts_binfo_tree_pointers): Likewise.
3311         (lto_output_ts_constructor_tree_pointers): Likewise.
3312         (lto_output_ts_target_option): Likewise.
3313         (lto_output_ts_translation_unit_decl_tree_pointers): Likewise.
3314         (lto_output_tree_pointers): Likewise.
3315         (lto_output_tree_header): Likewise.
3316         (lto_output_builtin_tree): Likewise.
3317         (lto_write_tree): Likewise.
3318         (lto_output_integer_cst): Likewise.
3319         (lto_output_tree): Likewise.
3320         (output_phi): Move to gimple-streamer-out.c.
3321         (output_gimple_stmt): Likewise.
3322         (output_bb): Likewise.
3323         * lto-streamer.c: Include tree-streamer.h and streamer-hooks.h.
3324         (streamer_hooks): Move to streamer-hooks.c.
3325         (check_handled_ts_structures): Move to tree-streamer.c
3326         (lto_streamer_cache_add_to_node_array): Likewise.
3327         (lto_streamer_cache_insert_1): Likewise.
3328         (lto_streamer_cache_insert): Likewise.
3329         (lto_streamer_cache_insert_at): Likewise.
3330         (lto_streamer_cache_append): Likewise.
3331         (lto_streamer_cache_lookup): Likewise.
3332         (lto_streamer_cache_get): Likewise.
3333         (lto_record_common_node): Likewise.
3334         (lto_preload_common_nodes): Likewise.
3335         (lto_streamer_cache_create): Likewise.
3336         (lto_streamer_cache_delete): Likewise.
3337         (streamer_hooks_init): Move to streamer-hooks.c.
3338         * lto-streamer.h: Include diagnostic.h
3339         (struct output_block, struct lto_input_block,
3340         struct data_in, struct bitpack_d): Remove forward declarations.
3341         (struct bitpack_d): Move to data-streamer.h.
3342         (struct lto_streamer_cache_d): Move to tree-streamer.h.
3343         (struct streamer_hooks): Move to streamer-hooks.h.
3344         (bp_pack_var_len_unsigned): Move to data-streamer.h.
3345         (bp_pack_var_len_int): Likewise.
3346         (bp_unpack_var_len_unsigned): Likewise.
3347         (bp_unpack_var_len_int): Likewise.
3348         (lto_input_location): Declare.
3349         (lto_tag_check_set): Declare.
3350         (lto_init_eh): Declare.
3351         (lto_output_tree_ref): Declare.
3352         (lto_output_location): Declare.
3353         (bitpack_create): Move to data-streamer.h.
3354         (bp_pack_value): Likewise.
3355         (lto_output_bitpack): Likewise.
3356         (lto_input_bitpack): Likewise.
3357         (bp_unpack_value): Likewise.
3358         (lto_output_1_stream): Likewise.
3359         (lto_input_1_unsigned): Likewise.
3360         (lto_output_int_in_range): Likewise.
3361         (lto_input_int_in_range): Likewise.
3362         (bp_pack_int_in_range): Likewise.
3363         (bp_unpack_int_in_range): Likewise.
3364         (lto_output_enum): Likewise.
3365         (lto_input_enum): Likewise.
3366         (bp_pack_enum): Likewise.
3367         (bp_unpack_enum): Likewise.
3368         * streamer-hooks.c: New.
3369         * streamer-hooks.h: New.
3370         * tree-streamer-in.c: New.
3371         * tree-streamer-out.c: New.
3372         * tree-streamer.c: New.
3373         * tree-streamer.h: New.
3374
3375 2011-08-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3376
3377         * gthr-posix95.h: Remove.
3378         * gthr.h [_PTHREADS95]: Remove.
3379         * configure.ac (enable_threads): Remove posix95.
3380         * configure: Regenerate.
3381         * doc/install.texi (Configuration, --enable-threads): Remove posix95.
3382
3383 2011-08-08  Uros Bizjak  <ubizjak@gmail.com>
3384
3385         PR target/49781
3386         * config/i386/i386.c (ix86_decompose_address): Allow zero-extended
3387         SImode addresses.
3388         (ix86_print_operand_address): Handle zero-extended addresses.
3389         (memory_address_length): Add length of addr32 prefix for
3390         zero-extended addresses.
3391         (ix86_secondary_reload): Handle moves to/from double-word general
3392         registers from/to zero-extended addresses.
3393         * config/i386/predicates.md (lea_address_operand): Reject
3394         zero-extended operands.
3395
3396 2011-08-08  H.J. Lu  <hongjiu.lu@intel.com>
3397
3398         PR other/48007
3399         * config.gcc (libgcc_tm_file): Add i386/value-unwind.h for Linux/x86.
3400
3401         * system.h (REG_VALUE_IN_UNWIND_CONTEXT): Poisoned.</