Commit Graph

149438 Commits

Author SHA1 Message Date
Bin Cheng
4cecd65999 tree-vect-slp.c (vect_get_and_check_slp_defs): New parameter SWAP.
* tree-vect-slp.c (vect_get_and_check_slp_defs): New parameter SWAP.
	Check slp defs for COND_EXPR by swapping/inverting operands if the
	new parameter SWAP indicates so.
	(vect_build_slp_tree_1): New parameter SWAP.  Check COND_EXPR stmt
	is isomorphic to the first stmt via swapping/inverting.  Store swap
	information in the new parameter SWAP.
	(vect_build_slp_tree): New local array SWAP and pass it to function
	vect_build_slp_tree_1.  Cleanup result handling code for function
	call to vect_get_and_check_slp_defs.  Skip operand swapping if the
	order of operands has been fixed as indicated by SWAP[i].

From-SVN: r241697
2016-10-31 09:30:47 +00:00
Bin Cheng
2c6a05b150 tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Skip unnecessary data dependence check after visited store stmt.
* tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Skip
	unnecessary data dependence check after visited store stmt.

From-SVN: r241696
2016-10-31 09:27:31 +00:00
Bill Schmidt
0b56e9adf8 re PR tree-optimization/71915 (A missed opportunity for SLSR)
[gcc]

2016-10-30  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR tree-optimization/71915
	PR tree-optimization/71490
	* gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
	stride_type field.
	(find_basis_for_base_expr): Require stride types to match when
	seeking a basis.
	(alloc_cand_and_find_basis): Record the stride type.
	(slsr_process_phi): Pass stride type to alloc_cand_and_find_basis.
	(backtrace_base_for_ref): Pass types to legal_cast_p_1 rather than
	the expressions having those types.
	(slsr_process_ref): Pass stride type to alloc_cand_and_find_basis.
	(create_mul_ssa_cand): Likewise.
	(create_mul_imm_cand): Likewise.
	(create_add_ssa_cand): Likewise.
	(create_add_imm_cand): Likewise.
	(legal_cast_p_1): Change interface to accept types rather than the
	expressions having those types.
	(legal_cast_p): Pass types to legal_cast_p_1.
	(slsr_process_cast): Pass stride type to
	alloc_cand_and_find_basis.
	(slsr_process_copy): Likewise.
	(dump_candidate): Display stride type when a cast exists.
	(create_add_on_incoming_edge): Introduce a cast when necessary for
	the stride type.
	(analyze_increments): Change the code checking for invalid casts
	to rely on the stride type, and update the documentation and
	example.  Change the code checking for pointer multiplies to rely
	on the stride type.
	(insert_initializers): Introduce a cast when necessary for the
	stride type.  Use the stride type for the type of the initializer.

[gcc/testsuite]

2016-10-30  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR tree-optimization/71915
	PR tree-optimization/71490
	* gcc.dg/tree-ssa/pr54245.c: Delete.
	* gcc.dg/tree-ssa/slsr-8.c: Adjust for new optimization and
	document why.

From-SVN: r241695
2016-10-31 03:04:59 +00:00
GCC Administrator
8972aa3362 Daily bump.
From-SVN: r241694
2016-10-31 00:16:18 +00:00
Jerry DeLisle
d4fc670294 re PR libfortran/78123 (Short reads with T edit descriptor not padding correctly)
2016-10-30  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/78123
	* io/transfer.c (formatted_transfer_scalar_read): Clear seen_eor
	only if we have tabbed to left of current position.

	* gfortran.dg/fmt_t_9.f: New test.

From-SVN: r241691
2016-10-30 22:14:01 +00:00
Thomas Koenig
396e56d2da re PR fortran/67219 (Incorrect conversion warning)
2016-10-30  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/67219
	* arith.c (gfc_int2real):  Change gfc_warning_now
	to gfc_warning.
	* primary.c (match_complex_constant):  If there
	is no comma, throw away any warning which might have
	been issued by gfc_int2real.

2016-10-30  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/67219
	* gfortran.dg/pr67219.f90:  New test.

From-SVN: r241689
2016-10-30 17:48:27 +00:00
Ian Lance Taylor
e9d33505a0 compiler: fix slice/array evaluation order bug
There was a phase ordering issue in the handling of "keyed" array
    literal expressions: the lowering phase was canonicalizing the
    indices/vals before the phase that fixed evaluation order, meaning that
    the evaluation order was incorrect. The fix is to capture the orginal
    ordering and use that ordering when doing traversals (there is already
    something similar being done for struct literal expressions).
    
    Fixes golang/go#17640
    
    Reviewed-on: https://go-review.googlesource.com/32296

From-SVN: r241688
2016-10-30 16:48:37 +00:00
Ian Lance Taylor
48e21b40b5 libgo: eliminate a lot of duplication in Makefile.am
I read through the GNU make manual.  I knew there had to be a way to do it.
    
    Remove the special netgo library.  The essential feature--using the Go
    DNS resolver--is now available by setting GODEBUG=netdns=go.
    
    Reviewed-on: https://go-review.googlesource.com/32333

From-SVN: r241687
2016-10-30 16:45:34 +00:00
Prathamesh Kulkarni
aee707743d arm.c (arm_const_not_ok_for_debug_p): Use VAR_P.
2016-10-30  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

	* config/arm/arm.c (arm_const_not_ok_for_debug_p): Use VAR_P.

From-SVN: r241686
2016-10-30 14:06:16 +00:00
Eric Botcazou
015415fa9d Add missing name
From-SVN: r241685
2016-10-30 10:15:55 +00:00
GCC Administrator
c7cd281fe4 Daily bump.
From-SVN: r241684
2016-10-30 00:16:15 +00:00
Jakub Jelinek
205b9ed14e re PR rtl-optimization/77919 (ICE converting DC to V2DF mode)
PR rtl-optimization/77919
	* expr.c (expand_expr_real_1) <normal_inner_ref>: Only avoid forcing
	into memory if both modes are complex and their inner modes have the
	same precision.  If the two modes are different complex modes, convert
	each part separately and generate a new CONCAT.

	* g++.dg/torture/pr77919-2.C: New test.

From-SVN: r241681
2016-10-29 22:22:36 +02:00
John David Anglin
e421be7677 pa64-hpux.h (FINI_SECTION_ASM_OP): Define to null string.
* config/pa/pa64-hpux.h (FINI_SECTION_ASM_OP): Define to null string.

From-SVN: r241680
2016-10-29 16:25:49 +00:00
Jakub Jelinek
a654d5d013 re PR tree-optimization/78148 (r241649 causes -fcompare-debug failure on ppc64le)
PR target/78148
	* gimple-ssa-store-merging.c
	(imm_store_chain_info::output_merged_store): Use build_aligned_type
	instead of SET_TYPE_ALIGN on shared integral type.

	* gcc.dg/pr78148.c: New test.

From-SVN: r241679
2016-10-29 17:55:50 +02:00
John David Anglin
2bc99a1a94 pa.h (BIGGEST_ALIGNMENT): Adjust comment.
* config/pa/pa.h (BIGGEST_ALIGNMENT): Adjust comment.
	(MALLOC_ABI_ALIGNMENT): Define to 128 on all targets except SOM.
	Adjust comment.

From-SVN: r241676
2016-10-29 15:30:26 +00:00
Jeff Law
c985000952 vax.h (REGNO_REG_CLASS): Access the REGNO argument.
* config/vax/vax.h (REGNO_REG_CLASS): Access the REGNO argument.
	* config/spu/spu.h (REGNO_REG_CLASS): Likewise.

From-SVN: r241675
2016-10-28 22:23:33 -06:00
Joseph Myers
fde1c2de05 * eo.po: Update.
From-SVN: r241673
2016-10-29 02:38:09 +01:00
GCC Administrator
8c61a3b67d Daily bump.
From-SVN: r241672
2016-10-29 00:16:14 +00:00
Steven G. Kargl
fdfc9e44c5 re PR fortran/71891 (fortran/symbol.c:4864: suspicious if ?)
2016-10-28  Steven G. Kargl <kargl@gcc.gnu.org>

	PR fortran/71891
	* symbol.c (gfc_type_compatible): Fix typo.

From-SVN: r241668
2016-10-28 23:37:03 +00:00
Ian Lance Taylor
94f56408db compiler, runtime: copy slice code from Go 1.7 runtime
Change the compiler handle append as the gc compiler does: call a
    function to grow the slice, but otherwise assign the new elements
    directly to the final slice.
    
    For the current gccgo memory allocator the slice code has to call
    runtime_newarray, not mallocgc directly, so that the allocator sets the
    TypeInfo_Array bit in the type pointer.
    
    Rename the static function cnew to runtime_docnew, so that the stack
    trace ignores it when ignoring runtime functions.  This was needed to
    fix the runtime/pprof tests on 386.
    
    Reviewed-on: https://go-review.googlesource.com/32218

From-SVN: r241667
2016-10-28 22:34:47 +00:00
Eric Botcazou
21f1031d6c * doc/sourcebuild.texi (Ada Tests): Remove mention of gcc chapter.
From-SVN: r241666
2016-10-28 21:06:14 +00:00
Eric Botcazou
894d8b4163 target.def (min_arithmetic_precision): New hook.
* target.def (min_arithmetic_precision): New hook.
	* doc/tm.texi.in (Misc): Add TARGET_MIN_ARITHMETIC_PRECISION.
	* doc/tm.texi: Regenerate.
	* internal-fn.c (expand_arith_overflow): Adjust handling of target
	dependent support by means of TARGET_MIN_ARITHMETIC_PRECISION.
	* targhooks.c (default_min_arithmetic_precision): New function.
	* targhooks.h (default_min_arithmetic_precision): Declare.
	* config/sparc/sparc.c (TARGET_MIN_ARITHMETIC_PRECISION): Define.
	(sparc_min_arithmetic_precision): New function.

From-SVN: r241665
2016-10-28 21:04:51 +00:00
Segher Boessenkool
9a5e1efcac combine: Improve change_zero_ext (fixes PR71847)
This improves a few things in change_zero_ext.  Firstly, it should use
the passed in pattern in recog_for_combine, not the pattern of the insn
(they are not the same if the whole pattern was replaced).  Secondly,
it handled zero_ext of a subreg, but with hard registers we do not get
a subreg, instead the mode of the reg is changed.  So this handles that.
Thirdly, after changing a zero_ext to an AND, the resulting RTL may become
non-canonical, like (ior (ashift ..) (and ..)); the AND should be first,
it is commutative.  And lastly, zero_extract as a set_dest wasn't handled
at all, but now it is.

This fixes the testcase in PR71847, and improves code generation in some
other edge cases too.


	PR target/71847
	* combine.c (change_zero_ext): Handle zero_ext of hard registers.
	Swap commutative operands in new RTL if needed.  Handle zero_ext
	in the set_dest.
	(recog_for_combine): Pass *pnewpat to change_zero_ext instead of
	PATTERN (insn).

From-SVN: r241664
2016-10-28 22:56:28 +02:00
Ian Lance Taylor
a5742b0158 re PR go/78144 (FAIL: time on systems with tzdata2016g installed)
PR go/78144
    libgo: incorporate fix for timezone test
    
    This brings over the test-only fix for issue 17276 into gccgo/libgo
    (with tzdata-2016g there is a new zone abbreviation).  This is a
    copy of https://golang.org/cl/29995.
    
    Reviewed-on: https://go-review.googlesource.com/32182

From-SVN: r241661
2016-10-28 20:21:52 +00:00
Prathamesh Kulkarni
e72531b9cb re PR tree-optimization/43721 (Failure to optimise (a/b) and (a%b) into single __aeabi_idivmod call)
2016-10-28  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
	    Kugan Vivekanandarajah  <kuganv@linaro.org>
	    Jim Wilson  <jim.wilson@linaro.org>

	PR tree-optimization/43721
	* target.def: New hook expand_divmod_libfunc.
	* doc/tm.texi.in: Add hook for TARGET_EXPAND_DIVMOD_LIBFUNC
	* doc/tm.texi: Regenerate.
	* internal-fn.def: Add new entry for DIVMOD ifn.
	* internal-fn.c (expand_DIVMOD): New.
	* tree-ssa-math-opts.c: Include optabs-libfuncs.h, tree-eh.h,
	targhooks.h.
	(widen_mul_stats): Add new field divmod_calls_inserted.
	(target_supports_divmod_p): New.
	(divmod_candidate_p): Likewise.
	(convert_to_divmod): Likewise.
	(pass_optimize_widening_mul::execute): Call
	calculate_dominance_info(), renumber_gimple_stmt_uids() at
	beginning of function. Call convert_to_divmod()
	and record stats for divmod.
	* config/arm/arm.c (arm_expand_divmod_libfunc): Override hook
	TARGET_EXPAND_DIVMOD_LIBFUNC.
	* doc/sourcebuild.texi: Add items for arm_divmod_simode, divmod,
	divmod_simode.

testsuite/
	* lib/target-supports.exp (check_effective_target_divmod): New.
	(check_effective_target_divmod_simode): Likewise.
	(check_effective_target_arm_divmod_simode): Likewise.
	* gcc.dg/divmod-1-simode.c: New test.
	* gcc.dg/divmod-1.c: Likewise.
	* gcc.dg/divmod-2-simode.c: Likewise.
	* gcc.dg/divmod-2.c: Likewise.
	* gcc.dg/divmod-3-simode.c: Likewise.
	* gcc.dg/divmod-3.c: Likewise.
	* gcc.dg/divmod-4-simode.c: Likewise.
	* gcc.dg/divmod-4.c: Likewise.
	* gcc.dg/divmod-5.c: Likewise.
	* gcc.dg/divmod-6-simode.c: Likewise.
	* gcc.dg/divmod-6.c: Likewise.
	* gcc.dg/divmod-7.c: Likewise.

Co-Authored-By: Jim Wilson <jim.wilson@linaro.org>
Co-Authored-By: Kugan Vivekanandarajah <kuganv@linaro.org>

From-SVN: r241660
2016-10-28 19:05:12 +00:00
Ian Lance Taylor
0dfeae289c re PR go/78143 (bootstrap broken in libgo on powerpc-linux-gnu)
PR go/78143
    runtime: build lfstack_32bit.go on ppc
    
    Missed a build tag.  This is GCC PR 78143.
    
    Reviewed-on: https://go-review.googlesource.com/32295

From-SVN: r241659
2016-10-28 18:57:36 +00:00
Jonathan Wakely
f0414b973f Make filesystem::path work with basic_string_view (P0392R0)
* include/experimental/bits/fs_path.h (__is_path_src)
	(_S_range_begin, _S_range_end): Overload to treat string_view as a
	Source object.
	(path::operator+=, path::compare): Overload for basic_string_view.
	* testsuite/experimental/filesystem/path/construct/string_view.cc:
	New test.
	* testsuite/experimental/filesystem/path/construct/
	string_view_cxx17.cc: New test.

From-SVN: r241658
2016-10-28 19:48:43 +01:00
Eric Botcazou
4713516712 dojump.c (do_jump_by_parts_greater_rtx): Invert probability when swapping the arms of the branch.
* dojump.c (do_jump_by_parts_greater_rtx): Invert probability when
	swapping the arms of the branch.
	* internal-fn.c (expand_addsub_overflow): Use a straight-line code
	sequence for the generic signed-signed-signed case.

From-SVN: r241656
2016-10-28 18:10:14 +00:00
Ian Lance Taylor
eae2ada503 libgo: redirect grep output in mkrsysinfo.sh to /dev/null
I noticed a stray useless output line when building libgo.
    
    Reviewed-on: https://go-review.googlesource.com/32294

From-SVN: r241655
2016-10-28 17:55:13 +00:00
Jonathan Wakely
fcfceb1afb Fix filesystem::path for iterators with const value_type
* include/experimental/bits/fs_path.h
	(path::_S_convert<_Iter>(_Iter, _Iter)): Remove cv-qualifiers from
	iterator's value_type.
	(path::_S_convert<_Iter>(_Iter __first, __null_terminated)): Likewise.
	Do not use operation not supported by input iterators.
	(path::__is_path_iter_src): Add partial specialization for const
	encoded character types.
	* testsuite/experimental/filesystem/path/construct/range.cc: Test
	construction from input iterators with const value types.

From-SVN: r241654
2016-10-28 18:47:57 +01:00
Aldy Hernandez
52e1b91e71 re PR debug/77773 (Segfault when compiling __simd64_float16_t using arm-none-eabi-g++ with debug information)
PR debug/77773
	* c-pretty-print.c (simple_type_specifier): Do not dereference `t'
	if NULL.

From-SVN: r241653
2016-10-28 16:41:29 +00:00
Jeff Law
a563e6e9a1 bfin.c (bfin_legitimate_address_p): Add missing fallthru comment.
* config/bfin/bfin.c (bfin_legitimate_address_p): Add missing
	fallthru comment.
	* config/bfin/bfin.h (TARGET_CPU_CPP_BUILTINS): Likewise.

From-SVN: r241651
2016-10-28 09:22:28 -06:00
Segher Boessenkool
64f6e1e158 sched: Do not mix prologue and epilogue insns
This patch makes scheduling not reorder prologue insns relative to
epilogue insns and vice versa.  This fixes PR78029.

The problem in that PR:
We have two insns, in this order:

(insn/f 300 299 267 8 (set (reg:DI 65 lr)
        (reg:DI 0 0)) 579 {*movdi_internal64}
     (expr_list:REG_DEAD (reg:DI 0 0)
        (expr_list:REG_CFA_RESTORE (reg:DI 65 lr)
            (nil))))
...
(insn/f 310 268 134 8 (set (mem/c:DI (plus:DI (reg/f:DI 1 1)
                (const_int 144 [0x90])) [6  S8 A8])
        (reg:DI 0 0)) 579 {*movdi_internal64}
     (expr_list:REG_DEAD (reg:DI 0 0)
        (expr_list:REG_CFA_OFFSET (set (mem/c:DI (plus:DI (reg/f:DI 1 1)
                        (const_int 144 [0x90])) [6  S8 A8])
                (reg:DI 65 lr))
            (nil))))

and sched swaps them (when compiling for power6, it tries to put memory
stores together, so insn 310 is moved up past 300 to go together with
some other store).  But the REG_CFA_RESTORE and REG_CFA_OFFSET cannot be
swapped (they both say where the orig value of LR now lives).


	PR rtl-optimization/78029
	* function.c (prologue_contains, epilogue_contains): New functions.
	(record_prologue_seq, record_epilogue_seq): New functions.
	* function.h (prologue_contains, epilogue_contains,
	record_prologue_seq, record_epilogue_seq): New declarations.
	* sched-deps.c (sched_analyze_insn): Make dependencies to prevent
	mixing prologue and epilogue insns.
	(init_deps): Initialize the new fields in struct deps_desc.
	* sched-int.h (struct deps_desc): New fields last_prologue,
	last_epilogue, and last_logue_was_epilogue.
	* shrink-wrap.c (emit_common_heads_for_components): Record all
	emitted prologue and epilogue insns.
	(emit_common_tails_for_components): Ditto.
	(insert_prologue_epilogue_for_components): Ditto.

From-SVN: r241650
2016-10-28 16:39:28 +02:00
Kyrylo Tkachov
f663d9ad6e GIMPLE store merging pass
2016-10-28  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	PR middle-end/22141
	* Makefile.in (OBJS): Add gimple-ssa-store-merging.o.
	* common.opt (fstore-merging): New Optimization option.
	* opts.c (default_options_table): Add entry for
	OPT_ftree_store_merging.
	* fold-const.h (can_native_encode_type_p): Declare prototype.
	* fold-const.c (can_native_encode_type_p): Define.
	* params.def (PARAM_STORE_MERGING_ALLOW_UNALIGNED): Define.
	(PARAM_MAX_STORES_TO_MERGE): Likewise.
	* timevar.def (TV_GIMPLE_STORE_MERGING): New timevar.
	* passes.def: Insert pass_tree_store_merging.
	* tree-pass.h (make_pass_store_merging): Declare extern
	prototype.
	* gimple-ssa-store-merging.c: New file.
	* doc/invoke.texi (Optimization Options): Document
	-fstore-merging.
	(--param documentation): Document store-merging-allow-unaligned
	and max-stores-to-merge.

2016-10-28  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
            Jakub Jelinek  <jakub@redhat.com>
            Andrew Pinski  <pinskia@gmail.com>

	PR middle-end/22141
	PR rtl-optimization/23684
	* gcc.c-torture/execute/pr22141-1.c: New test.
	* gcc.c-torture/execute/pr22141-2.c: Likewise.
	* gcc.target/aarch64/ldp_stp_1.c: Adjust for -fstore-merging.
	* gcc.target/aarch64/ldp_stp_4.c: Likewise.
	* gcc.dg/store_merging_1.c: New test.
	* gcc.dg/store_merging_2.c: Likewise.
	* gcc.dg/store_merging_3.c: Likewise.
	* gcc.dg/store_merging_4.c: Likewise.
	* gcc.dg/store_merging_5.c: Likewise.
	* gcc.dg/store_merging_6.c: Likewise.
	* gcc.dg/store_merging_7.c: Likewise.
	* gcc.target/i386/pr22141.c: Likewise.
	* gcc.target/i386/pr34012.c: Add -fno-store-merging to dg-options.
	* g++.dg/init/new17.C: Likewise.



Co-Authored-By: Andrew Pinski <pinskia@gmail.com>
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>

From-SVN: r241649
2016-10-28 14:18:50 +00:00
Jonathan Wakely
1f5700e952 Implement std::launder for C++17
* doc/xml/manual/status_cxx2017.xml: Update status.
	* doc/html/*: Regenerate.
	* include/std/type_traits (has_unique_object_representations): Guard
	with __has_builtin check.
	* libsupc++/new (launder): Define for C++17.
	* testsuite/18_support/launder/1.cc: New test.
	* testsuite/18_support/launder/requirements.cc: New test.
	* testsuite/18_support/launder/requirements_neg.cc: New test.

From-SVN: r241648
2016-10-28 15:09:33 +01:00
Will Schmidt
0faf9ab4d6 re PR middle-end/72747 (powerpc: wrong code generated for vec_splats in cascading assignment)
gcc:
2016-10-26  Will Schmidt <will_schmidt@vnet.ibm.com>

        PR middle-end/72747
        * gimplify.c (gimplify_init_constructor): Move emit of constructor
        assignment to earlier in the if/else logic.

testsuite:
2016-10-26  Will Schmidt <will_schmidt@vnet.ibm.com>

        PR middle-end/72747
        * c-c++-common/pr72747-1.c: New test.
        * c-c++-common/pr72747-2.c: Likewise.

From-SVN: r241647
2016-10-28 13:28:46 +00:00
Richard Biener
2a762fe165 re PR middle-end/78128 (fortran/resolve.c:resolve_operator miscompiled at -O2)
2016-10-28  Richard Biener  <rguenther@suse.de>

	PR middle-end/78128
	PR middle-end/71002
	* fold-const.c (make_bit_field_ref): Only adjust alias set
	when the original alias set was zero.

From-SVN: r241645
2016-10-28 13:07:59 +00:00
Andreas Krebbel
539405d554 S/390: Add static OSC breaker if necessary.
This patch adds a magic OSC (operand store compare) break instruction
which is necessary if a store is followed closely by a load with same
base+indx+displ while either base or index get modified in between.

The patch improves several SpecCPU testcases running on IBM z13.

gcc/testsuite/ChangeLog:

2016-10-28  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* gcc.target/s390/oscbreak-1.c: New test.

gcc/ChangeLog:

2016-10-28  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* config/s390/s390.c (s390_adjust_loop_scan_osc): New function.
	(s390_adjust_loops): New function.
	(s390_reorg): Invoke s390_adjust_loops.
	* config/s390/s390.md: (UNSPEC_OSC_BREAK): New constant.
	("osc_break"): New insn definition.

From-SVN: r241644
2016-10-28 12:31:37 +00:00
Andreas Krebbel
0dbb19f0f1 S/390: Add support for arch<n> arch/tune options.
This patch adds an alternate CPU level naming following the
architecture level number in the Principles of Operations manual.  So
instead of having z196, zEC12, and z13 you can use arch9, arch10, and
arch11.  The old cpu names stay valid and should preferably be used.

The alternate names are supposed to improve compatibility with the IBM
XL compiler toolchain which uses the arch numbering.

gcc/testsuite/ChangeLog:

2016-10-28  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* gcc.target/s390/target-attribute/tattr-m64-33.c: New test.

gcc/ChangeLog:

2016-10-28  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* config/s390/s390.opt: Support alternate cpu level naming (archXX).
	* config.gcc: Support alternate archXX cpu levels with
	--with-arch= and --with-tune=.
	* config/s390/linux.h: Translate new archXX cpu levels to the
	original names when calling GAS.
	* config/s390/tpf.h: Likewise.
	* doc/invoke.texi: Document the alternate cpu level names.

From-SVN: r241643
2016-10-28 12:28:24 +00:00
Jakub Jelinek
c19066a769 re PR rtl-optimization/77919 (ICE converting DC to V2DF mode)
PR rtl-optimization/77919
	* expr.c (expand_expr_real_1) <normal_inner_ref>: Force CONCAT into
	MEM if mode1 is not a complex mode.

	* g++.dg/torture/pr77919.C: New test.

From-SVN: r241642
2016-10-28 10:11:57 +02:00
Jakub Jelinek
0d9e143c62 re PR rtl-optimization/78132 (GCC produces invalid instruction (kmovd and kmovq) for KNL.)
PR rtl-optimization/78132
	* ree.c (combine_reaching_defs): Give up if copy_needed and
	!HARD_REGNO_MODE_OK (REGNO (src_reg), dst_mode).

	* gcc.target/i386/pr78132.c: New test.

From-SVN: r241641
2016-10-28 09:12:52 +02:00
GCC Administrator
4d925a9069 Daily bump.
From-SVN: r241640
2016-10-28 00:16:16 +00:00
Carl Love
2142f54f02 Index...
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 241636)
+++ ChangeLog	(working copy)
@@ -1,3 +1,7 @@
+2016-10-27  Carl Love  <cel@us.ibm.com>
+
+	* MAINTAINERS (Write After Approval): Add myself.
+
 2016-10-27  Andrew Burgess  <andrew.burgess@embecosm.com>
 
 	* MAINTAINERS (Reviewers): Add myself.
Index: MAINTAINERS
===================================================================
--- MAINTAINERS	(revision 241636)
+++ MAINTAINERS	(working copy)
@@ -479,6 +479,7 @@
 Manuel López-Ibáñez				<manu@gcc.gnu.org>
 Martin v. Löwis					<loewis@informatik.hu-berlin.de>
 H.J. Lu						<hjl.tools@gmail.com>
+Carl Love					<cel@us.ibm.com>
 Christophe Lyon					<christophe.lyon@st.com>
 Luis Machado					<luisgpm@br.ibm.com>
 Ziga Mahkovec					<ziga.mahkovec@klika.si>

From-SVN: r241637
2016-10-27 23:21:54 +00:00
Eric Botcazou
cc91248db2 * gcc.dg/vect/pr71264.c: XFAIL on SPARC.
From-SVN: r241634
2016-10-27 21:02:25 +00:00
Eric Botcazou
f15fe0af54 * config/sparc/sparc.md (<*vlop:code><VL:mode>3): Remove leading '*'.
From-SVN: r241632
2016-10-27 21:00:22 +00:00
Michael Meissner
787c7a65f6 constraints.md (wH constraint): Add new constraints for allowing 32-bit integers (and eventually 8/16-bit...
[gcc]
2016-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/constraints.md (wH constraint): Add new
	constraints for allowing 32-bit integers (and eventually 8/16-bit
	integers) into the vector registers.
	(wI constraint): Likewise.
	(wJ constraint): Likewise.
	(wK constraint): Likewise.
	* config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Add
	-mvsx-small-integer as a default option for ISA 2.07
	(i.e. power8).
	(POWERPC_MASKS): Likewise.
	* config/rs6000/rs6000.opt (-mvsx-small-integer): Add new debug
	switch to turn off small integer support in vector registers.
	* config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Eliminate
	test for -mupper-regs-di, since it is already done with the
	reg_add[mode].scalar_in_vsx_p.  Add support for the switch
	-mvsx-small-integer.
	(rs6000_debug_reg_global): Add support for wH, wI, wJ, and wK
	constraints.
	(rs6000_setup_reg_addr_masks): Likewise.
	(rs6000_init_hard_regno_mode_ok): Likewise.
	(rs6000_option_override_internal): Add consistency checks for
	-mvsx-small-integer.
	(rs6000_secondary_reload_simple_move): SImode is a simple move if
	-mvsx-small-integer.
	(rs6000_secondary_reload): Use std::swap.
	(rs6000_preferred_reload_class): Don't prefer FLOAT_REGS over
	VSX_REGS for small integers in vector registers, since there is no
	D-FORM address mode for such types.
	(rs6000_register_move_cost): Use FIRST_FPR_REGNO instead of 32.
	(rs6000_opt_masks): Add -mvsx-small-integer.
	* config/rs6000/vsx.md (VSINT_84): Add SImode for small integer
	support.
	(VSX_EXTRACT_I2): Clone VSX_EXTRACT_I, but drop V4SI since SImode
	extracts can be done on ISA 2.07.
	(vsx_extract_<mode>): Add support for small integers in vsx
	registers.
	(vsx_extract_<mode>_p9): Use 'v' instead of VSX_EX, since we no
	longer support V4SImode in this pattern.
	(vsx_extract_si): New insn to support extraction of SImode in ISA
	2.07 using either xxextractuw or vspltw.
	(vsx_extract_<mode>_p8): Use 'v' instead of VSX_EX, since we no
	longer support V4SImode in this pattern.
	* config/rs6000/rs6000.h (enum rs6000_reg_class_enum): Add wH, wI,
	wJ, and wK constraints.
	* config/rs6000/rs6000.md (f32_sv): Use correct instruction for
	storing SDmode with VSX instructions.
	(zero_extendsi<mode>2): Reorder pattern, so RLDICL comes after the
	GPR load and before the FPR and VSX loads.  Remove ??, ! from the
	constraints.  Add MFVSRWZ and XXEXTRACTUW instructions to support
	small integers in vector registers.
	(extendsi<mode>2): Reorder pattern, so EXTSW comes after the GPR
	load and before the FPR and VSX loads.  Remove ??, ! from the
	constraints.  Add VEXTSW2D support for small integers in vector
	registers.
	(lfiwax): Remove ! constraint.  Add VEXTSW2D support for small
	integers in vector registers.
	(floatsi<mode>2_lfiwax): If -mvsx-small-integer issue a normal
	move instead of using an UNSPEC.
	(lfiwzx): Remove ! constraint.  Add XXEXTRACTUW support for small
	integers in vector registers.
	(floatunssi<mode>2_lfiwzx): If -mvsx-small-integer issue a normal
	move instead of using an UNSPEC.
	(movsi_internal1): Add support for -mvsx-small-integer.  Align
	columns so that it is more readable.
	(SImode splitter for ISA 3.0 constants): Add splitter for
	-128..127 constants that can easily be constructed on ISA 3.0.
	* doc/md.texi (PowerPC Constraints): Document wH, wI, wJ, and wK
	constraints.

[gcc/testsuite]
2016-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* gcc.target/powerpc/vsx-simode.c: New test.
	* gcc.target/powerpc/vsx-simode2.c: Likewise.
	* gcc.target/powerpc/vsx-simode3.c: Likewise.

From-SVN: r241631
2016-10-27 20:52:07 +00:00
Jakub Jelinek
6f21288f8c re PR fortran/78026 (ICE in gfc_resolve_omp_declare_simd, at fortran/openmp.c:5190)
PR fortran/78026
	* parse.c (decode_statement): Don't create namespace for possible
	select type here and destroy it afterwards.
	(parse_select_type_block): Set gfc_current_ns to new_st.ext.block.ns.
	(parse_executable, gfc_parse_file): Formatting fixes.
	* match.c (gfc_match_select_type): Create namespace for select type
	here, only after matching select type.  Formatting fixes.  Free that
	namespace if not returning MATCH_YES, after gfc_undo_symbols,
	otherwise remember it in new_st.ext.block.ns and switch to parent
	namespace anyway.

	* gfortran.dg/gomp/pr78026.f03: New test.
	* gfortran.dg/select_type_38.f03: New test.

From-SVN: r241630
2016-10-27 21:55:12 +02:00
Uros Bizjak
47ffb5d95e PR70975 Pass valid offset argument to sendfile
PR libstdc++/70975
	* src/filesystem/ops.cc (do_copy_file) [_GLIBCXX_USE_SENDFILE]:
	Pass non-null pointer to sendfile for offset argument.

From-SVN: r241629
2016-10-27 20:55:55 +02:00
Jakub Jelinek
4ce7157987 re PR middle-end/78025 (ICE in simd_clone_adjust, at omp-simd-clone.c:1126)
PR middle-end/78025
	* omp-simd-clone.c (simd_clone_adjust): Handle noreturn declare simd
	functions.

	* g++.dg/gomp/declare-simd-7.C: New test.

From-SVN: r241628
2016-10-27 20:51:28 +02:00
Aldy Hernandez
015c776064 oacc-init.c (goacc_new_thread): Use sizeof of the appropriate size when allocating new thread.
* oacc-init.c (goacc_new_thread): Use sizeof of the appropriate
	size when allocating new thread.

From-SVN: r241627
2016-10-27 17:36:36 +00:00