re PR target/49920 (unable to find a register to spill in class ‘DIREG’)
PR target/49920
* config/i386/i386.md (strset): Do not expand strset_singleop
when %eax or $edi are fixed.
(*strsetdi_rex_1): Disable when %eax or %edi are fixed.
(*strsetsi_1): Ditto.
(*strsetsi_rex_1): Ditto.
(*strsethi_1): Ditto.
(*strsethi_rex_1): Ditto.
(*strsetqi_1): Ditto.
(*strsetqi_rex_1): Ditto.
(*rep_stosdi_rex64): Disable when %eax, %ecx or %edi are fixed.
(*rep_stossi): Ditto.
(*rep_stossi_rex64): Ditto.
(*rep_stosqi): Ditto.
(*rep_stosqi_rex64): Ditto.
(*strlenqi_1): Ditto.
(*strlenqi_rex_1): Ditto.
(cmpstrnsi): Also fail when %ecx is fixed.
(*cmpstrnqi_nz_1): Disable when %ecx, %esi or %edi are fixed.
(*cmpstrnqi_nz_rex_1): Ditto.
(*cmpstrnqi_1): Ditto.
(*cmpstrnqi_rex_1): Ditto.
(*strmovdi_rex_1): Disable when %esi or %edi are fixed.
(*strmovsi_1): Ditto.
(*strmovsi_rex_1): Ditto.
(*strmovhi_1): Ditto.
(*strmovhi_rex_1): Ditto.
(*strmovqi_1): Ditto.
(*strmovqi_rex_1): Ditto.
(*rep_movdi_rex64): Disable when %ecx, %esi or %edi are fixed.
(*rep_movsi): Ditto.
(*rep_movsi_rex64): Ditto.
(*rep_movqi): Ditto.
(*rep_movqi_rex64): Ditto.
testsuite/ChangeLog:
PR target/49920
* gcc.target/i386/pr49920.c: New test.
* gcc.target/i386/avx-os-support.h: New.
* gcc.target/i386/avx-check.h: Include avx-os-support.h
(main): Check avx_os_support before the test is run.
* gcc.target/i386/aes-avx-check.h: Ditto.
* gcc.target/i386/pclmul-avx-check.h: Ditto.
Jakub Jelinek [Thu, 21 Jul 2011 09:39:16 +0000 (11:39 +0200)]
re PR middle-end/48973 (Inliner bug with one-bit (1-bit) bitfield)
PR middle-end/48973
* expr.c (expand_expr_real_1) <case TRUTH_ANDIF_EXPR>: If
the comparison has a single bit signed type, use
constm1_rtx instead of const1_rtx for true value.
Jakub Jelinek [Tue, 19 Jul 2011 19:33:30 +0000 (21:33 +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 19:28:41 +0000 (21:28 +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_1) <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 TREE_TYPE (exp) is single bit signed type, disable
single bit test optimization, pass -1 instead of 1 as last
parameter to emit_store_flag and use constm1_rtx instead of
const1_rtx as true value.
* 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:39:41 +0000 (19:39 +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.
backport: re PR target/43603 (gcc-4.4.3 ICE on ia64 with -O3)
Backport from mainline
2010-12-07 Andrey Belevantsev <abel@ispras.ru>
PR target/43603
* haifa-sched.c (sched_create_recovery_edges): Update
dominator info.
* sel-sched-ir.c (maybe_tidy_empty_bb): Update dominator info
after deleting an empty block, verify dominators.
(sel_remove_bb): Update dominator info after removing a block.
(sel_redirect_edge_and_branch_force): Assert that no unreachable
blocks will be created. Update dominator info.
(sel_redirect_edge_and_branch): Update dominator info when
basic blocks do not become unreachable.
(sel_remove_loop_preheader): Update dominator info.
2010-10-14 Andrey Belevantsev <abel@ispras.ru>
* sel-sched-ir.c (maybe_tidy_empty_bb): Simplify comment.
(tidy_control_flow): Tidy vertical space.
(sel_remove_bb): New variable idx. Use it to remember the basic
block index before deleting the block.
(sel_remove_empty_bb): Remove dead code, simplify and insert to ...
(sel_merge_blocks): ... here. Add forward declaration.
* sel-sched-ir.h (sel_remove_empty_bb): Remove prototype.
(sel_merge_blocks): Likewise.
2011-06-20 Andrey Belevantsev <abel@ispras.ru>
Backport from mainline
2010-12-07 Andrey Belevantsev <abel@ispras.ru>
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 [Sun, 5 Jun 2011 21:53:25 +0000 (21:53 +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.