Commit Graph

59691 Commits

Author SHA1 Message Date
H.J. Lu 96a58590dd This patch syncs zlib.m4 with binutils-gdb and uses AM_ZLIB from zlib.m4
in gcc/configure.ac.

config/

	* zlib.m4: Sync with binutils-gdb.

gcc/

	* Makefile.in (top_srcdir): New.
	* configure.ac: Use AM_ZLIB.
	* configure: Regeneated.

From-SVN: r225774
2015-07-14 07:25:35 -07:00
Matthias Klose 6ed80e1e51 re PR target/66840 (plugins fail to build on powerpc64le-linux-gnu)
2015-07-14  Matthias Klose  <doko@ubuntu.com>

        PR target/66840
        * config/rs6000/t-rs6000 (TM_H): Add rs6000-cpus.def.

From-SVN: r225772
2015-07-14 13:50:01 +00:00
Richard Biener fe9acb3a7a re PR tree-optimization/66863 (wrong code at -Os and above on x86_64-linux-gnu)
2015-07-14  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/66863
	* tree-vrp.c (register_edge_assert_for_2): Properly restrict
	what we record for conversion use stmt lhs inequalities.

	* gcc.dg/torture/pr66863.c: New testcase.

From-SVN: r225768
2015-07-14 11:39:14 +00:00
Richard Biener 1ec1fa94b7 genmatch.c (dt_node::gen_kids_1): Fix case label indenting.
2015-07-14  Richard Biener  <rguenther@suse.de>

	* genmatch.c (dt_node::gen_kids_1): Fix case label indenting.
	(decision_tree::gen_gimple): Likewise.

From-SVN: r225765
2015-07-14 08:40:51 +00:00
Tom de Vries cf7416c32c Ignore -ftree-parallelize-loops={0,1} using gt
2015-07-14  Tom de Vries  <tom@codesourcery.com>

	* gcc.c (greater_than_spec_func): Declare forward.
	(LINK_COMMAND_SPEC, GOMP_SELF_SPECS): Use gt to ignore
	-ftree-parallelize-loops={0,1}.
	(static_spec_functions): Add greater_than_spec_func function with name
	"gt".
	(greater_than_spec_func): New function.

From-SVN: r225764
2015-07-14 08:25:57 +00:00
Richard Biener c9080ba2a7 tree-ssa-dom.c (record_temporary_equivalences): Merge wideing type conversion case from record_equivalences_from_incoming_edge...
2015-07-14  Richard Biener  <rguenther@suse.de>

	* tree-ssa-dom.c (record_temporary_equivalences): Merge
	wideing type conversion case from record_equivalences_from_incoming_edge
	and use record_equality to record equivalences.
	(record_equivalences_from_incoming_edge): Call
	record_temporary_equivalences.

From-SVN: r225761
2015-07-14 07:27:04 +00:00
Richard Biener 8fdc6c67ad genmatch.c (struct operand): Add OP_IF and OP_WITH op_types.
2015-07-14  Richard Biener  <rguenther@suse.de>

	* genmatch.c (struct operand): Add OP_IF and OP_WITH op_types.
	(struct if_expr): New.
	(struct with_expr): Likewise.
	(is_a_helper): Add helpers for if_expr and with_expr.
	(struct simplify): Add simplify_kind enum and member.  Remove
	ifexpr_vec member.
	(simplify::simplify): Adjust.
	(lower_commutative): Adjust.
	(lower_opt_convert): Likewise.
	(lower_cond): Likewise.
	(replace_id): Handle with_expr and if_expr.
	(lower_for): Adjust.
	(dt_simplify::gen_1): New recursive worker, split out from ...
	(dt_simplify::gen): ... here.  Deal with if and with expansion
	recursively.
	(capture_info::capture_info): Take context argument
	(capture_info::walk_result): Only analyze specific result.
	(parser::parse_result): New function.
	(parser::parse_simplify): Adjust to parse ifs with then end
	else case.
	(parser::parse_if): Simplify.
	(parser::parse_pattern): Pass down simplify kind.
	* match.pd: Convert if structure to new syntax.

From-SVN: r225760
2015-07-14 07:25:55 +00:00
Marek Polacek c05fbb626f * rtl.c (rtx_equal_p_cb): Fix typo.
From-SVN: r225747
2015-07-13 19:41:01 +00:00
Andrew MacLeod 9c358739d7 omega.h: Don't include config.h...
* omega.h: Don't include config.h, don't include params.h again if
	omega.h has already been included.
	* graphite-poly.h: Include sese.h.
	* graphite.c: Don't include sese.h, remove needless includes and 
	minimize includes outside #ifdef HAVE_isl block.
	* graphite-blocking.c: Don't include sese.h, remove needless includes,
	and wrap entire file in #ifdef HAVE_isl
	* graphite-dependences.c: Likewise.
	* graphite-interchange.c: Likewise.
	* graphite-isl-ast-to-gimple.c: Likewise.
	* graphite-optimize-isl.c: Likewise.
	* graphite-poly.c: Likewise.
	* graphite-scop-detection.c: Likewise.
	* graphite-sese-to-poly.c: Likewise.

From-SVN: r225741
2015-07-13 15:41:54 +00:00
Tom de Vries f1b9b669f5 Mark *.omp_data_i as non-trapping
2015-07-13  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (build_receiver_ref): Mark *.omp_data_i as non-trapping.

From-SVN: r225731
2015-07-13 09:46:37 +00:00
Renlin Li 2d87c1d472 [PATCH]Fix PR66556.
[PATCH]Fix PR66556. Don't drop side-effect in
simplify_const_relational_operation function.

gcc/

2015-07-13  Renlin Li  <renlin.li@arm.com>

	PR rtl/66556
	* simplify-rtx.c (simplify_const_relational_operation): Add
	side_effects_p checks.

gcc/testsuite/

2015-07-13  Renlin Li  <renlin.li@arm.com>

	PR rtl/66556
	* gcc.c-torture/execute/pr66556.c: New.

From-SVN: r225729
2015-07-13 08:29:46 +00:00
Aldy Hernandez 026c3cfd5e Fix double word typos.
From-SVN: r225726
2015-07-13 04:46:34 +00:00
Kugan Vivekanandarajah 9844173510 re PR tree-optimization/66726 (missed optimization, factor conversion out of COND_EXPR)
gcc/testsuite/ChangeLog:

2015-07-12  Kugan Vivekanandarajah  <kuganv@linaro.org>
	    Jeff Law  <law@redhat.com>

	PR middle-end/66726
	* g++.dg/tree-ssa/pr66726.c: New test.
	* gcc.dg/tree-ssa/pr66726-2.c: New test.
	* gcc.dg/tree-ssa/pr66726.c: New test.


gcc/ChangeLog:

2015-07-12  Kugan Vivekanandarajah  <kuganv@linaro.org>

	PR middle-end/66726
	* tree-ssa-phiopt.c(factor_out_conditional_conversion): New function.
	tree_ssa_phiopt_worker): Call it.



Co-Authored-By: Jeff Law <law@redhat.com>

From-SVN: r225722
2015-07-12 11:22:42 +00:00
Kugan Vivekanandarajah 7f7379f6f4 cse.c (cse_insn): Calculate src_eqv for ZERO_EXTRACT.
gcc/ChangeLog:

2015-07-12  Kugan Vivekanandarajah  <kuganv@linaro.org>

	* cse.c (cse_insn): Calculate src_eqv for ZERO_EXTRACT.
	* emit-rtl.c (set_for_reg_notes): Allow ZERO_EXTRACT to set
	REG_EQUAL note.

From-SVN: r225721
2015-07-12 11:16:30 +00:00
Marek Polacek f1544089c1 re PR middle-end/66353 (Missing bb_has_abnormal_call_pred in basic-block.h)
PR middle-end/66353
	* basic-block.h	(has_abnormal_call_or_eh_pred_edge_p): New function.
	* ira-lives.c (bb_has_abnormal_call_pred): Remove function.
	(process_bb_node_lives): Call has_abnormal_call_or_eh_pred_edge_p
	rather than bb_has_abnormal_call_pred.
	* lra-lives.c (bb_has_abnormal_call_pred): Remove function.
	(process_bb_lives): Call has_abnormal_call_or_eh_pred_edge_p
	rather than bb_has_abnormal_call_pred.

From-SVN: r225711
2015-07-11 10:03:38 +00:00
Anatoly Sokolov b3ba1c09a8 [V850] Hookize GO_IF_LEGITIMATE_ADDRESS
From-SVN: r225690
2015-07-11 00:31:19 +03:00
H.J. Lu a0ff7835af Allow indirect sibcall with register arguments
Indirect sibcall with register arguments is OK when there is register
available for argument passing.

gcc/

	PR target/66819
	* config/i386/i386.c (ix86_function_ok_for_sibcall): Allow
	indirect sibcall with register arguments if register available
	for argument passing.
	(init_cumulative_args): Set cfun->machine->arg_reg_available
	to (cum->nregs > 0) or to true if function has a variable
	argument list.
	(function_arg_advance_32): Set cfun->machine->arg_reg_available
	to false if cum->nregs <= 0.
	* config/i386/i386.h (machine_function): Add arg_reg_available.

gcc/testsuite/

	PR target/66819
	* gcc.target/i386/pr66819-1.c: New test.
	* gcc.target/i386/pr66819-2.c: Likewise.
	* gcc.target/i386/pr66819-3.c: Likewise.
	* gcc.target/i386/pr66819-4.c: Likewise.
	* gcc.target/i386/pr66819-5.c: Likewise.

From-SVN: r225688
2015-07-10 13:30:10 -07:00
Uros Bizjak 112fc9c399 sse.md (movdi_to_sse): Use gen_lowpart and gen_higpart instead of gen_rtx_SUBREG.
* config/i386/sse.md (movdi_to_sse): Use gen_lowpart
	and gen_higpart instead of gen_rtx_SUBREG.
	* config/i386/i386.md
	(floatdi<X87MODEF:mode>2_i387_with_xmm splitter): Ditto.
	(read-modify peephole2): Use gen_lowpart instead of
	gen_rtx_SUBREG for operand 5.

From-SVN: r225682
2015-07-10 18:01:30 +02:00
Andrew MacLeod 2f40fae2d9 gen-mul-tables.cc (main): Change include list for generated files.
2015-07-10  Andrew MacLeod  <amacleod@redhat.com>

	* config/tilepro/gen-mul-tables.cc (main): Change include list for
	generated files.
	* config/tilepro/mul-tables.c: Regenerate.
	* config/tilegx/mul-tables.c: Regenerate.

From-SVN: r225675
2015-07-10 13:22:45 +00:00
Richard Biener 14ea9f9283 fold-const.c (distribute_bit_expr): Remove.
2015-07-10  Richard Biener  <rguenther@suse.de>

	* fold-const.c (distribute_bit_expr): Remove.
	(fold_binary_loc): Move simplifying (A & C1) + (B & C2)
	to (A & C1) | (B & C2), distributing (A & B) | (A & C)
	to A & (B | C) and simplifying A << C1 << C2 to ...
	* match.pd: ... patterns here.

From-SVN: r225670
2015-07-10 12:31:05 +00:00
Jiong Wang 53021678c5 [AArch64] Mark GOT related MEM rtx as const to help RTL loop IV
gcc/
    * config/aarch64/aarch64.c (aarch64_load_symref_appropriately): Mark mem
    as READONLY and NOTRAP for PIC symbol.

  gcc/testsuite/
    * gcc.target/aarch64/got_mem_hoist_1.c: New test.

From-SVN: r225669
2015-07-10 12:20:54 +00:00
Andrew MacLeod 9fdcd34e0f gimple-predict.h: New file.
2015-07-10  Andrew MacLeod  <amacleod@redhat.com>

	* gimple-predict.h: New file. 
	(gimple_predict_predictor, gimple_predict_set_predictor,
	gimple_predict_outcome, gimple_predict_set_outcome,
	gimple_build_predict): Relocate here.
	* gimple.h (gimple_predict_predictor, gimple_predict_set_predictor,
	gimple_predict_outcome, gimple_predict_set_outcome): Move to 
	gimple-predict.h.
	* gimple.c (gimple_build_predict): Move to gimple-predict.h
	* basic-block.h: Don't include cfghooks.h.
	* backend.h: Don't include predict.h.
	* cfghooks.h: Include predict.h.
	* gimple-pretty-print.c: Include gimple-predict.h.
	* gimplify.c: Likwise.
	* predict.c: Adjust includes.
	* tree-inline.c: Likewise.
	* asan.c: Likewise.
	* auto-inc-dec.c: Likewise.
	* auto-profile.c: Likewise.
	* bb-reorder.c: Likewise.
	* builtins.c: Likewise.
	* caller-save.c: Likewise.
	* calls.c: Likewise.
	* cfganal.c: Likewise.
	* cfgbuild.c: Likewise.
	* cfg.c: Likewise.
	* cfgcleanup.c: Likewise.
	* cfgexpand.c: Likewise.
	* cfghooks.c: Likewise.
	* cfgloopanal.c: Likewise.
	* cfgloop.c: Likewise.
	* cfgloopmanip.c: Likewise.
	* cfgrtl.c: Likewise.
	* cgraph.c: Likewise.
	* cgraphunit.c: Likewise.
	* combine.c: Likewise.
	* cprop.c: Likewise.
	* cse.c: Likewise.
	* dce.c: Likewise.
	* dojump.c: Likewise.
	* dse.c: Likewise.
	* except.c: Likewise.
	* expmed.c: Likewise.
	* expr.c: Likewise.
	* final.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* fwprop.c: Likewise.
	* gcc-plugin.h: Likewise.
	* gcse.c: Likewise.
	* genattrtab.c: Likewise.
	* genemit.c: Likewise.
	* gengtype.c: Likewise.
	* genopinit.c: Likewise.
	* genoutput.c: Likewise.
	* genpreds.c: Likewise.
	* genrecog.c: Likewise.
	* gimple-fold.c: Likewise.
	* gimple-iterator.c: Likewise.
	* gimple-ssa-isolate-paths.c: Likewise.
	* gimple-ssa-strength-reduction.c: Likewise.
	* graph.c: Likewise.
	* graphite-blocking.c: Likewise.
	* graphite.c: Likewise.
	* graphite-dependences.c: Likewise.
	* graphite-interchange.c: Likewise.
	* graphite-isl-ast-to-gimple.c: Likewise.
	* graphite-optimize-isl.c: Likewise.
	* graphite-poly.c: Likewise.
	* graphite-scop-detection.c: Likewise.
	* graphite-sese-to-poly.c: Likewise.
	* haifa-sched.c: Likewise.
	* ifcvt.c: Likewise.
	* internal-fn.c: Likewise.
	* ipa-cp.c: Likewise.
	* ipa-profile.c: Likewise.
	* ipa-split.c: Likewise.
	* ipa-utils.c: Likewise.
	* ira-build.c: Likewise.
	* ira-color.c: Likewise.
	* ira-conflicts.c: Likewise.
	* ira-costs.c: Likewise.
	* ira-emit.c: Likewise.
	* ira-lives.c: Likewise.
	* jump.c: Likewise.
	* loop-doloop.c: Likewise.
	* loop-init.c: Likewise.
	* loop-invariant.c: Likewise.
	* loop-unroll.c: Likewise.
	* lower-subreg.c: Likewise.
	* lra-assigns.c: Likewise.
	* lra.c: Likewise.
	* lra-coalesce.c: Likewise.
	* lra-constraints.c: Likewise.
	* lra-lives.c: Likewise.
	* lto-cgraph.c: Likewise.
	* lto-streamer-in.c: Likewise.
	* mode-switching.c: Likewise.
	* modulo-sched.c: Likewise.
	* omp-low.c: Likewise.
	* optabs.c: Likewise.
	* passes.c: Likewise.
	* postreload.c: Likewise.
	* postreload-gcse.c: Likewise.
	* profile.c: Likewise.
	* recog.c: Likewise.
	* regstat.c: Likewise.
	* reload1.c: Likewise.
	* reorg.c: Likewise.
	* rtlanal.c: Likewise.
	* sched-ebb.c: Likewise.
	* sel-sched-ir.c: Likewise.
	* sese.c: Likewise.
	* shrink-wrap.c: Likewise.
	* simplify-rtx.c: Likewise.
	* stmt.c: Likewise.
	* store-motion.c: Likewise.
	* tracer.c: Likewise.
	* trans-mem.c: Likewise.
	* tree-call-cdce.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-chkp.c: Likewise.
	* tree-complex.c: Likewise.
	* tree-eh.c: Likewise.
	* tree-if-conv.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-outof-ssa.c: Likewise.
	* tree-parloops.c: Likewise.
	* tree-predcom.c: Likewise.
	* tree-pretty-print.c: Likewise.
	* tree-profile.c: Likewise.
	* tree-sra.c: Likewise.
	* tree-ssa.c: Likewise.
	* tree-ssa-coalesce.c: Likewise.
	* tree-ssa-dce.c: Likewise.
	* tree-ssa-dom.c: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* tree-ssa-ifcombine.c: Likewise.
	* tree-ssa-loop-ch.c: Likewise.
	* tree-ssa-loop-im.c: Likewise.
	* tree-ssa-loop-ivcanon.c: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* tree-ssa-loop-manip.c: Likewise.
	* tree-ssa-loop-prefetch.c: Likewise.
	* tree-ssa-loop-unswitch.c: Likewise.
	* tree-ssa-math-opts.c: Likewise.
	* tree-ssa-phiopt.c: Likewise.
	* tree-ssa-pre.c: Likewise.
	* tree-ssa-reassoc.c: Likewise.
	* tree-ssa-sink.c: Likewise.
	* tree-ssa-tail-merge.c: Likewise.
	* tree-ssa-threadedge.c: Likewise.
	* tree-ssa-threadupdate.c: Likewise.
	* tree-switch-conversion.c: Likewise.
	* tree-tailcall.c: Likewise.
	* tree-vect-data-refs.c: Likewise.
	* tree-vect-loop.c: Likewise.
	* tree-vect-loop-manip.c: Likewise.
	* tree-vectorizer.c: Likewise.
	* tree-vrp.c: Likewise.
	* ubsan.c: Likewise.
	* value-prof.c: Likewise.
	* varasm.c: Likewise.
	* var-tracking.c: Likewise.
	* config/aarch64/aarch64-builtins.c: Likewise.
	* config/aarch64/aarch64.c: Likewise.
	* config/aarch64/cortex-a57-fma-steering.c: Likewise.
	* config/alpha/alpha.c: Likewise.
	* config/arc/arc.c: Likewise.
	* config/arm/arm.c: Likewise.
	* config/avr/avr.c: Likewise.
	* config/bfin/bfin.c: Likewise.
	* config/c6x/c6x.c: Likewise.
	* config/cr16/cr16.c: Likewise.
	* config/cris/cris.c: Likewise.
	* config/darwin.c: Likewise.
	* config/darwin-c.c: Likewise.
	* config/epiphany/epiphany.c: Likewise.
	* config/epiphany/mode-switch-use.c: Likewise.
	* config/epiphany/resolve-sw-modes.c: Likewise.
	* config/fr30/fr30.c: Likewise.
	* config/frv/frv.c: Likewise.
	* config/ft32/ft32.c: Likewise.
	* config/h8300/h8300.c: Likewise.
	* config/i386/i386.c: Likewise.
	* config/i386/winnt.c: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/iq2000/iq2000.c: Likewise.
	* config/lm32/lm32.c: Likewise.
	* config/m32c/m32c.c: Likewise.
	* config/m32r/m32r.c: Likewise.
	* config/m68k/m68k.c: Likewise.
	* config/mcore/mcore.c: Likewise.
	* config/mep/mep.c: Likewise.
	* config/microblaze/microblaze.c: Likewise.
	* config/mips/mips.c: Likewise.
	* config/mmix/mmix.c: Likewise.
	* config/mn10300/mn10300.c: Likewise.
	* config/moxie/moxie.c: Likewise.
	* config/msp430/msp430.c: Likewise.
	* config/nds32/nds32.c: Likewise.
	* config/nds32/nds32-cost.c: Likewise.
	* config/nds32/nds32-fp-as-gp.c: Likewise.
	* config/nds32/nds32-intrinsic.c: Likewise.
	* config/nds32/nds32-isr.c: Likewise.
	* config/nds32/nds32-md-auxiliary.c: Likewise.
	* config/nds32/nds32-memory-manipulation.c: Likewise.
	* config/nds32/nds32-pipelines-auxiliary.c: Likewise.
	* config/nds32/nds32-predicates.c: Likewise.
	* config/nios2/nios2.c: Likewise.
	* config/nvptx/nvptx.c: Likewise.
	* config/pa/pa.c: Likewise.
	* config/pdp11/pdp11.c: Likewise.
	* config/rl78/rl78.c: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* config/rx/rx.c: Likewise.
	* config/s390/s390.c: Likewise.
	* config/sh/sh.c: Likewise.
	* config/sh/sh-mem.cc: Likewise.
	* config/sh/sh_optimize_sett_clrt.cc: Likewise.
	* config/sh/sh_treg_combine.cc: Likewise.
	* config/sparc/sparc.c: Likewise.
	* config/spu/spu.c: Likewise.
	* config/stormy16/stormy16.c: Likewise.
	* config/tilegx/tilegx.c: Likewise.
	* config/tilepro/tilepro.c: Likewise.
	* config/v850/v850.c: Likewise.
	* config/vax/vax.c: Likewise.
	* config/visium/visium.c: Likewise.
	* config/xtensa/xtensa.c: Likewise.

java
2015-07-10  Andrew MacLeod  <amacleod@redhat.com>

	* java-gimplify.c: Include cfghooks.h rather than predict.h.

lto
2015-07-10  Andrew MacLeod  <amacleod@redhat.com>

	* lto.c: Include cfghooks.h rather than predict.h.

From-SVN: r225668
2015-07-10 12:13:06 +00:00
Richard Biener 1651e9b17c genmatch.c (dt_node::gen_kids_1): Fix indenting of case labels.
2015-07-10  Richard Biener  <rguenther@suse.de>

	* genmatch.c (dt_node::gen_kids_1): Fix indenting of
	case labels.
	(decision_tree::gen_gimple): Likewise.
	(decision_tree::gen_generic): Likewise.

From-SVN: r225663
2015-07-10 11:59:00 +00:00
Uros Bizjak d7cb4840b7 re PR target/66813 (gcc.target/i386/asm-flag-5.c failed with -march=pentium)
PR target/66813
	* config/i386/i386.c (ix86_md_asm_adjust): Emit movstrictqi
	sequence for TARGET_ZERO_EXTEND_WITH_AND targets.

testsuite/ChangeLog:

	PR target/66813
	* gcc.target/i386/pr66813.c: New test.

From-SVN: r225662
2015-07-10 13:56:48 +02:00
Jakub Jelinek d26fc9797b re PR middle-end/66820 (internal compiler error: in get_expr_operands, at tree-ssa-operands.c:910)
PR middle-end/66820
	* gimplify.c (maybe_fold_stmt): Don't fold in ORT_PARALLEL
	or ORT_TASK contexts.
	* omp-low.c (lower_omp): Call fold_stmt even if taskreg_nesting_level
	is non-zero.

	* gcc.dg/gomp/pr66820.c: New test.

From-SVN: r225661
2015-07-10 12:26:19 +02:00
Kyrylo Tkachov e9f4322e78 [obvious] Fix typos above expand_cond_expr_using_cmove
* expr.c (expand_cond_expr_using_cmove): Fix typos in comment
	above function.

From-SVN: r225659
2015-07-10 09:45:32 +00:00
Tom de Vries 9f620bf1ea Insert new bound in try_transform_to_exit_first_loop_alt
2015-07-10  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c (try_transform_to_exit_first_loop_alt): If not found,
	insert nit + 1 bound.

	* testsuite/libgomp.fortran/parloops-exit-first-loop-alt-2.f95: New test.
	* testsuite/libgomp.fortran/parloops-exit-first-loop-alt.f95: New test.

	* gfortran.dg/parloops-exit-first-loop-alt-2.f95: New test.
	* gfortran.dg/parloops-exit-first-loop-alt.f95: New test.

From-SVN: r225655
2015-07-10 08:25:18 +00:00
Richard Biener 094fe02336 tree-if-conv.c (if_convertible_gimple_assign_stmt_p): Use ifcvt_could_trap_p also when not flag_tree_loop_if_convert_stores.
2015-07-10  Richard Biener  <rguenther@suse.de>

	* tree-if-conv.c (if_convertible_gimple_assign_stmt_p):
	Use ifcvt_could_trap_p also when not flag_tree_loop_if_convert_stores.
	(if_convertible_loop_p_1): For this always compute bb predicates.
	(if_convertible_loop_p): And free them.

From-SVN: r225654
2015-07-10 08:20:15 +00:00
Bernhard Reutner-Fischer 2374c427a8 ipa-icf.c: Fix typo in dump message
2015-07-10  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>

	* ipa-icf.c (sem_item_optimizer::do_congruence_step): Fix typo
	in dump message.

From-SVN: r225653
2015-07-10 09:56:15 +02:00
Richard Biener 9d0862bf58 re PR tree-optimization/66823 (-ftree-loop-if-convert-stores miscompiles gfortran.dg/elemental_optional_args_3.f90)
2015-07-10  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/66823
	* tree-if-conv.c (memrefs_read_or_written_unconditionally): Fix
	inverted predicate.

	* gcc.dg/vect/pr61194.c: Remove -ftree-loop-if-convert-stores
	which should not be necessary.  XFAIL.

From-SVN: r225652
2015-07-10 07:53:06 +00:00
Steve Ellcey 1b57920b92 mti-linux.h (MIPS_SYSVERSION_SPEC): Update to handle mips[32|64]r3 and mips[32|64]r5.
2015-07-09  Steve Ellcey  <sellcey@imgtec.com>

	* config/mips/mti-linux.h (MIPS_SYSVERSION_SPEC): Update
	to handle mips[32|64]r3 and mips[32|64]r5.

From-SVN: r225643
2015-07-09 22:17:22 +00:00
Jakub Jelinek a0945730e5 re PR middle-end/66633 (ICE on valid "verify_gimple failed" with OpenMP)
PR middle-end/66633
	* tree-nested.c (get_static_chain): Or in a flag into
	info->static_chain_added.
	(get_frame_field, get_nonlocal_debug_decl): Likewise.
	(convert_nonlocal_omp_clauses, convert_local_omp_clauses): Revert
	2015-07-01 changes.
	(convert_tramp_reference_stmt): If a frame_decl or chain_decl
	is needed newly inside of GIMPLE_OMP_{PARALLEL,TASK,TARGET} body,
	add it to clauses.

	* gcc.dg/gomp/pr66633-1.c: New test.
	* gcc.dg/gomp/pr66633-2.c: New test.
	* gcc.dg/gomp/pr66633-3.c: New test.
	* gcc.dg/gomp/pr66633-4.c: New test.

From-SVN: r225638
2015-07-09 23:14:11 +02:00
Jakub Jelinek 17b658af66 re PR tree-optimization/66718 (Non-invariant ADDR_EXPR not vectorized)
PR tree-optimization/66718
	* tree-vect-stmts.c (struct simd_call_arg_info): Add simd_lane_linear
	field.
	(vect_simd_lane_linear): New function.
	(vectorizable_simd_clone_call): Support using linear arguments for
	addresses of arrays elements indexed by GOMP_SIMD_LANE result.

From-SVN: r225637
2015-07-09 23:11:28 +02:00
H.J. Lu 89be2b1bae Adjust variable shift costs for IA MCU
We reduce code size for IA MCU by adjusting variable shift costs for IA
MCU

	PR target/66821
	* config/i386/i386.c (iamcu_cost): Adjust variable shift costs.

From-SVN: r225635
2015-07-09 13:35:56 -07:00
Michael Meissner b6d99e1c2d rs6000-protos.h (rs6000_secondary_reload_memory): Use machine mode, not enum machine_mode in the prototype.
2015-07-09  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/rs6000-protos.h (rs6000_secondary_reload_memory):
	Use machine mode, not enum machine_mode in the prototype.

	* config/rs6000/rs6000.h (FLOAT128_IEEE_P): New helper macros to
	classify 128-bit floating point support.
	(FLOAT128_IBM_P): Likewise.
	(FLOAT128_VECTOR_P): Likewise.
	(FLOAT128_2REG_P): Likewise.
	(SCALAR_FLOAT_MODE_NOT_VECTOR_P): Likewise.
	(SLOW_UNALIGNED_ACCESS): Add IEEE 128-bit floating point support.
	(HARD_REGNO_CALLER_SAVE_MODE): Likewise.
	(HARD_REGNO_CALL_PART_CLOBBERED): Likewise.

	* config/rs6000/rs6000.c (rs6000_hard_regno_nregs_internal): Drop
	tests against TFmode/TDmode, since those modes do not use VSX
	addresses.
	(rs6000_hard_regno_mode_ok): Add IEEE 128-bit floating point
	support.
	(rs6000_init_hard_regno_mode_ok): Use new helper macros instead of
	tests against TFmode, etc.
	(invalid_e500_subreg): Add tests against IFmode/KFmode.
	(reg_offset_addressing_ok_p): Likewise.
	(rs6000_legitimate_offset_address_p): Likewise.
	(rs6000_legitimize_address): Likewise.
	(rs6000_legitimize_reload_address): Likewise.
	(rs6000_legitimate_address_p): Clean up tests against TFmode and
	TDmode to use the new helper macros, which will include IFmode and
	KFmode.
	(rs6000_emit_move): Likewise.
	(rs6000_darwin64_record_arg_recurse): Likewise.
	(print_operand): Likewise.
	(rs6000_member_type_forces_blk): Treat IEEE 128-bit floating point
	that uses a single vector register as a vector and not as a
	floating point register in terms of the calling sequence.
	(rs6000_discover_homogeneous_aggregate): Likewise.
	(rs6000_return_in_memory): Likewise.
	(init_cumulative_args): Likewise.
	(rs6000_function_arg_boundary): Likewise.
	(rs6000_function_arg_advance_1): Likewise.
	(rs6000_function_arg): Likewise.
	(rs6000_pass_by_reference): Likewise.
	(rs6000_gimplify_va_arg): Likewise.
	(rs6000_secondary_reload_memory): Use machine_mode not enum
	machine mode.
	(rs6000_split_multireg_move): Use new helper macros.
	(spe_func_has_64bit_regs_p): Likewise.
	(rs6000_output_function_epilogue): Add IFmode/KFmode support.
	(output_toc): Use new helper macros.
	(rs6000_register_move_cost): Likewise.
	(rs6000_function_value): Add IEEE 128-bit floating point calling
	sequence support.
	(rs6000_libcall_value): Likewise.
	(rs6000_scalar_mode_supported_p): Add support for IEEE 128-bit
	floating point support.
	(rs6000_vector_mode_supported_p): Likewise.

From-SVN: r225632
2015-07-09 18:57:06 +00:00
Vladimir Makarov 9d86e84ec0 re PR rtl-optimization/66782 (Unable to run 64-bit wine after MS->SYSV register changes)
2015-07-09  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/66782
	* lra-int.h (struct lra_insn_recog_data): Add comment about
	clobbered hard regs for arg_hard_regs.
	* lra.c (lra_set_insn_recog_data): Add clobbered hard regs.
	* lra-lives.c (process_bb_lives): Process clobbered hard regs.
	Add condition for processing used hard regs.
	* lra-constraints.c (update_ebb_live_info, inherit_in_ebb):
	Process clobbered hard regs.

From-SVN: r225618
2015-07-09 15:39:53 +00:00
Michael Matz c551c21da8 genmatch.c (fprintf_indent): New function.
* genmatch.c (fprintf_indent): New function.
	(operand::gen_transform): Add indent parameter.
	(expr::gen_transform, c_expr::gen_transform,
	capture::gen_transform): Ditto and use fprintf_indent.
	(dt_node::gen, dt_node::gen_kids, dt_node::gen_kids_1): Ditto.
	(dt_operand::gen, dt_operand::gen_predicate,
	dt_operand::gen_match_op, dt_operand::gen_gimple_expr,
	dt_operand::gen_generic_expr, dt_simplify::gen): Ditto.
	(decision_tree::gen_gimple): Adjust calls and indent generated
	code.
	(decision_tree::gen_generic): Ditto.
	(write_predicate): Ditto.

From-SVN: r225617
2015-07-09 15:19:46 +00:00
Uros Bizjak cb1fd5b43f re PR target/66814 (ICE: gcc.target/i386/avx512f-klogic-2.c)
PR target/66814
	* config/i386/predicates.md (nonimmediate_gr_operand): New predicate.
	* config/i386/i386.md (not peephole2): Use nonimmediate_gr_operand.
	(varous peephole2s): Use {GENERAL,SSE,MMX}_REGNO_P instead of
	{GENERAL_SSE_MMX}_REG_P where appropriate.

testsuite/ChangeLog:

	PR target/66814
	* gcc.target/i386/pr66814.c: New test.

From-SVN: r225616
2015-07-09 17:18:44 +02:00
Andrew MacLeod f51ade332a lto-streamer.h: Don't include target.h and alloc-pool.h.
2015-07-09  Andrew MacLeod  <amacleod@redhat.com>

	* lto-streamer.h: Don't include target.h and alloc-pool.h.
	* builtins.c: Adjust includes.
	* gimple.c: Likewise.
	* ipa-icf.c: Likewise.
	* lto-opts.c: Likewise.
	* ipa-reference.c: Likewise.
	* lto-section-out.c: Likewise.
	* lto-streamer-in.c: Likewise.
	* lto-streamer-out.c: Likewise.
	* opts-global.c: Likewise.
	* symtab.c: Likewise.
	* tree-chkp.c: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-streamer-in.c: Likewise.
	* tree-streamer-out.c: Likewise.
	* config/darwin.c: Likewise.
	* config/i386/winnt.c: Likewise.

cp
2015-07-09  Andrew MacLeod  <amacleod@redhat.com>

	* cp-ubsan.c: Don't include alloc-pool.h or lto-streamer.h.

lto
2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
	* lto-lang.c: Adjust includes of target.h, alloc-pool.h and
	lto-streamer.h.
	* lto-object.c: Likewise.
	* lto-partition.c: Likewise.
	* lto-symtab.c: Likewise.

From-SVN: r225612
2015-07-09 14:24:20 +00:00
Richard Biener 44fc0a5136 genmatch.c (struct expr): Add force_single_use flag.
2015-07-09  Richard Biener  <rguenther@suse.de>

	* genmatch.c (struct expr): Add force_single_use flag.
	(expr::expr): Add copy constructor.
	(capture_info::walk_match): Gather force_single_use captures.
	(expr::gen_transform): Use possibly NULLified sequence.
	(dt_simplify::gen): Apply single-use restrictions by NULLifying
	seq if any constrained expr is not single-use.
	(parser::parse_expr): Refactor to allow multiple flags.  Handle
	's' flag to force an expression have a single-use if the pattern
	simplifies to more than one statement.
	* match.pd: Convert most single_use conditionals to :s flags.

From-SVN: r225610
2015-07-09 12:23:22 +00:00
H.J. Lu d48ca70553 Update config/i386/iamcu.h
Copy ASM_OUTPUT_ALIGNED_BSS, ASM_OUTPUT_MAX_SKIP_ALIGN and
ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX from config/i386/gnu-user.h.

	* config/i386/iamcu.h (ASM_OUTPUT_ALIGNED_BSS): New.
	(ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
	(ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise.

From-SVN: r225609
2015-07-09 05:11:18 -07:00
Andrew MacLeod 1916bcb556 flags.h: Don't include flag-types.h or options.h.
2015-07-09  Andrew MacLeod  <amacleod@redhat.com>

	* flags.h: Don't include flag-types.h or options.h.
	* opts-common.c: Adjust includes.
	* opts-global.c: Likewise.
	* common/config/epiphany/epiphany-common.c: Likewise.

c

	* c-array-notation.c: Adjust includes for flags.h changes.
	* c-objc-common.c: Likewise.

c-family

	* c-common.h: Adjust includes for flags.h changes.
	* stub-objc.c: Likewise.
	
fortran

	* arith.c: Adjust includes for flags.h changes.
	* array.c: Likewise.
	* check.c: Likewise.
	* decl.c: Likewise.
	* error.c: Likewise.
	* expr.c: Likewise.
	* frontend-passes.c: Likewise.
	* interface.c: Likewise.
	* intrinsic.c: Likewise.
	* io.c: Likewise.
	* match.c: Likewise.
	* openmp.c: Likewise.
	* parse.c: Likewise.
	* primary.c: Likewise.
	* resolve.c: Likewise.
	* scanner.c: Likewise.
	* simplify.c: Likewise.
	* symbol.c: Likewise.
	* target-memory.c: Likewise.

jit
	* dummy-frontend.c: Adjust includes for flags.h changes.
	* jit-common.h: Likewise.
	* jit-playback.c: Likewise.

lto
	* lto-lang.c: Adjust includes for flags.h changes.

From-SVN: r225608
2015-07-09 11:27:35 +00:00
H.J. Lu e9c9e772e2 Define ATTRIBUTE_ALIGNED_VALUE to 32 for IA MCU
attribute ((aligned)) should align to the minimum of BIGGEST_ALIGNMENT,
which is 4 bytes for -miamcu.

gcc/

	PR target/66818
	* config/i386/i386.h (ATTRIBUTE_ALIGNED_VALUE): Defined to 32
	for IA MCU.

gcc/testsuite/

	PR target/66818
	* gcc.target/i386/pr66818.c: New test.

From-SVN: r225606
2015-07-09 02:28:19 -07:00
H.J. Lu 661c8707bf Check int_size_in_bytes in ix86_return_in_memory
ix86_return_in_memory should check negative return from int_size_in_bytes,
similar to other ports.

gcc/

	PR target/66817
	* config/i386/i386.c (ix86_return_in_memory): Return true
	if int_size_in_bytes returns negative for IA MCU.

gcc/testsuite/

	PR target/66817
	* gcc.target/i386/pr66817.c: New test.

From-SVN: r225605
2015-07-09 02:26:47 -07:00
Marek Polacek ca87c493f7 re PR tree-optimization/66718 (Non-invariant ADDR_EXPR not vectorized)
PR tree-optimization/66718
	* Makefile.in (OBJS): Add gimple-laddress.o. 
	* passes.def: Schedule pass_laddress.
	* timevar.def (DEFTIMEVAR): Add TV_GIMPLE_LADDRESS.
	* tree-pass.h (make_pass_laddress): Declare.
	* gimple-laddress.c: New file.

	* gcc.dg/vect/vect-126.c: New test.

From-SVN: r225604
2015-07-09 09:01:51 +00:00
Richard Biener 6c909a6a21 toplev.c (compile_file): Reset maximum_field_alignment after parsing.
2015-07-08  Richard Biener  <rguenther@suse.de>

	* toplev.c (compile_file): Reset maximum_field_alignment after parsing.

From-SVN: r225603
2015-07-09 08:40:25 +00:00
Richard Biener 830ff0020a re PR middle-end/66807 (--enable-libmpx failed)
2015-07-09  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/66807
	* tree-chkp-opt.c (chkp_opt_fini): Free post dominator info.

From-SVN: r225600
2015-07-09 07:47:38 +00:00
Kito Cheng ebd765d41a function.c (stack_protect_epilogue): Use if rather than switch for check targetm.have_stack_protect_test.
2015-07-08  Kito Cheng  <kito.cheng@gmail.com>

	* function.c (stack_protect_epilogue): Use if rather than switch for
	check targetm.have_stack_protect_test.

From-SVN: r225599
2015-07-08 21:51:21 -06:00
Trevor Saunders 9e11bfef7a always define WORD_REGISTER_OPERATIONS
gcc/ChangeLog:

2015-07-08  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* defaults.h: Provide default for WORD_REGISTER_OPERATIONS.
	* config/alpha/alpha.h: Define WORD_REGISTER_OPERATIONS to 1.
	* config/arc/arc.h: Likewise.
	* config/arm/arm.h: Likewise.
	* config/bfin/bfin.h: Likewise.
	* config/epiphany/epiphany.h: Likewise.
	* config/frv/frv.h: Likewise.
	* config/ia64/ia64.h: Likewise.
	* config/iq2000/iq2000.h: Likewise.
	* config/lm32/lm32.h: Likewise.
	* config/m32r/m32r.h: Likewise.
	* config/mcore/mcore.h: Likewise.
	* config/mep/mep.h: Likewise.
	* config/microblaze/microblaze.h: Likewise.
	* config/mips/mips.h: Likewise.
	* config/mmix/mmix.h: Likewise.
	* config/mn10300/mn10300.h: Likewise.
	* config/nds32/nds32.h: Likewise.
	* config/nios2/nios2.h: Likewise.
	* config/pa/pa.h: Likewise.
	* config/rl78/rl78.h: Likewise.
	* config/sh/sh.h: Likewise.
	* config/sparc/sparc.h: Likewise.
	* config/stormy16/stormy16.h: Likewise.
	* config/tilegx/tilegx.h: Likewise.
	* config/tilepro/tilepro.h: Likewise.
	* config/v850/v850.h: Likewise.
	* config/xtensa/xtensa.h: Likewise.
	* doc/tm.texi: Regenerate.
	* doc/tm.texi.in: Adjust.
	* combine.c (simplify_set): Likewise.
	(simplify_comparison): Likewise.
	* expr.c (store_constructor): Likewise.
	* internal-fn.c (expand_arith_overflow): Likewise.
	* reload.c (push_reload): Likewise.
	(find_reloads): Likewise.
	(find_reloads_subreg_address): Likewise.
	* reload1.c (eliminate_regs_1): Likewise.
	* rtlanal.c (nonzero_bits1): Likewise.
	(num_sign_bit_copies1): Likewise.
	* simplify-rtx.c (simplify_truncation): Likewise.

From-SVN: r225597
2015-07-09 02:51:19 +00:00
Trevor Saunders 760edf20ba reduce conditional compilation based on AUTO_INC_DEC
gcc/ChangeLog:

2015-07-08  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* auto-inc-dec.c (pass_inc_dec::execute): Don't check the value
	of AUTO_INC_DEC with the preprocessor.
	* combine.c (combine_instructions): Likewise.
	(can_combine_p): Likewise.
	(try_combine): Likewise.
	* emit-rtl.c (try_split): Likewise.
	* loop-invariant.c (calculate_loop_reg_pressure): Likewise.
	* lower-subreg.c (resolve_simple_move): Likewise.
	* lra.c (update_inc_notes): Likewise.
	* recog.c (asm_operand_ok): Likewise.
	(constrain_operands): Likewise.
	* regrename.c (scan_rtx_address): Likewise.
	* reload.c (update_auto_inc_notes): Likewise.
	(reg_inc_found_and_valid_p): Likewise.
	* reload1.c (reload): Likewise.
	(emit_input_reload_insns): Likewise.
	(delete_output_reload): Likewise.
	* sched-deps.c (init_insn_reg_pressure_info): Likewise.
	* valtrack.c (cleanup_auto_inc_dec): Likewise.

From-SVN: r225596
2015-07-09 02:51:09 +00:00