Jakub Jelinek [Tue, 19 Jul 2011 13:09:48 +0000 (15:09 +0200)]
backport: re PR target/49621 (ICE in trunc_int_for_mode, at explow.c:57)
Backport from mainline
2011-07-08 Jakub Jelinek <jakub@redhat.com>
PR target/49621
* config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Use
CONST0_RTX (dest_mode) instead of const0_rtx as second operand
of NE.
* config/rs6000/vector.md (vector_select_<mode>,
vector_select_<mode>_uns): Change second operand of NE to
CONST0_RTX (<MODE>mode) instead of const0_rtx.
* config/rs6000/altivec.md (*altivec_vsel<mode>,
*altivec_vsel<mode>_uns): Expect second operand of NE to be
zero_constant of the corresponding vector mode.
* config/rs6000/vsx.md (*vsx_xxsel<mode>, *vsx_xxsel<mode>_uns):
Likewise.
Jakub Jelinek [Tue, 19 Jul 2011 13:08:33 +0000 (15:08 +0200)]
backport: re PR c/49644 (post-increment of promoted operand is incorrect.)
Backport from mainline
2011-07-07 Jakub Jelinek <jakub@redhat.com>
PR c/49644
* typeck.c (cp_build_binary_op): For MULT_EXPR and TRUNC_DIV_EXPR with
one non-complex and one complex argument, call save_expr on both
operands.
Jakub Jelinek [Tue, 19 Jul 2011 13:07:23 +0000 (15:07 +0200)]
backport: re PR c/49644 (post-increment of promoted operand is incorrect.)
Backport from mainline
2011-07-07 Jakub Jelinek <jakub@redhat.com>
PR c/49644
* c-typeck.c (build_binary_op): For MULT_EXPR and TRUNC_DIV_EXPR with
one non-complex and one complex argument, call c_save_expr on both
operands.
Jakub Jelinek [Tue, 19 Jul 2011 13:06:00 +0000 (15:06 +0200)]
backport: re PR middle-end/49640 (Internal compiler in C99 code (using variable-length arrays) and OpenMP)
Backport from mainline
2011-07-07 Jakub Jelinek <jakub@redhat.com>
PR middle-end/49640
* gimplify.c (gimplify_compound_lval): For last 2 ARRAY_*REF
operands and last COMPONENT_REF operand call gimplify_expr on it
if non-NULL.
Jakub Jelinek [Tue, 19 Jul 2011 12:51:29 +0000 (14:51 +0200)]
backport: re PR tree-optimization/49161 (Fix VRP on switch stmts)
Backport from mainline
2011-05-26 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/49161
* tree-vrp.c (struct case_info): New type.
(compare_case_labels): Sort case_info structs instead of
trees, and not primarily by CASE_LABEL uids but by
label_for_block indexes.
(find_switch_asserts): Put case labels into struct case_info
array instead of TREE_VEC, adjust sorting, compare label_for_block
values instead of CASE_LABELs.
Jakub Jelinek [Tue, 19 Jul 2011 12:46:39 +0000 (14:46 +0200)]
backport: re PR middle-end/48973 (Inliner bug with one-bit (1-bit) bitfield)
Backport from mainline
2011-05-23 Jakub Jelinek <jakub@redhat.com>
PR middle-end/48973
* expr.c (expand_expr_real_2) <case LT_EXPR>: If do_store_flag
failed and the comparison has a single bit signed type, use
constm1_rtx instead of const1_rtx for true value.
(do_store_flag): If ops->type is single bit signed type, disable
signel bit test optimization and pass -1 instead of 1 as last
parameter to emit_store_flag_force.
* gcc.c-torture/execute/pr48973-1.c: New test.
* gcc.c-torture/execute/pr48973-2.c: New test.
Eric Botcazou [Thu, 30 Jun 2011 19:37:41 +0000 (19:37 +0000)]
re PR tree-optimization/49572 (gcc.dg/tree-ssa/20030709-2.c scan-tree-dump-times cddce2 ".rtmem" 0)
PR tree-optimization/49572
* tree-ssa-dom.c (initialize_hash_element) <GIMPLE_SINGLE_RHS>: Use the
type of the RHS instead of that of the LHS for the expression type.
Jack Howarth [Sun, 19 Jun 2011 17:39:19 +0000 (17:39 +0000)]
re PR target/49461 (boehm-gc and gcj incompatible with pie)
2011-06-18 Jack Howarth <howarth@bromo.med.uc.edu>
PR target/49461
* configure.ac: Use mh-x86-darwin.
* configure: Regenerate.
* config/mh-x86-darwin: Add file and pass -no_pie on BOOT_LDFLAGS
for darwin11.
re PR rtl-optimization/48542 (unchanged variables in code which calls setjmp may be clobbered (including the return-address))
PR rtl-optimization/48542
* reload.c (find_equiv_reg): Stop looking when finding a
setjmp-type call.
* reload1.c (reload_as_needed): Invalidate all reload
registers when crossing a setjmp-type call.
Kaz Kojima [Thu, 16 Jun 2011 22:08:20 +0000 (22:08 +0000)]
re PR target/49307 (ICE in spill_failure, at reload1.c:2113)
PR target/49307
* config/sh/sh.md (UNSPEC_CHKADD): New.
(chk_guard_add): New define_insn_and_split.
(symGOT_load): Use chk_guard_add instead of blockage.
Kaz Kojima [Wed, 8 Jun 2011 04:10:26 +0000 (04:10 +0000)]
re PR target/49238 ([SH] ICE in extract_insn, at recog.c:2113)
PR target/49238
* config/sh/sh.c (expand_cbranchdi4): Use a scratch register if
needed when original operands are used for msw_skip comparison.
* gcc.c-torture/compile/pr49238.c: New.
Kaz Kojima [Sun, 5 Jun 2011 21:50:29 +0000 (21:50 +0000)]
re PR target/49186 (optimize problem with unsigned long long value.)
PR target/49186
* config/sh/sh.c (expand_cbranchdi4): Set msw_skip when the high
part of the second operand is 0.
* gcc.c-torture/execute/pr49186.c: New.
Ira Rosen [Sat, 4 Jun 2011 09:12:55 +0000 (09:12 +0000)]
re PR tree-optimization/49038 (-ftree-vectorise introduces reads past end of array)
PR tree-optimization/49038
* tree-vect-loop-manip.c (vect_generate_tmps_on_preheader):
Ensure at least one epilogue iteration if required by data
accesses with gaps.
* tree-vectorizer.h (struct _loop_vec_info): Add new field
to mark loops that require peeling for gaps.
* tree-vect-loop.c (new_loop_vec_info): Initialize new field.
(vect_estimate_min_profitable_iters): Take peeling for gaps into
account.
(vect_transform_loop): Generate epilogue if required by data
access with gaps.
* tree-vect-data-refs.c (vect_analyze_group_access): Mark the
loop as requiring an epilogue if there are gaps in the end of
the strided group.