gcc

2014-11-18  Marat Zakirov  <m.zakirov@samsung.com>

	* opts.c (finish_options): Disable aggressive opts for sanitizer.  
	(common_handle_option): Move code to finish_options.  

gcc/testsuite

2014-11-18  Marat Zakirov  <m.zakirov@samsung.com>

	* c-c++-common/asan/aggressive-opts.c: New test.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217690 138bc75d-0d04-0410-961f-82ee72b054a4
[LRA] Relax one gcc_assert in lra-eliminate for fixed register

  gcc/
    * lra-eliminations.c (update_reg_eliminate): Relax gcc_assert for fixed
    registers.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217691 138bc75d-0d04-0410-961f-82ee72b054a4
[ARM] Handle simple SImode PLUS and MINUS cases in rtx costs

	* config/arm/arm.c (arm_new_rtx_costs, case PLUS, MINUS):
	Add cost of alu.arith in simple SImode case.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217692 138bc75d-0d04-0410-961f-82ee72b054a4
[ARM Refactor Builtins: 1/8] Remove arm_neon.h's "Magic Words"

gcc/testsuite/

	* gcc.target/arm/pr51968.c (foo): Do not try to pass "Magic Word".

gcc/

	* config/arm/arm.c (arm_expand_neon_builtin): Remove "Magic Word"
	parameter, rearrange switch statement accordingly.
	(arm_evpc_neon_vrev): Remove "Magic Word".
	* config/arm/unspecs.md (unspec): Split many UNSPECs to
	rounding, or signed/unsigned variants.
	* config/arm/neon.md: Remove "Magic Word" code.
	* config/arm/iterators.md (VPF): New.
	(VADDL): Likewise.
	(VADDW): Likewise.
	(VHADD): Likewise.
	(VQADD): Likewise.
	(VADDHN): Likewise.
	(VMLAL): Likewise.
	(VMLAL_LANE): Likewise.
	(VLMSL): Likewise.
	(VMLSL_LANE): Likewise.
	(VQDMULH): Likewise,
	(VQDMULH_LANE): Likewise.
	(VMULL): Likewise.
	(VMULL_LANE): Likewise.
	(VSUBL): Likewise.
	(VSUBW): Likewise.
	(VHSUB): Likewise.
	(VQSUB): Likewise.
	(VSUBHN): Likewise.
	(VABD): Likewise.
	(VABDL): Likewise.
	(VMAXMIN): Likewise.
	(VMAXMINF): Likewise.
	(VPADDL): Likewise.
	(VPADAL): Likewise.
	(VPMAXMIN): Likewise.
	(VPMAXMINF): Likewise.
	(VCVT_US): Likewise.
	(VCVT_US_N): Likewise.
	(VQMOVN): Likewise.
	(VMOVL): Likewise.
	(VSHL): Likewise.
	(VQSHL): Likewise.
	(VSHR_N): Likewise.
	(VSHRN_N): Likewise.
	(VQSHRN_N): Likewise.
	(VQSHRUN_N): Likewise.
	(VQSHL_N): Likewise.
	(VSHLL_N): Likewise.
	(VSRA_N): Likewise.
	(pf): Likewise.
	(sup): Likewise.
	(r): Liekwise.
	(maxmin): Likewise.
	(shift_op): Likewise.
	* config/arm/arm_neon_builtins.def: Split many patterns.
	* config/arm/arm_neon.h (vaddl_s8): Remove "Magic Word" code.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217693 138bc75d-0d04-0410-961f-82ee72b054a4
[Patch ARM Refactor Builtins 2/8] Move Processor flags to arm-protos.h

gcc/

	* config/arm/t-arm (arm.o): Include arm-protos.h in the recipe.
	* config/arm/arm.c (FL_CO_PROC): Move to arm-protos.h.
	(FL_ARCH3M): Likewise.
	(FL_MODE26): Likewise.
	(FL_MODE32): Likewise.
	(FL_ARCH4): Likewise.
	(FL_ARCH5): Likewise.
	(FL_THUMB): Likewise.
	(FL_LDSCHED): Likewise.
	(FL_STRONG): Likewise.
	(FL_ARCH5E): Likewise.
	(FL_XSCALE): Likewise.
	(FL_ARCH6): Likewise.
	(FL_VFPV2): Likewise.
	(FL_WBUF): Likewise.
	(FL_ARCH6K): Likewise.
	(FL_THUMB2): Likewise.
	(FL_NOTM): Likewise.
	(FL_THUMB_DIV): Likewise.
	(FL_VFPV3): Likewise.
	(FL_NEON): Likewise.
	(FL_ARCH7EM): Likewise.
	(FL_ARCH7): Likewise.
	(FL_ARM_DIV): Likewise.
	(FL_ARCH8): Likewise.
	(FL_CRC32): Likewise.
	(FL_SMALLMUL): Likewise.
	(FL_IWMMXT): Likewise.
	(FL_IWMMXT2): Likewise.
	(FL_TUNE): Likewise.
	(FL_FOR_ARCH2): Likewise.
	(FL_FOR_ARCH3): Likewise.
	(FL_FOR_ARCH3M): Likewise.
	(FL_FOR_ARCH4): Likewise.
	(FL_FOR_ARCH4T): Likewise.
	(FL_FOR_ARCH5): Likewise.
	(FL_FOR_ARCH5T): Likewise.
	(FL_FOR_ARCH5E): Likewise.
	(FL_FOR_ARCH5TE): Likewise.
	(FL_FOR_ARCH5TEJ): Likewise.
	(FL_FOR_ARCH6): Likewise.
	(FL_FOR_ARCH6J): Likewise.
	(FL_FOR_ARCH6K): Likewise.
	(FL_FOR_ARCH6Z): Likewise.
	(FL_FOR_ARCH6ZK): Likewise.
	(FL_FOR_ARCH6T2): Likewise.
	(FL_FOR_ARCH6M): Likewise.
	(FL_FOR_ARCH7): Likewise.
	(FL_FOR_ARCH7A): Likewise.
	(FL_FOR_ARCH7VE): Likewise.
	(FL_FOR_ARCH7R): Likewise.
	(FL_FOR_ARCH7M): Likewise.
	(FL_FOR_ARCH7EM): Likewise.
	(FL_FOR_ARCH8A): Likewise.
	* config/arm/arm-protos.h: Take definitions moved from arm.c.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217694 138bc75d-0d04-0410-961f-82ee72b054a4
[Patch ARM Refactor Builtins 3/8] Pull builtins code to its own file

gcc/

	* config.gcc (extra_objs): Add arm-builtins.o for arm*-*-*.
	(target_gtfiles): Add config/arm/arm-builtins.c for arm*-*-*.
	* config/arm/arm-builtins.c: New.
	* config/arm/t-arm (arm_builtins.o): New.
	* config/arm/arm-protos.h (arm_expand_builtin): New.
	(arm_builtin_decl): Likewise.
	(arm_init_builtins): Likewise.
	(arm_atomic_assign_expand_fenv): Likewise.
	* config/arm/arm.c (arm_atomic_assign_expand_fenv): Remove prototype.
	(arm_init_builtins): Likewise.
	(arm_init_iwmmxt_builtins): Likewise
	(safe_vector_operand): Likewise
	(arm_expand_binop_builtin): Likewise
	(arm_expand_unop_builtin): Likewise
	(arm_expand_builtin): Likewise
	(arm_builtin_decl): Likewise
	(insn_flags): Remove static.
	(tune_flags): Likewise.
	(enum arm_builtins): Move to config/arm/arm-builtins.c.
	(arm_init_neon_builtins): Likewise.
	(struct builtin_description): Likewise.
	(arm_init_iwmmxt_builtins): Likewise.
	(arm_init_fp16_builtins): Likewise.
	(arm_init_crc32_builtins): Likewise.
	(arm_init_builtins): Likewise.
	(arm_builtin_decl): Likewise.
	(safe_vector_operand): Likewise.
	(arm_expand_ternop_builtin): Likewise.
	(arm_expand_binop_builtin): Likewise.
	(arm_expand_unop_builtin): Likewise.
	(neon_dereference_pointer): Likewise.
	(arm_expand_neon_args): Likewise.
	(arm_expand_neon_builtin): Likewise.
	(neon_split_vcombine): Likewise.
	(arm_expand_builtin): Likewise.
	(arm_builtin_vectorized_function): Likewise.
	(arm_atomic_assign_expand_fenv): Likewise.




git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217695 138bc75d-0d04-0410-961f-82ee72b054a4
[Patch ARM Refactor Builtins 4/8]  Refactor "VAR<n>" Macros

gcc/

	* config/arm/arm-builtins.c (VAR1): Add a comma.
	(VAR2): Rewrite in terms of VAR1.
	(VAR3-10): Likewise.
	(arm_builtins): Remove leading comma before ARM_BUILTIN_MAX.
	* config/arm/arm_neon_builtins.def: Remove trailing commas.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217696 138bc75d-0d04-0410-961f-82ee72b054a4
[Patch ARM Refactor Builtins 5/8] Start keeping track of qualifiers in ARM.

gcc/

	* gcc/config/arm/arm-builtins.c	(arm_type_qualifiers): New.
	(neon_itype): Add new types corresponding to the types used in
	qualifiers names.
	(arm_unop_qualifiers): New.
	(arm_bswap_qualifiers): Likewise.
	(arm_binop_qualifiers): Likewise.
	(arm_ternop_qualifiers): Likewise.
	(arm_getlane_qualifiers): Likewise.
	(arm_lanemac_qualifiers): Likewise.
	(arm_setlane_qualifiers): Likewise.
	(arm_combine_qualifiers): Likewise.
	(arm_load1_qualifiers): Likewise.
	(arm_load1_lane_qualifiers): Likewise.
	(arm_store1_qualifiers): Likewise.
	(arm_storestruct_lane_qualifiers): Likewise.
	(UNOP_QUALIFIERS): Likewise.
	(DUP_QUALIFIERS): Likewise.
	(SPLIT_QUALIFIERS): Likewise.
	(CONVERT_QUALIFIERS): Likewise.
	(FLOAT_WIDEN_QUALIFIERS): Likewise.
	(FLOAT_NARROW_QUALIFIERS): Likewise.
	(RINT_QUALIFIERS): Likewise.
	(COPYSIGNF_QUALIFIERS): Likewise.
	(CREATE_QUALIFIERS): Likewise.
	(REINTERP_QUALIFIERS): Likewise.
	(BSWAP_QUALIFIERS): Likewise.
	(BINOP_QUALIFIERS): Likewise.
	(FIXCONV_QUALIFIERS): Likewise.
	(SCALARMUL_QUALIFIERS): Likewise.
	(SCALARMULL_QUALIFIERS): Likewise.
	(SCALARMULH_QUALIFIERS): Likewise.
	(TERNOP_QUALIFIERS): Likewise.
	(SELECT_QUALIFIERS): Likewise.
	(VTBX_QUALIFIERS): Likewise.
	(GETLANE_QUALIFIERS): Likewise.
	(SHIFTIMM_QUALIFIERS): Likewise.
	(LANEMAC_QUALIFIERS): Likewise.
	(SCALARMAC_QUALIFIERS): Likewise.
	(SETLANE_QUALIFIERS): Likewise.
	(SHIFTINSERT_QUALIFIERS): Likewise.
	(SHIFTACC_QUALIFIERS): Likewise.
	(LANEMUL_QUALIFIERS): Likewise.
	(LANEMULL_QUALIFIERS): Likewise.
	(LANEMULH_QUALIFIERS): Likewise.
	(COMBINE_QUALIFIERS): Likewise.
	(VTBL_QUALIFIERS): Likewise.
	(LOAD1_QUALIFIERS): Likewise.
	(LOADSTRUCT_QUALIFIERS): Likewise.
	(LOAD1LANE_QUALIFIERS): Likewise.
	(LOADSTRUCTLANE_QUALIFIERS): Likewise.
	(STORE1_QUALIFIERS): Likewise.
	(STORESTRUCT_QUALIFIERS): Likewise.
	(STORE1LANE_QUALIFIERS): Likewise.
	(STORESTRUCTLANE_QUALIFIERS): Likewise.
	(neon_builtin_datum): Keep track of qualifiers.
	(VAR1): Likewise.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217697 138bc75d-0d04-0410-961f-82ee72b054a4
[Patch ARM Refactor Builtins 6/8] Add some tests for "poly" mangling

gcc/testsuite/

	* g++.dg/abi/mangle-arm-crypto.C: New.
	* g++.dg/abi/mangle-neon.C (f19): New.
	(f20): Likewise.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217698 138bc75d-0d04-0410-961f-82ee72b054a4
[Patch ARM Refactor Builtins 7/8] Use qualifiers arrays when initialising builtins and fix type mangling

gcc/

	* config/arm/arm-builtins.c (arm_scalar_builtin_types): New.
	(enum arm_simd_type): Likewise.
	(struct arm_simd_type_info): Likewise
	(arm_mangle_builtin_scalar_type): Likewise.
	(arm_mangle_builtin_vector_type): Likewise.
	(arm_mangle_builtin_type): Likewise.
	(arm_simd_builtin_std_type): Likewise.
	(arm_lookup_simd_builtin_type): Likewise.
	(arm_simd_builtin_type): Likewise.
	(arm_init_simd_builtin_types): Likewise.
	(arm_init_simd_builtin_scalar_types): Likewise.
	(arm_init_neon_builtins): Rewrite using qualifiers.
	* config/arm/arm-protos.h (arm_mangle_builtin_type): New.
	* config/arm/arm-simd-builtin-types.def: New file.
	* config/arm/t-arm (arm-builtins.o): Depend on it.
	* config/arm/arm.c (arm_mangle_type): Call arm_mangle_builtin_type.
	* config/arm/arm_neon.h (int8x8_t): Use new internal type.
	(int16x4_t): Likewise.
	(int32x2_t): Likewise.
	(float16x4_t): Likewise.
	(float32x2_t): Likewise.
	(poly8x8_t): Likewise.
	(poly16x4_t): Likewise.
	(uint8x8_t): Likewise.
	(uint16x4_t): Likewise.
	(uint32x2_t): Likewise.
	(int8x16_t): Likewise.
	(int16x8_t): Likewise.
	(int32x4_t): Likewise.
	(int64x2_t): Likewise.
	(float32x4_t): Likewise.
	(poly8x16_t): Likewise.
	(poly16x8_t): Likewise.
	(uint8x16_t): Likewise.
	(uint16x8_t): Likewise.
	(uint32x4_t): Likewise.
	(uint64x2_t): Likewise.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217699 138bc75d-0d04-0410-961f-82ee72b054a4
[Patch ARM Refactor Builtins 8/8] Neaten up the ARM Neon builtin infrastructure

gcc/

	* config/arm/arm-builtins.c (CONVERT_QUALIFIERS): Delete.
	(COPYSIGNF_QUALIFIERS): Likewise.
	(CREATE_QUALIFIERS): Likewise.
	(DUP_QUALIFIERS): Likewise.
	(FLOAT_WIDEN_QUALIFIERS): Likewise.
	(FLOAT_NARROW_QUALIFIERS): Likewise.
	(REINTERP_QUALIFIERS): Likewise.
	(RINT_QUALIFIERS): Likewise.
	(SPLIT_QUALIFIERS): Likewise.
	(FIXCONV_QUALIFIERS): Likewise.
	(SCALARMUL_QUALIFIERS): Likewise.
	(SCALARMULL_QUALIFIERS): Likewise.
	(SCALARMULH_QUALIFIERS): Likewise.
	(SELECT_QUALIFIERS): Likewise.
	(VTBX_QUALIFIERS): Likewise.
	(SHIFTIMM_QUALIFIERS): Likewise.
	(SCALARMAC_QUALIFIERS): Likewise.
	(LANEMUL_QUALIFIERS): Likewise.
	(LANEMULH_QUALIFIERS): Likewise.
	(LANEMULL_QUALIFIERS): Likewise.
	(SHIFTACC_QUALIFIERS): Likewise.
	(SHIFTINSERT_QUALIFIERS): Likewise.
	(VTBL_QUALIFIERS): Likewise.
	(LOADSTRUCT_QUALIFIERS): Likewise.
	(LOADSTRUCTLANE_QUALIFIERS): Likewise.
	(STORESTRUCT_QUALIFIERS): Likewise.
	(STORESTRUCTLANE_QUALIFIERS): Likewise.
	(neon_builtin_type_mode): Delete.
	(v8qi_UP): Map to V8QImode.
	(v8qi_UP): Map to V8QImode.
	(v4hi_UP): Map to V4HImode.
	(v4hf_UP): Map to V4HFmode.
	(v2si_UP): Map to V2SImode.
	(v2sf_UP): Map to V2SFmode.
	(di_UP): Map to DImode.
	(v16qi_UP): Map to V16QImode.
	(v8hi_UP): Map to V8HImode.
	(v4si_UP): Map to V4SImode.
	(v4sf_UP): Map to V4SFmode.
	(v2di_UP): Map to V2DImode.
	(ti_UP): Map to TImode.
	(ei_UP): Map to EImode.
	(oi_UP): Map to OImode.
	(neon_itype): Delete.
	(neon_builtin_datum): Remove itype, make mode a machine_mode.
	(VAR1): Update accordingly.
	(arm_init_neon_builtins): Use machine_mode directly.
	(neon_dereference_pointer): Likewise.
	(arm_expand_neon_args): Use qualifiers to decide operand types.
	(arm_expand_neon_builtin): Likewise.
	* config/arm/arm_neon_builtins.def: Remap operation type for
	many builtins.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217700 138bc75d-0d04-0410-961f-82ee72b054a4