gcc/
* config/sparc/sparc.h: Do not force TARGET_VIS3 and TARGET_FMAF
to zero when assembler lacks support for such instructions.
* config/sparc/sparc.c (sparc_option_override): Clear MASK_VIS3
and MASK_FMAF in defaults when assembler lacks necessary support.
gcc/testsuite/
* gcc.target/sparc/cmask.c: Remove 'vis3' target check and specify
'-mvis3' instead of 'mcpu=niagara3' in options.
* gcc.target/sparc/fhalve.c: Likewise.
* gcc.target/sparc/fnegop.c: Likewise.
* gcc.target/sparc/fpadds.c: Likewise.
* gcc.target/sparc/fshift.c: Likewise.
* gcc.target/sparc/fucmp.c: Likewise.
* gcc.target/sparc/lzd.c: Likewise.
* gcc.target/sparc/vis3misc.c: Likewise.
* gcc.target/sparc/xmul.c: Likewise.
From-SVN: r179875
* config/i386/sse.md (vec_avx2): New mode_attr.
(mulv16qi3): Macroize to cover also mulv32qi3 for
TARGET_AVX2 into ...
(mul<mode>3): ... this.
From-SVN: r179871
* config/i386/i386.md (UNSPEC_VPERMDI): Remove.
* config/i386/i386.c (ix86_expand_vec_perm): Handle
V16QImode and V32QImode for TARGET_AVX2.
(MAX_VECT_LEN): Increase to 32.
(expand_vec_perm_blend): Add support for 32-byte integer
vectors with TARGET_AVX2.
(valid_perm_using_mode_p): New function.
(expand_vec_perm_pshufb): Add support for 32-byte integer
vectors with TARGET_AVX2.
(expand_vec_perm_vpshufb2_vpermq): New function.
(expand_vec_perm_vpshufb2_vpermq_even_odd): New function.
(expand_vec_perm_even_odd_1): Handle 32-byte integer vectors
with TARGET_AVX2.
(ix86_expand_vec_perm_builtin_1): Try expand_vec_perm_vpshufb2_vpermq
and expand_vec_perm_vpshufb2_vpermq_even_odd.
* config/i386/sse.md (VEC_EXTRACT_EVENODD_MODE): Add for TARGET_AVX2
32-byte integer vector modes.
(vec_pack_trunc_<mode>): Use VI248_AVX2 instead of VI248_128.
(avx2_interleave_highv32qi, avx2_interleave_lowv32qi): Remove pasto.
(avx2_pshufdv3, avx2_pshuflwv3, avx2_pshufhwv3): Generate
4 new operands.
(avx2_pshufd_1, avx2_pshuflw_1, avx2_pshufhw_1): Don't use
match_dup, instead add 4 new operands and require they have
right cross-lane values.
(avx2_permv4di): Change into define_expand.
(avx2_permv4di_1): New instruction.
(avx2_permv2ti): Use nonimmediate_operand instead of register_operand
for "xm" constrained operand.
(VEC_PERM_AVX2): Add V32QI and V16QI for TARGET_AVX2.
From-SVN: r179870
* config/i386/sse.md (avx2_gathersi<mode>,
avx2_gatherdi<mode>, avx2_gatherdi<mode>256): Add clobber of
match_scratch, change memory_operand to register_operand,
add (mem:BLK (scratch)) use.
(*avx2_gathersi<mode>, *avx2_gatherdi<mode>,
*avx2_gatherdi<mode>256): Add clobber of match_scratch,
add earlyclobber to the output operand and match_scratch,
add (mem:BLK (scratch)) use, change the other mem to match_operand.
Use %p6 instead of %c6 in the pattern.
* config/i386/i386.c (ix86_expand_builtin): Adjust for
operand 2 being a Pmode register_operand instead of memory_operand.
From-SVN: r179869
* gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
(DECL_INDUCTION_VAR): New macro.
(SET_DECL_INDUCTION_VAR): Likewise.
* gcc-interface/gigi.h (convert_to_index_type): Declare.
(gnat_invariant_expr): Likewise.
* gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
parameter, set DECL_LOOP_PARM_P on it.
* gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
* gcc-interface/trans.c (gnu_loop_label_stack): Delete.
(struct range_check_info_d): New type.
(struct loop_info_d): Likewise.
(gnu_loop_stack): New stack.
(Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
built for a by-double-ref read-only parameter. If DECL_LOOP_PARM_P
is set, do not test DECL_RENAMED_OBJECT.
(push_range_check_info): New function.
(Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
the label. Reference the label and the iteration variable from it.
Build the special induction variable in the unsigned version of the
size type, if it is larger than the base type. And attach it to the
iteration variable if the latter isn't by-ref. In the iteration scheme
case, initialize the invariant conditions in front of the loop if
deemed profitable. Use gnu_loop_stack.
(gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
<N_Raise_Constraint_Error>: Always process the reason. In the range
check and related cases, and if loop unswitching is enabled, compute
invariant conditions and push this information onto the stack.
Do not translate again the condition if it has been already translated.
* gcc-interface/utils.c (record_global_renaming_pointer): Assert that
DECL_LOOP_PARM_P isn't set.
(convert_to_index_type): New function.
* gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
to convert the index from the base index type to sizetype.
(gnat_invariant_expr): New function.
From-SVN: r179868
2011-10-12 Richard Guenther <rguenther@suse.de>
* tree-ssa-alias.c (maybe_skip_until): Cache also at the point
of the first store we visit in a basic-block.
(get_continuation_for_phi): Search for a candidate VUSE that
might dominates all others. Do pairwise disambiguation against
that candidate.
From-SVN: r179858
2011-10-12 Paul Koning <pkoning@gcc.gnu.org>
PR tree-optimization/50189
* tree-vrp.c (extract_range_from_assert): Use the type of
the variable, not the limit.
* g++.dg/torture/pr50189.C: New testcase.
From-SVN: r179857
2011-10-11 Tobias Burnus <burnus@net-b.de>
Janus Weil <janus@gcc.gnu.org>
* invoke.texi (-fwhole-file): Update wording since -fwhole-file
is now enabled by default.
Co-Authored-By: Janus Weil <janus@gcc.gnu.org>
From-SVN: r179854
* function.c (prepare_shrink_wrap, bb_active_p): New function.
(thread_prologue_and_epilogue_insns): Use bb_active_p.
Call prepare_shrink_wrap, then recompute bb_active_p for the
last block.
From-SVN: r179848
PR c/50565
* convert.c (convert_to_integer): Do not narrow operands of
pointer subtraction.
testsuite:
* gcc.c-torture/compile/pr50565-1.c,
gcc.c-torture/compile/pr50565-2.c: New tests.
From-SVN: r179845
* config/arm/arm.h (EMIT_EABI_ATTRIBUTE): New macro. Used to
emit a .eabi_attribute assembler directive, possibly with a
comment attached.
* config/arm/arm.c (arm_file_start): Use the new macro.
* config/arm/arm-c.c (arm_output_c_attributes): Likewise.
From-SVN: r179844
PR target/49939
* config/avr/avr.md (*movqi): Rename to movqi_insn.
(*call_insn): Rename to call_insn.
(*call_value_insn): Rename to call_value_insn.
* config/avr/avr.c (avr_2word_insn_p): New static function.
(jump_over_one_insn_p): Use it.
From-SVN: r179843
gcc/
* expr.h (copy_blkmode_to_reg): Declare.
* expr.c (copy_blkmode_to_reg): New function.
(expand_assignment): Don't expand register RESULT_DECLs before
the lhs. Use copy_blkmode_to_reg to copy BLKmode values into a
RESULT_DECL register.
(expand_expr_real_1): Handle BLKmode decls when looking for promotion.
* stmt.c (expand_return): Move BLKmode-to-register code into
copy_blkmode_to_reg.
From-SVN: r179839
* config/avr/avr-protos.h (avr_mode_code_base_reg_class): New prototype.
(avr_regno_mode_code_ok_for_base_p): New prototype.
* config/avr/avr.h (BASE_REG_CLASS): Remove.
(REGNO_OK_FOR_BASE_P): Remove.
(REG_OK_FOR_BASE_NOSTRICT_P): Remove.
(REG_OK_FOR_BASE_STRICT_P): Remove.
(MODE_CODE_BASE_REG_CLASS): New define.
(REGNO_MODE_CODE_OK_FOR_BASE_P): New define.
* config/avr/avr.c (avr_mode_code_base_reg_class): New function.
(avr_regno_mode_code_ok_for_base_p): New function.
(avr_reg_ok_for_addr_p): New static function.
(avr_legitimate_address_p): Use it. Beautify.
From-SVN: r179817
PR target/50447
* config/avr/avr.md (cc): Add out_plus attribute alternative.
(addsi3): Use it. Adapt avr_out_plus to new prototype. Use
avr_out_plus for all CONST_INT addends.
* config/avr/avr-protos.h (avr_out_plus): Change prototype.
* config/avr/avr.c (notice_update_cc): Call avr_out_plus on
CC_OUT_PLUS.
(avr_out_plus_1): Change prototype and report effect on cc0.
(avr_out_plus): Ditto.
(adjust_insn_length): Adapt call to avr_out_plus to new prototype.
From-SVN: r179816
2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50611
* pt.c (tsubst_copy_and_build): If (complain & tf_error) is false
do not call unqualified_name_lookup_error.
From-SVN: r179802
2011-10-11 Emil Wojak <emil@wojak.eu>
PR c++/50661
* include/bits/stl_algobase.h (equal): Compare arrays of pointers
too with memcmp.
From-SVN: r179801
2011-10-11 Richard Guenther <rguenther@suse.de>
PR tree-optimization/50204
* tree-ssa-alias.c (get_continuation_for_phi_1): Split out
two argument handling from ...
(get_continuation_for_phi): ... here. Handle arbitrary number
of PHI args.
* gcc.dg/tree-ssa/ssa-fre-36.c: New testcase.
From-SVN: r179799
2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/33067
* c-family/c-pretty-print.c (pp_c_floating_constant): Output
max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
From-SVN: r179797
PR c++/48665
* cp-demangle.c (d_cv_qualifiers): If qualifiers are applied to a
function type, change them to apply to the "this" parameter.
* testsuite/demangle-expected: Add test case.
From-SVN: r179772
2011-10-10 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/50564
* frontend-passes (forall_level): New variable.
(cfe_register_funcs): Don't register functions if we
are within a forall loop.
(optimize_namespace): Set forall_level to 0 before entry.
(gfc_code_walker): Increase/decrease forall_level.
2011-10-10 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/50564
* gfortran.dg/forall_15.f90: New test case.
From-SVN: r179770