Bill Schmidt [Sun, 19 Apr 2015 16:53:22 +0000 (16:53 +0000)]
backport: re PR target/65787 (Miscompile due to bad vector swap optimization for little endian)
[gcc]
2015-04-18 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Jakub Jelinek <jakub@redhat.com>
Backport from mainline r222205
2015-04-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Jakub Jelinek <jakub@redhat.com>
PR target/65787
* config/rs6000/rs6000.c (rtx_is_swappable_p): Ensure that a
subsequent SH_NONE operand does not overwrite an existing *special
value.
(adjust_extract): Handle case where a vec_extract operation is
wrapped in a PARALLEL.
[gcc/testsuite]
2015-04-18 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport from mainline r222205
2015-04-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Mikael Morin [Tue, 14 Apr 2015 12:23:30 +0000 (12:23 +0000)]
re PR fortran/56674 (ICE in check_sym_interfaces)
PR fortran/56674
PR fortran/58813
PR fortran/59016
PR fortran/59024
fortran/
* symbol.c (save_symbol_data, gfc_save_symbol_data): Rename the
former to the latter and make it non-static. Update callers.
* gfortran.h (gfc_save_symbol_data): New prototype.
* decl.c (gfc_match_decl_type_spec): Call 'gfc_save_symbol_data'
before modifying symbols 'sym' and 'dt_sym'.
testsuite/
* gfortran.dg/used_types_27.f90: New.
* config/s390/s390.c (s390_function_num_hotpatch_hw): Allow hotpatching
nested functions.
(s390_reorg): Adapt to new signature of s390_function_num_hotpatch_hw.
(s390_asm_output_function_label): Adapt to new signature of
s390_function_num_hotpatch_hw
Optimise the code generating assembler output.
Add comments to assembler file.
Bill Schmidt [Thu, 26 Mar 2015 22:35:25 +0000 (22:35 +0000)]
backport: rs6000.c (tree-pass.h): New #include.
[gcc]
2015-03-26 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport of r214242, r214254, and bug fix patches from mainline
* config/rs6000/rs6000.c (tree-pass.h): New #include.
(rs6000_analyze_swaps): New declaration.
(gate_analyze_swaps): New function.
(execute_analyze_swaps): Likewise.
(pass_analyze_swaps): New struct rtl_opt_pass.
(rs6000_option_override): Register swap-optimization pass.
(swap_web_entry): New class.
(special_handling_values): New enum.
(union_defs): New function.
(union_uses): Likewise.
(insn_is_load_p): Likewise.
(insn_is_store_p): Likewise.
(insn_is_swap_p): Likewise.
(rtx_is_swappable_p): Likewise.
(insn_is_swappable_p): Likewise.
(chain_purpose): New enum.
(chain_contains_only_swaps): New function.
(mark_swaps_for_removal): Likewise.
(swap_const_vector_halves): Likewise.
(adjust_subreg_index): Likewise.
(permute_load): Likewise.
(permute_store): Likewise.
(adjust_extract): Likewise.
(adjust_splat): Likewise.
(handle_special_swappables): Likewise.
(replace_swap_with_copy): Likewise.
(dump_swap_insn_table): Likewise.
(rs6000_analyze_swaps): Likewise.
* config/rs6000/rs6000.opt (moptimize-swaps): New option.
* df.h (web_entry_base): New class, replacing struct web_entry.
(web_entry_base::pred): New method.
(web_entry_base::set_pred): Likewise.
(web_entry_base::unionfind_root): Likewise.
(web_entry_base::unionfind_union): Likewise.
(unionfind_root): Delete external reference.
(unionfind_union): Likewise.
(union_defs): Likewise.
* web.c (web_entry_base::unionfind_root): Convert to method.
(web_entry_base::unionfind_union): Likewise.
(web_entry): New class.
(union_match_dups): Convert to use class structure.
(union_defs): Likewise.
(entry_register): Likewise.
(web_main): Likewise.
[gcc/testsuite]
2015-03-26 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport r214254 and related tests from mainline
* gcc.target/powerpc/swaps-p8-1.c: New test.
* gcc.target/powerpc/swaps-p8-3.c: New test.
* gcc.target/powerpc/swaps-p8-4.c: New test.
* gcc.target/powerpc/swaps-p8-5.c: New test.
* gcc.target/powerpc/swaps-p8-6.c: New test.
* gcc.target/powerpc/swaps-p8-7.c: New test.
* gcc.target/powerpc/swaps-p8-8.c: New test.
* gcc.target/powerpc/swaps-p8-9.c: New test.
* gcc.target/powerpc/swaps-p8-10.c: New test.
* gcc.target/powerpc/swaps-p8-11.c: New test.
* gcc.target/powerpc/swaps-p8-12.c: New test.
* gcc.target/powerpc/swaps-p8-13.c: New test.
* gcc.target/powerpc/swaps-p8-15.c: New test.
* gcc.target/powerpc/swaps-p8-17.c: New test.
Jerry DeLisle [Mon, 23 Mar 2015 01:32:15 +0000 (01:32 +0000)]
re PR fortran/60956 (error reading (and writing) large text files in gfortran)
2015-03-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/60956
Backport from mainline
* io/fbuf.c (fbuf_flush_list): New function that only flushes
if current fbuf position exceeds a limit.
* io/fbuf.h: Declare the new function.
* io/io.h (enum unit_mode): Add two new modes.
* io/list_read.c (list_formatted_read_scalar): Call new function.
* io/write.c: Include fbuf.h. (list_formatted_write_scalar):
Call new function.
Paul Thomas [Sun, 15 Mar 2015 09:13:03 +0000 (09:13 +0000)]
re PR fortran/65024 ([OOP] unlimited polymorphic pointer structure not built when it should be)
2015-03-15 Paul Thomas <pault@gcc.gnu.org>
PR fortran/65024
* trans-expr.c (gfc_conv_component_ref): If the component
backend declaration is missing and the derived type symbol is
available in the reference, call gfc_build_derived_type.
2015-03-15 Paul Thomas <pault@gcc.gnu.org>
PR fortran/65024
* gfortran.dg/unlimited_polymorphic_23.f90: New test
Mikael Morin [Thu, 12 Mar 2015 17:26:17 +0000 (17:26 +0000)]
re PR fortran/60898 (model compile error with gfortran 4.7 and gcc 4.9)
PR fortran/60898
fortran/
* resolve.c (resolve_symbol): Check that the symbol found by
name lookup really is the current symbol being resolved.
testsuite/
* gfortran.dg/entry_20.f90: New.
Alan Modra [Mon, 9 Mar 2015 23:19:44 +0000 (09:49 +1030)]
re PR target/65286 (When building on powerpc64le-unknown-linux-gnu, --disable-multilib must be used)
PR target/65286
* config.gcc (powerpc*-*-linux*): Arrange for powerpc64le-linux
to be single-arch by default. Set cpu_is_64bit for powerpc64
given --with-cpu=native.
* config/rs6000/t-fprules: Do not set default MULTILIB vars.
* config/rs6000/t-linux (MULTIARCH_DIRNAME): Support powerpc64
and powerpc64le.
* config/rs6000/linux64.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Test
rs6000_isa_flags rather than TARGET_64BIT.
2015-03-03 Michael Meissner <meissner@linux.vnet.ibm.com>
Backport from trunk
2015-03-03 Michael Meissner <meissner@linux.vnet.ibm.com>
PR 65138/target
* config/rs6000/rs6000-cpus.def (powerpc64le): Add new generic
processor type for 64-bit little endian PowerPC.
* config/rs6000/rs6000.c (rs6000_option_override_internal): If
-mdebug=reg, print TARGET_DEFAULT. Fix logic to use
TARGET_DEFAULT if there is no default cpu. Fix -mdebug=reg
printing built-in mask so it does not pass NULL pointers.
* config/rs6000/rs6000-tables.opt: Regenerate.
* doc/invoke.texi (IBM RS/6000 and PowerPC options): Document
-mcpu=powerpc64le.
Backport from trunk
2015-01-19 David Edelsohn <dje.gcc@gmail.com>
* config/rs6000/default64.h: Include rs6000-cpus.def.
(TARGET_DEFAULT) [LITTLE_ENDIAN]: Use ISA 2.7 (POWER8).
(TARGET_DEFAULT) [BIG_ENDIAN]: Use POWER4.
* config/rs6000/driver-rs6000.c (detect_processor_aix): Add POWER7
and POWER8.
* config/rs6000/linux64.h (PROCESSOR_DEFAULT64): Always default to
POWER8.
* config/rs6000/rs6000.c (rs6000_file_start): Emit .machine
pseudo-op to specify assembler dialect.
backport: re PR target/59593 ([arm big-endian] using "ldrh" access a immediate which stored in a memory by word)
2015-03-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
Backport from mainline
2014-11-27 Thomas Preud'homme <thomas.preudhomme@arm.com>
gcc/
PR target/59593
* config/arm/arm.c (dump_minipool): dispatch to consttable pattern
based on mode size.
* config/arm/arm.md (consttable_1): Make it TARGET_EITHER.
(consttable_2): Make it TARGET_EITHER and move HFmode handling from
consttable_4 to it.
(consttable_4): Move HFmode handling to consttable_2 pattern.
gcc/testsuite/
PR target/59593
* gcc.target/arm/constant-pool.c: New test.
backport: re PR target/64453 (Live high register not saved in function prolog on ARM with -Os)
2015-03-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
Backport from mainline
2015-01-14 Thomas Preud'homme <thomas.preudhomme@arm.com>
gcc/
PR target/64453
* config/arm/arm.c (callee_saved_reg_p): Define.
(arm_compute_save_reg0_reg12_mask): Use callee_saved_reg_p to check if
register is callee saved instead of !call_used_regs[reg].
(thumb1_compute_save_reg_mask): Likewise.
Richard Biener [Thu, 26 Feb 2015 13:28:48 +0000 (13:28 +0000)]
backport: re PR tree-optimization/61634 (ICE in in vect_get_vec_def_for_operand, at tree-vect-stmts.c:1423)
2015-02-26 Richard Biener <rguenther@suse.de>
Backport from mainline
2014-11-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/61634
* tree-vect-slp.c: (vect_detect_hybrid_slp_stmts): Rewrite to
propagate hybrid down the SLP tree for one scalar statement.
(vect_detect_hybrid_slp_1): New walker function.
(vect_detect_hybrid_slp_2): Likewise.
(vect_detect_hybrid_slp): Properly handle pattern statements
in a pre-scan over all loop stmts.
Richard Biener [Tue, 24 Feb 2015 14:05:46 +0000 (14:05 +0000)]
backport: [multiple changes]
2015-02-24 Richard Biener <rguenther@suse.de>
Backport from mainline
2014-12-09 Richard Biener <rguenther@suse.de>
PR middle-end/64199
* fold-const.c (fold_binary_loc): Use TREE_OVERFLOW_P.
* gcc.dg/torture/pr64199.c: New testcase.
2015-01-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/64493
PR tree-optimization/64495
* tree-vect-loop.c (vect_finalize_reduction): For double-reductions
assign the proper vectorized PHI to the inner loop exit PHIs.
* gcc.dg/vect/pr64493.c: New testcase.
* gcc.dg/vect/pr64495.c: Likewise.
Richard Biener [Tue, 24 Feb 2015 12:49:11 +0000 (12:49 +0000)]
backport: re PR tree-optimization/56273 (Bogus -Warray-bounds warning)
2015-02-24 Richard Biener <rguenther@suse.de>
Backport from mainline
2015-01-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/56273
PR tree-optimization/59124
PR tree-optimization/64277
* tree-vrp.c (vrp_finalize): Emit array-bound warnings only
from the first VRP pass.
* g++.dg/warn/Warray-bounds-6.C: New testcase.
* gcc.dg/Warray-bounds-12.c: Likewise.
* gcc.dg/Warray-bounds-13.c: Likewise.
Dominik Vogt [Mon, 23 Feb 2015 11:36:01 +0000 (11:36 +0000)]
backport: extend.texi: s/390: Update documentation of hotpatch attribute.
2015-02-23 Dominik Vogt <vogt@linux.vnet.ibm.com>
Backport from mainline
2015-01-27 Dominik Vogt <vogt@linux.vnet.ibm.com>
* doc/extend.texi: s/390: Update documentation of hotpatch attribute.
* doc/invoke.texi (-mhotpatch): s/390: Update documentation of
-mhotpatch= option.
* config/s390/s390.opt (mhotpatch): s/390: Remove -mhotpatch and
-mno-hotpatch options. Change syntax of -mhotpatch= option.
* config/s390/s390.c (s390_hotpatch_trampoline_halfwords_default):
Renamed.
(s390_hotpatch_trampoline_halfwords_max): Renamed.
(s390_hotpatch_hw_max): New name.
(s390_hotpatch_trampoline_halfwords): Renamed.
(s390_hotpatch_hw_before_label): New name.
(get_hotpatch_attribute): Removed.
(s390_hotpatch_hw_after_label): New name.
(s390_handle_hotpatch_attribute): Add second parameter to hotpatch
attribute.
(s390_attribute_table): Ditto.
(s390_function_num_hotpatch_trampoline_halfwords): Renamed.
(s390_function_num_hotpatch_hw): New name.
Remove special handling of inline functions and hotpatching.
Return number of nops before and after the function label.
(s390_can_inline_p): Removed.
(s390_asm_output_function_label): Emit a configurable number of nops
after the function label.
(s390_option_override): Update -mhotpatch= syntax and remove -mhotpatch.
(TARGET_CAN_INLINE_P) Removed.
(TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P): New.
Uros Bizjak [Sun, 22 Feb 2015 15:29:16 +0000 (16:29 +0100)]
backport: re PR target/64113 (Gcc on Alpha: Error: No lda !gpdisp!282 was found)
Backport from mainline
2014-12-02 Uros Bizjak <ubizjak@gmail.com>
PR target/64113
* config/alpha/alpha.md (call_value_osf_tlsgd): Do not split insn
using post-reload splitter. Use peephole2 pass instead.
(call_value_osf_tlsldm): Ditto.
(TLS_CALL): New int iterator.
(tls): New int attribute.
(call_value_osf_<tls>): Merge insn pattern from call_value_osf_tlsgd
and call_value_tlsldm using TLS_CALL int iterator.