* simplify-rtx.c (simplify_subreg): Simplify truncations of shifts
[official-gcc.git] / gcc / ChangeLog
blob965fe599e17785792455bd9aebdfb73ddd5e7051
1 2005-01-06  Roger Sayle  <roger@eyesopen.com>
3         * simplify-rtx.c (simplify_subreg): Simplify truncations of shifts
4         of sign or zero extended values.
6 2005-01-06  Geoffrey Keating  <geoffk@apple.com>
8         * c-cppbuiltin.c (builtin_define_float_constants): Set __*_EPSILON__
9         for IBM long double format correctly.
11 2005-01-06  Daniel Berlin <dberlin@dberlin.org>
12         
13         Fix PR tree-optimization/18792
15         * tree-data-ref.c (build_classic_dist_vector): Change first_loop
16         to first_loop_depth, and use loop depth instead of loop number.
17         (build_classic_dir_vector): Ditto.
18         (compute_data_dependences_for_loop): Use depth, not loop number.
19         * tree-loop-linear.c (try_interchange_loops): Use loop depth, not loop 
20         number. Pass in loops, instead of loop numbers.
21         (gather_interchange_stats): Ditto.
22         (linear_transform_loops): Ditto.
24 2005-01-06  Richard Sandiford  <rsandifo@redhat.com>
26         PR rtl-opt/13299
27         * loop.c (get_monotonic_increment, biased_biv_fits_mode_p,
28         biv_fits_mode_p, extension_within_bounds_p): New functions.
29         (check_ext_dependent_givs): Use them.
31 2005-01-06  Roger Sayle  <roger@eyesopen.com>
33         * cfgrtl.c (rtl_delete_block): A basic block may be followed by
34         more than one barrier, in which case we should delete them all.
36 2005-01-06  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
38         * gcc.c (process_command): Change year in 'gcc --version' to 2005.
40 2005-01-05  Daniel Berlin  <dberlin@dberlin.org>
41         
42         Fix PR middle-end/19286
43         Fix PR debug/19267
44         * dwarf2out.c (gen_subprogram_die): If we've already tried to
45         output this subprogram, simply ignore this attempt to do it again.
46         (add_abstract_origin_attribute): Don't abort trying to add the abstract
47         origin attribute if it's not possible.
48         (gen_block_die): Don't ignore subblocks of "unused" blocks.
49         (decls_for_scope): Ditto.
50         * gimple-low.c (mark_blocks_with_used_subblocks): Remove.
51         (mark_used_blocks): Don't call mark_blocks_with_used_subblocks.
52         
53 2005-01-05  Richard Henderson  <rth@redhat.com>
55         PR target/11327
56         * config/i386/i386.c (BUILTIN_DESC_SWAP_OPERANDS): New.
57         (bdesc_2arg): Use it.
58         (ix86_expand_binop_builtin): Force operands into registers
59         when optimizing.
60         (ix86_expand_unop_builtin, ix86_expand_unop1_builtin,
61         ix86_expand_sse_compare, ix86_expand_sse_comi, 
62         ix86_expand_builtin): Likewise.
64 2005-01-05  Richard Henderson  <rth@redhat.com>
66         * config/ia64/ia64.c (rtx_needs_barrier): Handle CONST_VECTOR
67         and VEC_SELECT.
68         * config/ia64/vect.md (mulv8qi3): Re-implement with mix_[rl].
69         (mulv4hi3): Set itanium_class mmmul.
70         (fpack_sfxf, fpack_xfsf, fpack_xfxf): Remove.
71         (fpack): Rename from fpack_sfsf.
73 2005-01-05  Richard Henderson  <rth@redhat.com>
75         PR rtl-opt/10692
76         * reload1.c (do_input_reload): Restrict the optimization deleteing
77         a previous output reload to RELOAD_FOR_INPUT.
79 2005-01-05  Steven Bosscher  <stevenb@suse.de>
81         * combine.c (expand_compound_operation)  <ZERO_EXTRACT>: Add
82         comment that we fall through after case.
83         (mark_used_regs_combine): Don't expect a SIGN_EXTRACT in a SET_DEST.
84         (distribute_links): Likewise.
85         * cse.c (cse_insn): Likewise.
86         * cselib.c (cselib_invalidate_mem): Likewise.
87         * df.c: Update comments at the top of the file.
88         (read_modify_subreg_p): Update comments here too.
89         (df_def_record_1): Don't expect a SIGN_EXTRACT in a SET_DEST.
90         * flow.c (mark_set_1): Likewise.
91         (mark_used_regs): Likewise.
92         * gcse.c (mems_conflict_for_gcse_p): Likewise.
93         (canon_list_insert): Likewise.
94         (mark_set): Likewise.
95         (try_replace_reg): Likewise.
96         (store_killed_in_insn): Likewise.
97         * loop.c (count_one_set): Likewise.
98         (basic_induction_var): Likewise.
99         * postreload-gcse.c (find_mem_conflicts): Likewise.
100         * postreload.c (reload_combine_note_store): Likewise.
101         (move2add_note_store): Likewise.
102         * reload.c (find_equiv_reg): Likewise.
103         (mark_referenced_resources): Likewise.
104         * rtlanal.c (set_noop_p): Likewise.
105         (note_stores): Likewise.
106         (note_uses): Likewise.
107         * sched-deps.c (sched_analyze_1): Likewise.
108         * sched-rgn.c (check_live_1): Likewise.
109         (update_live_1): Likewise.
110         * config/i860/i860.c: Likewise.
112         * rtl.dec (SIGN_EXTRACT): Document that this cannot appear as
113         an lvalue.
114         (ZERO_EXTRACT): Mention that this one can be an lvalue.
116         * doc/rtl.texi: Update documentation for bit-fields and SET.
118 2005-01-05  Roger Sayle  <roger@eyesopen.com>
120         * ifcvt.c (find_if_case_1): Revert 2005-01-04 change.
122 2005-01-05  Jan Hubicka  <jh@suse.cz>
123             Richard Henderson  <rth@redhat.com>
125         PR target/18910
126         * config/i386/i386.c (ix86_expand_move): Handle tls symbols 
127         with an offset.
129 2005-01-05  Richard Henderson  <rth@redhat.com>
131         PR target/12902
132         * config/i386/i386.md (sse_movhps, sse_movlps): Remove.
133         (sse_shufps): Change operand 3 to const_int_operand.
134         (sse2_storelps): Fix typo in template.
135         (sse_storehps, sse_loadhps, sse_storelps, sse_loadlps): New.
136         * config/i386/i386.c (ix86_expand_vector_move_misalign): Use them.
137         (ix86_expand_builtin): Likewise.
139 2005-01-05  Julian Brown  <julian@codesourcery.com>
141         * config/arm/arm.c (arm_return_in_memory): Treat complex types
142         as aggregates for AAPCS ABIs.
144 2005-01-05  Stan Shebs  <shebs@apple.com>
146         * unwind-dw2-fde-darwin.c (examine_objects): Use 64-bit
147         Mach-O getters if ppc64.
148         * config/darwin.c (darwin_asm_output_dwarf_delta): Obey
149         size argument.
150         * config/darwin.h (ASM_PREFERRED_EH_DATA_FORMAT): Use
151         signed four-byte field for global code case.
152         (STARTFILE_SPEC): Avoid crt2.o for 64-bit compilation.
154 2005-01-05  Roger Sayle  <roger@eyesopen.com>
156         PR middle-end/19100
157         * c-common.c: Include real.h.
158         (c_common_truthvalue_conversion): Avoid destructively modifying expr.
159         Correctly handle TREE_CONSTANT_OVERFLOW for INTEGER_CST.
160         Correctly handle TREE_CONSTANT_OVERFLOW and NaNs for REAL_CST.
161         * Makefile.in (c-common.o): Update dependencies.
163 2005-01-05  Joseph S. Myers  <joseph@codesourcery.com>
165         * c-parse.in (asm_string): Add trailing semicolon.
167 2005-01-05  Joseph S. Myers  <joseph@codesourcery.com>
169         * c-parse.in (asm_string): New.  Don't allow wide strings in
170         'asm'.
171         (simple_asm_expr, asm_argument, asm_operand, asm_clobbers): Use
172         asm_string instead of STRING.
174 2005-01-05  Joseph S. Myers  <joseph@codesourcery.com>
176         * c-typeck.c (constructor_no_implicit): Remove.
177         (set_designator, process_init_element): Don't check
178         constructor_no_implicit.
180 2005-01-05  J"orn Rennecke <joern.rennecke@st.com>
181             Kaz Kojima  <kkojima@gcc.gnu.org>
183         PR target/16482
184         * lcm.c (create_pre_exit): New.
185         (optimize_mode_switching): In MODE_ENTRY / MODE_EXIT case, set
186         ENTRY_EXIT_EXTRA to 3.  Use create_pre_exit.
188 2004-01-05  Richard Earnshaw  <rearnsha@arm.com>
190         * arm.h (TARGET_OPTIONS): Correctly record -mhard-float and
191         -msoft-float in target_float_switch.
192         * arm.c (arm_override_options): Fix processing of target_float_switch.
194 2004-01-05  Richard Earnshaw  <rearnsha@arm.com>
196         * arm/vfp.md (arm_movsi_vfp): Hide VFP register classes from register
197         preferencing.
199 2004-01-05  Uros Bizjak  <uros@kss-loka.si>
201         * doc/invoke.texi (Intel 386 and AMD x86-64 Options):
202         Replace i387 with 'i386 compiler' in -mfpmath=sse option.
204 2005-01-04  Roger Sayle  <roger@eyesopen.com>
206         * ifcvt.c (find_if_case_1): Avoid creating an empty forwarder block,
207         if deleting the then-block allows the test-block to fallthru to the
208         else-block.
210 2005-01-04  Andrew Pinski  <pinskia@physics.uc.edu>
212         PR c/19152
213         * c-decl.c (diagnose_mismatched_decls): Accept "extern inline" declared
214         after the full declaration if the are in two different TUs.
216 2005-01-04  Richard Henderson  <rth@redhat.com>
218         PR tree-opt/19158
219         * tree-sra.c (generate_one_element_init): Just
220         call gimplify_and_add.
221         (generate_element_init): Record the
222         new referenced variables and mark them for renaming
223         and split out to ...
224         (generate_element_init_1): This.
225         (scalarize_init): Don't call push_gimplify_context/
226         pop_gimplify_context.
228 2005-01-04  Geoffrey Keating  <geoffk@apple.com>
230         * toplev.c (get_src_pwd): Handle failure of getpwd().
232 2005-01-04  Roger Sayle  <roger@eyesopen.com>
234         * fold-const.c (fold_single_bit_test): Delete unreachable handling
235         of TRUTH_NOT_EXPR.
236         (fold): Don't call fold_single_bit_test with a TRUTH_NOT_EXPR, as
237         all the cases handled by it are inverted by invert_truthvalue.
239 2005-01-04  Eric Botcazou  <ebotcazou@libertysurf.fr>
241         * config/sparc/sparc.md (save_register_windowdi): Add missing mode.
242         (save_register_windowsi): Likewise.
244 2005-01-04  Richard Henderson  <rth@redhat.com>
246         * tree-mudflap.c (mf_varname_tree): Fix thinko setting declname.
248 2005-01-04  Uros Bizjak  <uros@kss-loka.si>
250         PR middle-end/17767
251         * cse.c (fold_rtx) [RTX_COMPARE, RTX_COMM_COMPARE]: Don't attempt
252         any simplifications of vector mode comparison operators.
253         * simplify-rtx.c (simplify_relational_operation): Fix variable name.
255 2005-01-04  Paolo Bonzini  <bonzini@gnu.org>
256             Devang Patel  <dpatel@apple.com>
258         PR tree-optimization/18308
259         * tree-if-conv.c (add_to_dst_predicate_list): Gimplify
260         the operands before creating a new expression.
261         * dojump.c (do_jump): Make drop_through_label available
262         for all cases.  Add expansion of COND_EXPR.
264 2005-01-04  Ira Rosen  <irar@il.ibm.com>
266         * tree-vectorizer.c (vect_analyze_offset_expr): Test for
267         INTEGER_CST instead of TREE_CONSTANT.
268         (vect_gen_niters_for_prolog_loop): Test for INTEGER_CST
269         instead of TREE_CONSTANT.
270         (vect_analyze_pointer_ref_access): Test for INTEGER_CST
271         instead of TREE_CONSTANT.
273 2005-01-04  Eric Botcazou  <ebotcazou@libertysurf.fr>
275         * tree-eh.c (replace_goto_queue): Return early if the queue is empty.
277 2005-01-04  Uros Bizjak  <uros@kss-loka.si>
279         PR target/19240
280         * config/i386/i386.md (*fop_df_1_i387): Disable for TARGET_SSE_MATH.
281         (*fop_df_1_i387): Disable for (TARGET_SSE2 && TARGET_SSE_MATH).
283 2005-01-03  Richard Henderson  <rth@redhat.com>
285         * fold-const.c (force_fit_type): Cope with types larger than 2 HWI.
286         (fold_convert_const_int_from_int, fold_convert_const_int_from_real,
287         fold_convert_const_real_from_real): Split out from ...
288         (fold_convert_const): ... here.
290 2005-01-03  Richard Henderson  <rth@redhat.com>
292         PR target/19235
293         * config/i386/i386.md (movdi_2): Separate SSE1 and SSE2 alternatives.
294         (mov<MMXMODEI>_internal): Likewise.
295         (movdf_nointeger): Prefer Y while not preferring, but allowing, x.
296         Add V2SF case; use it for SSE1; don't use TI.
297         (movdf_integer): Likewise.
298         (mov<SSEMODEI>_internal, movti_internal): Force V4SF for SSE1.
300 2005-01-03  Ira Rosen  <irar@il.ibm.com>
302         * tree-vectorizer.c (vect_strip_conversions): New function.
303         (vect_analyze_offset_expr): Call vect_strip_conversions. Add
304         check for binary class. 
306 2005-01-03  Daniel Berlin  <dberlin@dberlin.org>
308         Fix PR debug/17924
309         Fix PR debug/19191
310         * dwarf2out.c (block_ultimate_origin): Follow decl origin if origin
311         is a decl.
312         * gimple-low.c (mark_blocks_with_used_vars): New function.
313         (mark_blocks_with_used_subblocks): Ditto.
314         (mark_used_blocks): Ditto.
315         (pass_mark_used_blocks): New pass.
316         * tree-inline.c: Include debug.h.
317         (expand_call_inline): Call outlining_inline_function here.
318         * tree-optimize.c (init_tree_optimization_passes): Add
319         pass_mark_used_blocks. 
320         * tree-pass.h (pass_mark_used_blocks): New.
321         * Makefile.in (tree-inline.o): Add debug.h dependency.
323 2005-01-03  Geoffrey Keating  <geoffk@apple.com>
325         * config/darwin.c (darwin_handle_weak_import_attribute): Permit
326         VAR_DECLs to have weak_import attribute.
328         * config/rs6000/darwin-fallback.c: Use 'ucontext_t' rather than
329         'struct ucontext'.
331 2004-01-03  Steven Bosscher  <stevenb@suse.de>
333         * passes.c (rest_of_compilation): Don't run regmove if only
334         flag_expensive_optimizations, require flag_regmove instead.
336 2005-01-03  Eric Botcazou  <ebotcazou@libertysurf.fr>
338         * config/sparc/litecoff.h (TARGET_OS_CPP_BUILTINS): Do not
339         register "sparc".
340         * config/sparc/sysv4-only.h (TARGET_OS_CPP_BUILTINS): Likewise.
341         * config/sparc/rtemself.h (TARGET_SUB_OS_CPP_BUILTINS): Likewise.
342         * config/sparc/sol2-64.h (TARGET_SUB_OS_CPP_BUILTINS): Delete.
343         * config/sparc/sp64-elf.h (TARGET_SUB_OS_CPP_BUILTINS): Likewise.
345 2005-01-03  Richard Henderson  <rth@redhat.com>
347         * config/ia64/ia64.c (TARGET_VECTOR_MODE_SUPPORTED_P): New.
348         (ia64_const_ok_for_letter_p): New.
349         (ia64_const_double_ok_for_letter_p): New.
350         (ia64_extra_constraint): New.
351         (ia64_expand_vecint_compare): New.
352         (ia64_expand_vcondu_v2si): New.
353         (ia64_expand_vecint_cmov): New.
354         (ia64_expand_vecint_minmax): New.
355         (ia64_print_operand): Add 'v'.
356         (ia64_preferred_reload_class): New.
357         (ia64_vector_mode_supported_p): New.
358         * config/ia64/ia64.h (UNITS_PER_SIMD_WORD): New.
359         (PREFERRED_RELOAD_CLASS): Move to function.
360         (CONST_OK_FOR_LETTER_P): Move to function.
361         (CONST_DOUBLE_OK_FOR_LETTER_P): Move to function.
362         (CONSTRAINT_OK_FOR_Q, CONSTRAINT_OK_FOR_R): Remove.
363         (CONSTRAINT_OK_FOR_S, CONSTRAINT_OK_FOR_T): Remove.
364         (EXTRA_CONSTRAINT): Move to function.
365         * config/ia64/ia64.md: Include vect.md.
366         (itanium_class): Add mmalua.
367         (type): Handle it.
368         * config/ia64/itanium1.md (1_mmalua): New.  Add it to bypasses.
369         (1b_mmalua): New.
370         * config/ia64/itanium2.md (2_mmalua, 2b_mmalua): Similarly.
371         * config/ia64/predicates.md (gr_reg_or_0_operand): Accept any
372         CONST0_RTX.
373         (const_int_2bit_operand): New.
374         (fr_reg_or_0_operand): New.
375         * config/ia64/ia64-modes.def: Add vector modes.
376         * config/ia64/ia64-protos.h: Update.
377         * config/ia64/vect.md: New file.
379 2005-01-03  Richard Henderson  <rth@redhat.com>
381         * simplify-rtx.c (simplify_binary_operation): Handle VEC_CONCAT.
383 2005-01-03  Uros Bizjak  <uros@kss-loka.si>
385         PR target/19236
386         * config/i386/i386.c (log1psf2): Change mode of operands[0,1]
387         to SFmode.
388         (log1pdf2): Change mode of operands[0,1] to DFmode.
390 2005-01-03  Eric Botcazou  <ebotcazou@libertysurf.fr>
392         * config/sparc/sparc.h (SPARC_RELAXED_ORDERING): Define to false.
393         * config/sparc/linux.h (SPARC_RELAXED_ORDERING): Define to true.
394         * config/sparc/linux64.h (SPARC_RELAXED_ORDERING): Likewise.
395         * config/sparc/sparc.c (TARGET_RELAXED_ORDERING): Define to
396         SPARC_RELAXED_ORDERING.
398 2005-01-03  Richard Henderson  <rth@redhat.com>
399             Uros Bizjak  <uros@kss-loka.si>
401         PR target/14631
402         * config/i386/i386.c (ix86_expand_builtin): [IX86_BUILTIN_PINSRW,
403         IX86_BUILTIN_PINSRW128]: Fix wrong selector range in error message.
404         * config/i386/i386.md (mmx_pinsrw, sse2_pinsrw): Fix selector
405         handling.
406         (*mmx_pinsrw, *sse2_pinsrw): New patterns.
407         * config/i386/i386/predicates.md (const_pow2_1_to_8_operand,
408         const_pow2_1_to_128_operand): New predicates.
410 2005-01-02  Greg McGary  <greg@mcgary.org>
412         * tree-mudflap.c (mf_varname_tree): decl_printable_name handles
413         anonymous decls.
414         (mf_xform_derefs_1) [RESULT_DECL, STRING_CST]: Handle as innermost
415         object.  [ptr_type]: Remove unused variable.
416         Remember nearest addressable array-element or record-component
417         when checking bitfield components.  Tolerate empty BIND_EXPR.
419 2005-01-01  Richard Henderson  <rth@redhat.com>
421         * tree-vectorizer.c (vect_analyze_offset_expr): Strip conversions
422         that don't narrow the value.  Fail for other conversions.
424 2005-01-01  Richard Henderson  <rth@redhat.com>
426         PR c/19031
427         * c-decl.c (pop_file_scope): Call maybe_apply_pending_pragma_weaks.
428         * c-lang.c (finish_file): Don't do it here.
429         * objc/objc-act.c (objc_finish_file): Likewise.
431         * cgraph.c (decl_assembler_name_equal): New.
432         (cgraph_node_for_asm, cgraph_varpool_node_for_asm): New.
433         (cgraph_varpool_node): Actually link up cgraph_varpool_nodes.
434         * cgraph.h (struct cgraph_varpool_node): Add next.
435         (cgraph_node_for_asm, cgraph_varpool_node_for_asm): Declare.
436         * varasm.c (assemble_alias): Mark the target as needed.
438 2005-01-01  Andrew Pinski  <pinskia@physics.uc.edu>
440         PR middle-end/19221
441         * function.c (get_arg_pointer_save_area): Use entry_of_function
442         instead of get_insns.
444 2005-01-01  Roger Sayle  <roger@eyesopen.com>
445             Andrew Pinski  <pinskia@physics.uc.edu>
446             James E. Wilson  <wilson@specifixinc.com>
448         PR rtl-optimization/12092
449         * loop.c (emit_prefetch_instructions): Do nothing if PREFETCH_BLOCK
450         is zero.
452 2005-01-01  Roger Sayle  <roger@eyesopen.com>
453             Olivier Hainque  <hainque@act-europe.fr>
455         * tree.c (int_fits_type_p): A narrower type always fits in a
456         wider one, except for negative values into unsigned types.
458 2005-01-01  Roger Sayle  <roger@eyesopen.com>
460         * tree.c (int_fits_type_p): Compare the result of force_fit_type
461         with the original constant rather than require TREE_OVERFLOW.
463 2005-01-01  Steven Bosscher  <stevenb@suse.de>
465         PR middle-end/17544
466         * c-decl.c (finish_function): If compiling C99, annotate the
467         compiler generated return with the current file name and line 0.
468         * tree-cfg.c (remove_useless_stmts_warn_notreached): Only warn if
469         the source line is greater than 0.
470         (remove_bb): Likewise.
472 See ChangeLog.12 for earlier changes.