Age | Commit message (Collapse) | Author | Files | Lines |
|
* optabs.h (enum optab_index): Add new OTI_scalb.
(scalb_optab): Define corresponding macro.
* optabs.c (init_optabs): Initialize scalb_optab.
* genopinit.c (optabs): Implement scalb_optab using scalb?f3
patterns.
* builtins.c (expand_builtin_mathfn_2, expand_builtin): Handle
BUILT_IN_SCALB{,F,L}, BUILT_IN_SCALBN{,F,L} and BUILT_IN_SCALBLN{,F,L}.
(expand_builtin): Expand BUILT_IN_SCALB{,F,L}, BUILT_IN_SCALBN{,F,L}
and BUILT_IN_SCALBLN{,F,L} using expand_builtin_mathfn_2 if
flag_unsafe_math_optimizations is set.
* config/i386/i386.md (scalbxf3, scalb<mode>3): New expanders
to implement scalbf, scalb and scalbl built-ins as inline x87
intrinsics.
testsuite/ChangeLog
* gcc.dg/builtins-34.c: Add scalb/scalbn/scalbln cases.
From-SVN: r122162
|
|
* optabs.h (enum optab_index): Add new OTI_isinf.
(isinf_optab): Define corresponding macro.
* optabs.c (init_optabs): Initialize isinf_optab.
* genopinit.c (optabs): Implement isinf_optab using isinf?f2
patterns.
* builtins.c (mathfn_built_in): Handle BUILT_IN_ISINF{,F,L}.
(expand_builtin_interclass_mathfn): Expand BUILT_IN_ISINF{,F,L}
using isinf_optab.
(expand_builtin): Expand BUILT_IN_ISINF{,F,L} using
expand_builtin_interclass_mathfn.
* reg_stack.c (subst_stack_regs_pat): Handle UNSPEC_FXAM.
* config/i386/i386.md (UNSPEC_FXAM): New constant.
(fxam<mode>2_i387): New insn pattern.
(isinf<mode>2) New expander to implement isinf, isinff and isinfl
built-in functions as x87 inline asm.
testsuite/ChangeLog:
* gcc.dg/builtins-63.c: New test.
From-SVN: r121419
|
|
* doc/c-tree.texi: Document new tree codes.
* doc/md.texi: Document new optabs.
* tree-pretty-print.c (dump_generic_node): Handle print of new tree
codes.
* optabs.c (optab_for_tree_code, init_optabs): Handle new optabs.
* optabs.h (optab_index): Add new.
(vec_extract_even_optab, vec_extract_odd_optab,
vec_interleave_high_optab, vec_interleave_low_optab): New optabs.
* genopinit.c (vec_extract_even_optab, vec_extract_odd_optab,
vec_interleave_high_optab, vec_interleave_low_optab): Initialize
new optabs.
* expr.c (expand_expr_real_1): Add implementation for new tree codes.
* tree-vectorizer.c (new_stmt_vec_info): Initialize new fields.
* tree-vectorizer.h (stmt_vec_info): Add new fields for interleaving
along with macros for their access.
* tree-data-ref.h (first_location_in_loop, data_reference): Update
comment.
* tree-vect-analyze.c (toplev.h): Include.
(vect_determine_vectorization_factor): Fix indentation.
(vect_insert_into_interleaving_chain,
vect_update_interleaving_chain, vect_equal_offsets): New functions.
(vect_analyze_data_ref_dependence): Add argument for interleaving
check. Check for interleaving if it's true.
(vect_check_dependences): New function.
(vect_analyze_data_ref_dependences): Call vect_check_dependences for
every ddr. Call vect_analyze_data_ref_dependence with new argument.
(vect_update_misalignment_for_peel): Update for interleaving.
(vect_verify_datarefs_alignment): Check only first data-ref for
interleaving.
(vect_enhance_data_refs_alignment): Update for interleaving. Check
only first data-ref for interleaving.
(vect_analyze_data_ref_access): Check interleaving, update
interleaving data.
(vect_analyze_data_refs): Call compute_data_dependences_for_loop
with different parameters.
* tree.def (VEC_EXTRACT_EVEN_EXPR, VEC_EXTRACT_ODD_EXPR,
VEC_INTERLEAVE_HIGH_EXPR, VEC_INTERLEAVE_LOW_EXPR): New tree codes.
* tree-inline.c (estimate_num_insns_1): Add cases for new codes.
* tree-vect-transform.c (vect_create_addr_base_for_vector_ref):
Update step in case of interleaving.
(vect_strided_store_supported, vect_permute_store_chain): New
functions.
(vectorizable_store): Handle strided stores.
(vect_strided_load_supported, vect_permute_load_chain,
vect_transform_strided_load): New functions.
(vectorizable_load): Handle strided loads.
(vect_transform_stmt): Add argument. Handle strided stores. Check
that vectorized stmt exists for patterns.
(vect_gen_niters_for_prolog_loop): Update calculation for
interleaving.
(vect_transform_loop): Remove stmt_vec_info for strided stores after
whole chain vectorization.
* config/rs6000/altivec.md (UNSPEC_EXTEVEN, UNSPEC_EXTODD,
UNSPEC_INTERHI, UNSPEC_INTERLO): New constants.
(vpkuhum_nomode, vpkuwum_nomode, vec_extract_even<mode>,
vec_extract_odd<mode>, altivec_vmrghsf, altivec_vmrglsf,
vec_interleave_high<mode>, vec_interleave_low<mode>): Implement.
From-SVN: r119088
|
|
2006-11-08 Dorit Nuzman <dorit@il.ibm.com>
* tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Take
enum argument instead of bool.
(vect_analyze_operations): Call vectorizable_type_promotion.
* tree-vectorizer.h (type_promotion_vec_info_type): New enum
stmt_vec_info_type value.
(supportable_widening_operation, vectorizable_type_promotion): New
function declarations.
* tree-vect-transform.c (vect_gen_widened_results_half): New function.
(vectorizable_type_promotion): New function.
(vect_transform_stmt): Call vectorizable_type_promotion.
* tree-vect-analyze.c (supportable_widening_operation): New function.
* tree-vect-patterns.c (vect_recog_dot_prod_pattern):
Add implementation.
* tree-vect-generic.c (expand_vector_operations_1): Consider correct
mode.
* tree.def (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR):
(VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO_EXPR): New tree-codes.
* tree-inline.c (estimate_num_insns_1): Add cases for above new
tree-codes.
* tree-pretty-print.c (dump_generic_node, op_prio): Likewise.
* expr.c (expand_expr_real_1): Likewise.
* optabs.c (optab_for_tree_code): Likewise.
(init_optabs): Initialize new optabs.
* genopinit.c (vec_widen_umult_hi_optab, vec_widen_smult_hi_optab,
vec_widen_smult_hi_optab, vec_widen_smult_lo_optab,
vec_unpacks_hi_optab, vec_unpacks_lo_optab, vec_unpacku_hi_optab,
vec_unpacku_lo_optab): Initialize new optabs.
* optabs.h (OTI_vec_widen_umult_hi, OTI_vec_widen_umult_lo):
(OTI_vec_widen_smult_h, OTI_vec_widen_smult_lo, OTI_vec_unpacks_hi,
OTI_vec_unpacks_lo, OTI_vec_unpacku_hi, OTI_vec_unpacku_lo): New
optab indices.
(vec_widen_umult_hi_optab, vec_widen_umult_lo_optab):
(vec_widen_smult_hi_optab, vec_widen_smult_lo_optab):
(vec_unpacks_hi_optab, vec_unpacku_hi_optab, vec_unpacks_lo_optab):
(vec_unpacku_lo_optab): New optabs.
* doc/md.texi (vec_unpacks_hi, vec_unpacks_lo, vec_unpacku_hi):
(vec_unpacku_lo, vec_widen_umult_hi, vec_widen_umult_lo):
(vec_widen_smult_hi, vec_widen_smult_lo): New.
* doc/c-tree.texi (VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR):
(VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR, VEC_UNPACK_HI_EXPR):
(VEC_UNPACK_LO_EXPR, VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New.
* config/rs6000/altivec.md (UNSPEC_VMULWHUB, UNSPEC_VMULWLUB):
(UNSPEC_VMULWHSB, UNSPEC_VMULWLSB, UNSPEC_VMULWHUH, UNSPEC_VMULWLUH):
(UNSPEC_VMULWHSH, UNSPEC_VMULWLSH): New.
(UNSPEC_VPERMSI, UNSPEC_VPERMHI): New.
(vec_vperm_v8hiv4si, vec_vperm_v16qiv8hi): New patterns used to
implement the unsigned unpacking patterns.
(vec_unpacks_hi_v16qi, vec_unpacks_hi_v8hi, vec_unpacks_lo_v16qi):
(vec_unpacks_lo_v8hi): New signed unpacking patterns.
(vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi):
(vec_unpacku_lo_v8hi): New unsigned unpacking patterns.
(vec_widen_umult_hi_v16qi, vec_widen_umult_lo_v16qi):
(vec_widen_smult_hi_v16qi, vec_widen_smult_lo_v16qi):
(vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi):
(vec_widen_smult_hi_v8hi, vec_widen_smult_lo_v8hi): New widening
multiplication patterns.
* target.h (builtin_mul_widen_even, builtin_mul_widen_odd): New.
* target-def.h (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN):
(TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New.
* config/rs6000/rs6000.c (rs6000_builtin_mul_widen_even): New.
(rs6000_builtin_mul_widen_odd): New.
(TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): Defined.
(TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): Defined.
* tree-vectorizer.h (enum vect_relevant): New enum type.
(_stmt_vec_info): Field relevant chaned from bool to enum
vect_relevant.
(STMT_VINFO_RELEVANT_P): Updated.
(STMT_VINFO_RELEVANT): New.
* tree-vectorizer.c (new_stmt_vec_info): Use STMT_VINFO_RELEVANT
instead of STMT_VINFO_RELEVANT_P.
* tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p):
Replace calls to STMT_VINFO_RELEVANT_P with STMT_VINFO_RELEVANT,
and boolean variable with enum vect_relevant.
(vect_mark_stmts_to_be_vectorized): Likewise + update documentation.
* doc/tm.texi (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): New.
(TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New.
2006-11-08 Richard Henderson <rth@redhat.com>
* config/i386/sse.md (vec_widen_umult_hi_v8hi,
vec_widen_umult_lo_v8hi): New.
(vec_widen_smult_hi_v4si, vec_widen_smult_lo_v4si,
vec_widen_umult_hi_v4si, vec_widen_umult_lo_v4si): New.
* config/i386/i386.c (ix86_expand_sse_unpack): New.
* config/i386/i386-protos.h (ix86_expand_sse_unpack): New.
* config/i386/sse.md (vec_unpacku_hi_v16qi, vec_unpacks_hi_v16qi,
vec_unpacku_lo_v16qi, vec_unpacks_lo_v16qi, vec_unpacku_hi_v8hi,
vec_unpacks_hi_v8hi, vec_unpacku_lo_v8hi, vec_unpacks_lo_v8hi,
vec_unpacku_hi_v4si, vec_unpacks_hi_v4si, vec_unpacku_lo_v4si,
vec_unpacks_lo_v4si): New.
2006-11-08 Dorit Nuzman <dorit@il.ibm.com>
* tree-vect-transform.c (vectorizable_type_demotion): New function.
(vect_transform_stmt): Add case for type_demotion_vec_info_type.
(vect_analyze_operations): Call vectorizable_type_demotion.
* tree-vectorizer.h (type_demotion_vec_info_type): New enum
stmt_vec_info_type value.
(vectorizable_type_demotion): New function declaration.
* tree-vect-generic.c (expand_vector_operations_1): Consider correct
mode.
* tree.def (VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New tree-codes.
* expr.c (expand_expr_real_1): Add case for VEC_PACK_MOD_EXPR and
VEC_PACK_SAT_EXPR.
* tree-iniline.c (estimate_num_insns_1): Likewise.
* tree-pretty-print.c (dump_generic_node, op_prio): Likewise.
* optabs.c (optab_for_tree_code): Likewise.
* optabs.c (expand_binop): In case of vec_pack_*_optabs the mode
compared against the predicate of the result is not 'mode' (the input
to the function) but a mode with half the size of 'mode'.
(init_optab): Initialize new optabs.
* optabs.h (OTI_vec_pack_mod, OTI_vec_pack_ssat, OTI_vec_pack_usat):
New optab indices.
(vec_pack_mod_optab, vec_pack_ssat_optab, vec_pack_usat_optab): New
optabs.
* genopinit.c (vec_pack_mod_optab, vec_pack_ssat_optab):
(vec_pack_usat_optab): Initialize new optabs.
* doc/md.texi (vec_pack_mod, vec_pack_ssat, vec_pack_usat): New.
* config/rs6000/altivec.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): New.
2006-11-08 Richard Henderson <rth@redehat.com>
* config/i386/sse.md (vec_pack_mod_v8hi, vec_pack_mod_v4si):
(vec_pack_mod_v2di, vec_interleave_highv16qi, vec_interleave_lowv16qi):
(vec_interleave_highv8hi, vec_interleave_lowv8hi):
(vec_interleave_highv4si, vec_interleave_lowv4si):
(vec_interleave_highv2di, vec_interleave_lowv2di): New.
2006-11-08 Dorit Nuzman <dorit@il.ibm.com>
* tree-vect-transform.c (vectorizable_reduction): Support multiple
datatypes.
(vect_transform_stmt): Removed redundant code.
2006-11-08 Dorit Nuzman <dorit@il.ibm.com>
* tree-vect-transform.c (vectorizable_operation): Support multiple
datatypes.
2006-11-08 Dorit Nuzman <dorit@il.ibm.com>
* tree-vect-transform.c (vect_align_data_ref): Removed.
(vect_create_data_ref_ptr): Added additional argument - ptr_incr.
Updated function documentation. Return the increment stmt in ptr_incr.
(bump_vector_ptr): New function.
(vect_get_vec_def_for_stmt_copy): New function.
(vect_finish_stmt_generation): Create a stmt_info to newly created
vector stmts.
(vect_setup_realignment): Call vect_create_data_ref_ptr with additional
argument.
(vectorizable_reduction, vectorizable_assignment): Not supported yet if
VF is greater than the number of elements that can fit in one vector
word.
(vectorizable_operation, vectorizable_condition): Likewise.
(vectorizable_store, vectorizable_load): Support the case that the VF
is greater than the number of elements that can fit in one vector word.
(vect_transform_loop): Don't fail in case of multiple data-types.
* tree-vect-analyze.c (vect_determine_vectorization_factor): Don't fail
in case of multiple data-types; the smallest type determines the VF.
(vect_analyze_data_ref_dependence): Don't record datarefs as same_align
if they are of different sizes.
(vect_update_misalignment_for_peel): Compare misalignments in terms of
number of elements rather than number of bytes.
(vect_enhance_data_refs_alignment): Fix/Add dump printouts.
(vect_can_advance_ivs_p): Fix a dump printout
From-SVN: r118577
|
|
From-SVN: r118363
|
|
2006-10-29 Richard Guenther <rguenther@suse.de>
* genopinit.c (optabs): Change lfloor_optab and lceil_optab
to conversion optabs.
* optabs.c (init_optabs): Initialize lfloor_optab and lceil_optab
as conversion optab.
* optabs.h (enum optab_index): Remove OTI_lfloor and OTI_lceil.
(enum convert_optab_index): Add COI_lfloor and COI_lceil.
(lfloor_optab, lceil_optab): Adjust defines.
* builtins.c (expand_builtin_int_roundingfn): Adjust for
lfloor and lceil optabs now being conversion optabs.
* config/i386/i386-protos.h (ix86_expand_lfloorceil): Declare.
* config/i386/i386.c (ix86_expand_sse_compare_and_jump):
New static helper function.
(ix86_expand_lfloorceil): New function to expand lfloor and
lceil inline.
* config/i386/i386.md (lfloor<mode>2): Split into ...
(lfloorxf<mode>2): ... x87 variant
(lfloor<mode>di2, lfloor<mode>si2): ... and SSE variants
using ix86_expand_lfloorceil.
(lceil<mode>2, lceilxf<mode>2, lceil<mode>di2, lceil<mode>si2):
Likewise.
* doc/md.texi (lfloorMN, lceilMN): Document.
* gcc.target/i386/math-torture/lfloor.c: New testcase.
* gcc.target/i386/math-torture/lceil.c: Likewise.
From-SVN: r118143
|
|
2006-10-28 Richard Guenther <rguenther@suse.de>
PR target/28806
* builtins.c (expand_builtin_int_roundingfn_2): Expand
BUILT_IN_LROUND and BUILT_IN_LLROUND from here.
(expand_builtin): Adjust likewise.
* genopinit.c (optabs[]): Add lround optab.
* optabs.c (init_optabs): Initialize lround_optab.
* optabs.h (enum convert_optab_index): Add COI_lround.
(lround_optab): Define.
* config/i386/i386-protos.h (ix86_expand_lround): Declare.
* config/i386/i386.c (ix86_sse_copysign_to_positive): New
static function.
(ix86_expand_lround): New function.
* config/i386/i386.md (lround<mode>di2, lround<mode>si2):
New expanders.
* doc/md.texi (lroundMN2): Document.
* gcc.target/i386/math-torture/lround.c: New testcase.
From-SVN: r118105
|
|
2006-10-25 Richard Guenther <rguenther@suse.de>
* optabs.h (enum optab_index): Remove OTI_lrint.
(enum convert_optab_index): Add COI_lrint.
(lrint_optab): Adjust.
(expand_sfix_optab): Declare.
* optabs.c (expand_sfix_optab): New function.
(init_optabs): Init lrint_optab as conversion optab.
* genopinit.c (lrint_optab): Change to a conversion optab.
* builtins.c (expand_builtin_int_roundingfn_2): Adjust to
expansion via conversion optab.
* config/i386/i386.md (*fistdi2_1): Remove
flag_unsafe_math_optimizations guard.
(fistdi2, fistdi2_with_temp, *fist<mode>2_1, fist<mode>2,
fist<mode>2_with_temp): Likewise.
(lrint<mode>2): Split into...
(lrintxf<mode>2): ... x87 part
(lrint<mode>di2, lrint<mode>si2): ... and SSE parts.
* config/i386/sse.md (sse_cvtss2si_2, sse_cvtss2_siq_2,
sse2_cvtsd2si_2, sse2_cvtsd2siq_2): New insns for
UNSPEC_FIX_NOTRUNC matching non-vector float modes.
* doc/md.texi (lrintMN2): Document.
From-SVN: r118029
|
|
* optabs.h (enum optab_index): Rename OTI_drem to OTI_remainder.
(remainder_optab): Define corresponding macro.
(drem_optab): Remove.
* optabs.c (init_optabs): Initialize remainder_optab. Remove
drem_optab initialization.
* genopinit.c (optabs): Implement remainder_optab using
remainder?f3 patterns. Remove drem_optab.
* builtins.c (expand_builtin_mathfn_2): Handle
BUILT_IN_REMAINDER{,F,L} using remainder_optab.
(expand_builtin): Expand BUILT_IN_REMAINDER{,F,L} using
expand_builtin_mathfn_2.
(expand_builtin) [BUILT_IN_FMOD, BUILT_IN_DREM]: Do not
depend on flag_unsafe_math_optimizations.
* config/i386/i386.md ("remaindersf3", "remainderdf3")
("remainderxf3"): Renamed from "drem{s,d,x}f3" expanders.
Do not depend on flag_unsafe_math_optimizations. Use
truncxf?f expander instead of truncxf?f_i387_noop.
("fpremxf4", "fprem1xf4"): Do not depend on
flag_unsafe_math_optimizations.
("fmodsf3", "fmoddf3", "fmodxf3"): Do not depend on
flag_unsafe_math_optimizations. Use truncxf?f expander
instead of truncxf?f_i387_noop.
* doc/md.texi (fmod, remainder): Document standard named pattern.
testsuite/ChangeLog:
* gcc.dg/builtins-40.c: Also check remainder(), remainderf()
and remainderl() built-in functions. Remove -ffast-math from
dg-options.
From-SVN: r118024
|
|
r110124@banpei: zack | 2006-01-22 14:45:55 -0800
* gensupport.c: Define get_insn_name and record_insn_name here.
(read_md_rtx): Call record_insn_name as appropriate.
* genattr.c, genattrtab.c, gencodes.c, genconfig.c, genemit.c
* genextract.c, genflags.c, genopinit.c, genoutput.c, genpeep.c
* genpreds.c, genrecog.c: Don't define get_insn_name nor
record_insn_name.
* Makefile.in (BUILD_SUPPORT, BUILD_PRINT): Fold into BUILD_RTL.
(BUILD_VARRAY): Delete.
(genprognormal): Rename genprogmd. Fold in all programs from
genprognoprint; also attrtab.
(build/genattrtab): Just mention genautomata.o and varray.o.
Reorganize a bit, add comments to make the categories clearer.
From-SVN: r110120
|
|
* Makefile.in (tree-vect-patterns.o): Add rule for new file.
* tree-vect-analyze.c (vect_determine_vectorization_factor): Use
existing STMT_VINFO_VECTYPE if available.
(vect_mark_relevant): Add special handling for stmts that are
marked as STMT_VINFO_IN_PATTERN_P.
(vect_analyze_loop): Call vect_pattern_recog.
* tree-vectorizer.c (new_stmt_vec_info): Initialize new fields.
* tree-vectorizer.h (in_pattern_p, related_stmt): New fields in
stmt_info.
(STMT_VINFO_IN_PATTERN_P, STMT_VINFO_RELATED_STMT): New macros.
(vect_recog_func_ptr): New function-pointer type.
* tree-vect-patterns.c: New file.
(vect_recog_widen_sum_pattern, vect_recog_widen_mult_pattern):
(vect_recog_dot_prod_pattern, vect_pattern_recog):
(vect_pattern_recog_1): New functions.
(vect_pattern_recog_funcs): New array of function pointers.
* tree-vectorizer.h (ternary_op): New enum value.
* tree-vect-transform.c (vect_create_epilog_for_reduction): Added
declaration. Revised documentation. Removed redundant dump prints.
Removed redundant argument. Added support for reduction patterns.
(vectorizable_reduction): Added support for reduction patterns.
(vect_transform_stmt): Added support for patterns.
* expr.c (expand_expr_real_1): Added case for DOT_PROD_EXPR.
* genopinit.c (udot_prod_optab, sdot_prod_optab): Initialize.
* optabs.c (optab_for_tree_code): Added case for DOT_PROD_EXPR.
(expand_widen_pattern_expr): New function.
(init_optabs): Initialize new optabs udot_prod_optab,
sdot_prod_optab.
* optabs.h (OTI_sdot_prod, OTI_udot_prod): New.
(sdot_prod_optab, udot_prod_optab): Define new optabs.
(expand_widen_pattern_expr): New function declaration.
* tree.def (DOT_PROD_EXPR, WIDEN_SUM_EXPR, WIDEN_MULT_EXPR): New
tree-codes.
* tree-inline.c (estimate_num_insns_1): Added cases for new
tree-codes DOT_PROD_EXPR, WIDEN_SUM_EXPR, WIDEN_MULT_EXPR.
* tree-pretty-print.c (dump_generic_node): Likewise.
(op_prio): Likewise.
(op_symbol): Added cases for WIDEN_SUM_EXPR, WIDEN_MULT_EXPR.
* tree-ssa-operands.c (get_expr_operands): Added case for
DOT_PROD_EXPR.
* tree-vect-patterns.c (widened_name_p): New function.
(vect_recog_dot_prod_pattern): Added function implementation.
* tree-vect-transform.c (get_initial_def_for_reduction): Added
cases for DOT_PROD_EXPR, WIDEN_SUM_EXPR.
* config/rs6000/altivec.md (udot_prod<mode>, sdot_prodv8hi): New.
* config/i386/sse.md (sdot_prodv8hi, udot_prodv4si): New.
* expr.c (expand_expr_real_1): Added case for WIDEN_SUM_EXPR.
* genopinit.c (widen_ssum_optab, widen_usum_optab): Initialize.
* optabs.c (optab_for_tree_code): Added case for WIDEN_SUM_EXPR.
(init_optabs): Initialize new optabs widen_ssum_optab,
widen_usum_optab.
* optabs.h (OTI_widen_ssum, OTI_widen_usum): New.
(widen_ssum_optab, widen_usum_optab): Define new optabs.
* tree-vect-generic.c: (expand_vector_operations_1): Check type of
use instead of type of def.
* tree-vect-patterns.c (vect_recog_widen_sum_pattern): Added
function implementation.
* config/rs6000/altivec.md (widen_usum<mode>, widen_ssumv16qi,
widen_ssumv8hi): New.
* doc/tm.texi (ssum_widen, usum_widen, sdot_prod, udot_prod): New
patterns.
From-SVN: r109954
|
|
* optabs.c (init_floating_libfuncs): Handle decimal float modes.
(init_optabs): Handle libfuncs for decimal float.
* genopinit.c (gen_insn): Handle MODE_DECIMAL_FLOAT.
* stor-layout.c (int_mode_for_mode): Likewise.
* simplify-rtx.c (simplify_immed_subreg): Likewise.
(simplify_unary_operation_1): Skip optimisations for decimal float
modes.
* varasm.c (output_constant_pool_2): Handle MODE_DECIMAL_FLOAT.
* emit-rtl.c (gen_const_vector): Add assertion check.
(init_emit_once): Populate const_tiny_rtx with constants in each
decimal float mode.
* expmed.c (extract_high_half, expand_mult_highpart_optab,
expand_mult_highpart): Assert that mode is not a scalar float
mode.
* expr.c (convert_move): Handle conversion between decimal and
binary floats of the same size.
* convert.c (convert_to_real): Consider decimal float types when
folding.
* dwarf2out.c (base_type_die): Use DW_ATE_decimal_float to
describe decimal floating point types.
Co-Authored-By: Ben Elliston <bje@au.ibm.com>
Co-Authored-By: Janis Johnson <janis187@us.ibm.com>
From-SVN: r108762
|
|
testing GET_MODE_CLASS (x) ==...
* optabs.c (expand_abs_nojump): Use SCALAR_FLOAT_MODE_P instead of
explicitly testing GET_MODE_CLASS (x) == MODE_FLOAT.
* genopinit.c (gen_insn): Likewise.
* reload.c (find_equiv_reg): Likewise.
* loop.c (load_mems): Likewise.
* rtlanal.c (may_trap_p_1, canonicalize_condition): Likewise.
* cse.c (find_comparison_args, fold_rtx): Likewise.
* dwarf2out.c (add_const_value_attribute): Likewise.
* expr.c (convert_move): Likewise.
* recog.c (general_operand, register_operand): Likewise.
* reg-stack.c (replace_reg): Likewise.
* tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
* c-common.c (handle_vector_size_attribute): Likewise.
* simplify-rtx.c (simplify_const_unary_operation): Likewise.
(simplify_binary_operation_1): Likewise.
(simplify_const_binary_operation): Likewise.
(simplify_relational_operation): Likewise.
(simplify_const_relational_operation): Likewise.
(simplify_immed_subreg): Likewise.
* emit-rtl.c (gen_lowpart_common): Likewise.
* expmed.c (expand_mult): Likewise.
* stor-layout.c (layout_type): Likewise.
From-SVN: r107322
|
|
multiplies.
* expr.c (expand_expr_real): Use usmul_optab for widening
signed * unsigned multiplies.
* genopinit.c (optabs): Add usmul_widen_optab.
* optabs.c (init_optabs): Likewise.
* optabs.h (enum optab_index): Add OTI_usmul_widen.
(usmul_widen_optab): Define.
* config/bfin/bfin.md (usmulhisi3): New pattern.
* doc/md.texi (usmulqihi3, usmulhisi3, usmulsidi3): Document.
From-SVN: r107258
|
|
s/cmpstrsi/cmpstrnsi
2005-07-12 Adrian Straetling <straetling@de.ibm.com>
* builtins.c: (expand_builtin_memcmp, expand_builtin_strncmp):
s/cmpstrsi/cmpstrnsi
(expand_builtin_strcmp): Rewrite to support both 'cmpstrsi' and
'cmpstrnsi'.
* optabs.c: (prepare_cmp_insn): Add availability of 'cmpstrn'.
(init_optabs): Initialize cmpstrn_optab.
* optabs.h: (enum insn_code cmpstrn_optab): Declare.
* genopinit.c: (optabs[]): Add 'cmpstrn' to initialisation.
* expr.c: (enum insn_code cmpstrn_optab): Declare.
* config/i386/i386.md: s/cmpstr/cmpstrn
* config/c4x/c4x.md: s/cmpstr/cmpstrn
* doc/md.texi: Update documentation.
From-SVN: r101916
|
|
'set_storage_via_setmem'.
2006-06-28 Adrian Straetling <straetling@de.ibm.com>
* builtins.c: (expand_builtin_memset): Rewrite to support
'set_storage_via_setmem'.
* expr.c: (enum insn_code setmem_optab): Define.
(enum insn_code clrmem_optab): Remove.
(set_storage_via_setmem): New function.
(clear_storage_via_setmem): Remove.
(clear_storage): Replace call to "clear_storage_via_clrmem" with
"set_storage_via_setmem".
* expr.h: (set_storage_via_setmem): Declare.
(CLEAR_RATIO): Redefine using HAVE_setmemM.
* optabs.h: (enum insn_code setmem_optab): Declare.
(enum insn_code clrmem_optab): Remove.
* optabs.c: (init_optabs): Initialize setmem_optab.
(enum insn_code clrmem_optab): Remove.
* genopinit.c: (otabs): Likewise.
* doc/md.texi: Document new standard pattern 'setmem'. Remove
'clrmem'.
* config/alpha/alpha.c: (alpha_expand_block_clear): Adjust
'operands' ordering.
* config/frv/frv.c: (frv_expand_block_clear): Likewise.
* config/rs6000/rs6000.c: (expand_block_clear): Likewise.
* config/alpha/alpha.md: ("clrmemqi", "clrmemdi"): Rename to "setmemM".
FAIL on operands[2]!=const0_rtx. Adjust 'operands' ordering.
* config/avr/avr.md: ("clrmemhi"): Likewise.
* config/frv/frv.md: ("clrmemsi"): Likewise.
* config/i386/i386.md: ("clrmemsi", "clrmemdi"): Likewise.
* config/pa/pa.md: ("clrmemsi", "clrmemdi"): Likewise.
* config/rs6000/rs6000.md: ("clrmemsi"): Likewise.
* config/s390/s390.md: ("clrmem<mode>"): Likewise.
From-SVN: r101386
|
|
From-SVN: r101317
|
|
* genopinit.c (vec_shl_optab, vec_shr_optab): Initialize new optabs.
(reduc_plus_optab): Removed. Replcaed with...
(reduc_splus_optab, reduc_uplus_optab): Initialize new optabs.
* optabs.c (optab_for_tree_code): Return reduc_splus_optab or
reduc_uplus_optab instead of reduc_plus_optab.
(expand_vec_shift_expr): New function.
(init_optabs): Initialize new optabs. Remove initialization of
reduc_plus_optab.
(optab_for_tree_code): Return vec_shl_optab/vec_shr_optab
for VEC_LSHIFT_EXPR/VEC_RSHIFT_EXPR.
* optabs.h (OTI_reduc_plus): Removed. Replaced with...
(OTI_reduc_splus, OTI_reduc_uplus): New.
(reduc_plus_optab): Removed. Replcaed with...
(reduc_splus_optab, reduc_uplus_optab): New optabs.
(vec_shl_optab, vec_shr_optab): New optabs.
(expand_vec_shift_expr): New function declaration.
* tree.def (VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR): New tree-codes.
* tree-inline.c (estimate_num_insns_1): Handle new tree-codes.
* expr.c (expand_expr_real_1): Handle new tree-codes.
* tree-pretty-print.c (dump_generic_node, op_symbol, op_prio): Likewise.
* tree-vect-generic.c (expand_vector_operations_1): Add assert.
* tree-vect-transform.c (vect_create_epilog_for_reduction): Add two
alternatives for generating reduction epilog code.
(vectorizable_reduction): Don't fail of direct reduction support is
not available.
(vectorizable_target_reduction_pattern): Likewise.
* config/rs6000/altivec.md (reduc_smax_v4si, reduc_smax_v4sf,
reduc_umax_v4si, reduc_smin_v4si, reduc_smin_v4sf, reduc_umin_v4si,
reduc_plus_v4si, reduc_plus_v4sf): Removed.
(vec_shl_<mode>, vec_shr_<mode>, altivec_vsumsws_nomode,
reduc_splus_<mode>, reduc_uplus_v16qi): New.
From-SVN: r101231
|
|
* tree.def (REDUC_MAX_EXPR, REDUC_MIN_EXPR, REDUC_PLUS_EXPR): New
tree-codes.
* optabs.h (OTI_reduc_smax, OTI_reduc_umax, OTI_reduc_smin,
OTI_reduc_umin, OTI_reduc_plus): New optabs for reduction.
(reduc_smax_optab, reduc_umax_optab, reduc_smin_optab, reduc_umin_optab,
reduc_plus_optab): New optabs for reduction.
* expr.c (expand_expr_real_1): Handle new tree-codes.
* tree-inline.c (estimate_num_insns_1): Handle new tree-codes.
* tree-pretty-print.c (dump_generic_node, op_prio, op_symbol): Handle
new tree-codes.
* optabs.c (optab_for_tree_code): Handle new tree-codes.
(init_optabs): Initialize new optabs.
* genopinit.c (optabs): Define handlers for new optabs.
* tree-vect-analyze.c (vect_analyze_operations): Fail vectorization in
case of a phi that is marked as relevant. Call vectorizable_reduction.
(vect_mark_relevant): Phis may be marked as relevant.
(vect_mark_stmts_to_be_vectorized): The use corresponding to the
reduction variable in a reduction stmt does not mark its defining phi
as relevant. Update documentation accordingly.
(vect_can_advance_ivs_p): Skip reduction phis.
* tree-vect-transform.c (vect_get_vec_def_for_operand): Takes
additional argument. Handle reduction.
(vect_create_destination_var): Update call to vect_get_new_vect_var.
Handle non-vector argument.
(get_initial_def_for_reduction): New function.
(vect_create_epilog_for_reduction): New function.
(vectorizable_reduction): New function.
(vect_get_new_vect_var): Handle new vect_var_kind.
(vectorizable_assignment, vectorizable_operation, vectorizable_store,
vectorizable_condition): Update call to vect_get_new_vect_var.
(vect_transform_stmt): Call vectorizable_reduction.
(vect_update_ivs_after_vectorizer): Skip reduction phis.
(vect_transform_loop): Skip if stmt is both not relevant and not live.
* tree-vectorizer.c (reduction_code_for_scalar_code): New function.
(vect_is_simple_reduction): Was empty - added implementation.
* tree-vectorizer.h (vect_scalar_var): New enum vect_var_kind value.
(reduc_vec_info_type): New enum vect_def_type value.
* config/rs6000/altivec.md (reduc_smax_v4si, reduc_smax_v4sf,
reduc_umax_v4si, reduc_smin_v4si, reduc_umin_v4sf, reduc_smin_v4sf,
reduc_plus_v4si, reduc_plus_v4sf): New define_expands.
* tree-vect-analyze.c (vect_determine_vectorization_factor): Remove
ENABLE_CHECKING around gcc_assert.
* tree-vect-transform.c (vect_do_peeling_for_loop_bound,
(vect_do_peeling_for_alignment, vect_transform_loop,
vect_get_vec_def_for_operand): Likewise.
From-SVN: r101155
|
|
PR middle-end/14311
* builtin-types.def (BT_BOOL, BT_VOLATILE_PTR, BT_I1, BT_I2,
BT_I4, BT_I8, BT_FN_VOID_VPTR, BT_FN_I1_VPTR_I1, BT_FN_I2_VPTR_I2,
BT_FN_I4_VPTR_I4, BT_FN_I8_VPTR_I8, BT_FN_BOOL_VPTR_I1_I1,
BT_FN_BOOL_VPTR_I2_I2, BT_FN_BOOL_VPTR_I4_I4, BT_FN_BOOL_VPTR_I8_I8,
BT_FN_I1_VPTR_I1_I1, BT_FN_I2_VPTR_I2_I2, BT_FN_I4_VPTR_I4_I4,
BT_FN_I8_VPTR_I8_I8): New.
* builtins.def (DEF_SYNC_BUILTIN): New.
(BUILT_IN_FETCH_AND_ADD_N, BUILT_IN_FETCH_AND_ADD_1,
BUILT_IN_FETCH_AND_ADD_2, BUILT_IN_FETCH_AND_ADD_4,
BUILT_IN_FETCH_AND_ADD_8, BUILT_IN_FETCH_AND_SUB_N,
BUILT_IN_FETCH_AND_SUB_1, BUILT_IN_FETCH_AND_SUB_2,
BUILT_IN_FETCH_AND_SUB_4, BUILT_IN_FETCH_AND_SUB_8,
BUILT_IN_FETCH_AND_OR_N, BUILT_IN_FETCH_AND_OR_1,
BUILT_IN_FETCH_AND_OR_2, BUILT_IN_FETCH_AND_OR_4,
BUILT_IN_FETCH_AND_OR_8, BUILT_IN_FETCH_AND_AND_N,
BUILT_IN_FETCH_AND_AND_1, BUILT_IN_FETCH_AND_AND_2,
BUILT_IN_FETCH_AND_AND_4, BUILT_IN_FETCH_AND_AND_8,
BUILT_IN_FETCH_AND_XOR_N, BUILT_IN_FETCH_AND_XOR_1,
BUILT_IN_FETCH_AND_XOR_2, BUILT_IN_FETCH_AND_XOR_4,
BUILT_IN_FETCH_AND_XOR_8, BUILT_IN_FETCH_AND_NAND_N,
BUILT_IN_FETCH_AND_NAND_1, BUILT_IN_FETCH_AND_NAND_2,
BUILT_IN_FETCH_AND_NAND_4, BUILT_IN_FETCH_AND_NAND_8,
BUILT_IN_ADD_AND_FETCH_N, BUILT_IN_ADD_AND_FETCH_1,
BUILT_IN_ADD_AND_FETCH_2, BUILT_IN_ADD_AND_FETCH_4,
BUILT_IN_ADD_AND_FETCH_8, BUILT_IN_SUB_AND_FETCH_N,
BUILT_IN_SUB_AND_FETCH_1, BUILT_IN_SUB_AND_FETCH_2,
BUILT_IN_SUB_AND_FETCH_4, BUILT_IN_SUB_AND_FETCH_8,
BUILT_IN_OR_AND_FETCH_N, BUILT_IN_OR_AND_FETCH_1,
BUILT_IN_OR_AND_FETCH_2, BUILT_IN_OR_AND_FETCH_4,
BUILT_IN_OR_AND_FETCH_8, BUILT_IN_AND_AND_FETCH_N,
BUILT_IN_AND_AND_FETCH_1, BUILT_IN_AND_AND_FETCH_2,
BUILT_IN_AND_AND_FETCH_4, BUILT_IN_AND_AND_FETCH_8,
BUILT_IN_XOR_AND_FETCH_N, BUILT_IN_XOR_AND_FETCH_1,
BUILT_IN_XOR_AND_FETCH_2, BUILT_IN_XOR_AND_FETCH_4,
BUILT_IN_XOR_AND_FETCH_8, BUILT_IN_NAND_AND_FETCH_N,
BUILT_IN_NAND_AND_FETCH_1, BUILT_IN_NAND_AND_FETCH_2,
BUILT_IN_NAND_AND_FETCH_4, BUILT_IN_NAND_AND_FETCH_8,
BUILT_IN_BOOL_COMPARE_AND_SWAP_N, BUILT_IN_BOOL_COMPARE_AND_SWAP_1,
BUILT_IN_BOOL_COMPARE_AND_SWAP_2, BUILT_IN_BOOL_COMPARE_AND_SWAP_4,
BUILT_IN_BOOL_COMPARE_AND_SWAP_8, BUILT_IN_VAL_COMPARE_AND_SWAP_N,
BUILT_IN_VAL_COMPARE_AND_SWAP_1, BUILT_IN_VAL_COMPARE_AND_SWAP_2,
BUILT_IN_VAL_COMPARE_AND_SWAP_4, BUILT_IN_VAL_COMPARE_AND_SWAP_8,
BUILT_IN_LOCK_TEST_AND_SET_N, BUILT_IN_LOCK_TEST_AND_SET_1,
BUILT_IN_LOCK_TEST_AND_SET_2, BUILT_IN_LOCK_TEST_AND_SET_4,
BUILT_IN_LOCK_TEST_AND_SET_8, BUILT_IN_LOCK_RELEASE_N,
BUILT_IN_LOCK_RELEASE_1, BUILT_IN_LOCK_RELEASE_2,
BUILT_IN_LOCK_RELEASE_4, BUILT_IN_LOCK_RELEASE_8,
BUILT_IN_SYNCHRONIZE: New.
* builtins.c (called_as_built_in): Rewrite from CALLED_AS_BUILT_IN
as a function. Accept __sync_ as a prefix as well.
(expand_builtin_sync_operation, expand_builtin_compare_and_swap,
expand_builtin_lock_test_and_set, expand_builtin_synchronize,
expand_builtin_lock_release): New.
(expand_builtin): Call them.
* c-common.c (DEF_BUILTIN): Don't require __builtin_ prefix if
neither BOTH_P nor FALLBACK_P are defined.
(builtin_type_for_size): New.
(sync_resolve_size, sync_resolve_params, sync_resolve_return): New.
(resolve_overloaded_builtin): New.
* c-common.h (resolve_overloaded_builtin): Declare.
(builtin_type_for_size): Declare.
* c-typeck.c (build_function_call): Invoke resolve_overloaded_builtin.
* expr.c (sync_add_optab, sync_sub_optab, sync_ior_optab,
sync_and_optab, sync_xor_optab, sync_nand_optab, sync_old_add_optab,
sync_old_sub_optab, sync_old_ior_optab, sync_old_and_optab,
sync_old_xor_optab, sync_old_nand_optab, sync_new_add_optab,
sync_new_sub_optab, sync_new_ior_optab, sync_new_and_optab,
sync_new_xor_optab, sync_new_nand_optab, sync_compare_and_swap,
sync_compare_and_swap_cc, sync_lock_test_and_set,
sync_lock_release): New.
* optabs.h: Declare them.
* expr.h (expand_val_compare_and_swap, expand_bool_compare_and_swap,
expand_sync_operation, expand_sync_fetch_operation,
expand_sync_lock_test_and_set): Declare.
* genopinit.c (optabs): Add sync optabs.
* optabs.c (init_optabs): Initialize sync optabs.
(expand_val_compare_and_swap_1, expand_val_compare_and_swap,
expand_bool_compare_and_swap, expand_compare_and_swap_loop,
expand_sync_operation, expand_sync_fetch_operation,
expand_sync_lock_test_and_set): New.
* doc/extend.texi (Atomic Builtins): New section
* doc/md.texi (Standard Names): Add sync patterns.
From-SVN: r98154
|
|
(BUILT_IN_LLCEIL, BUILT_IN_LLCEILF, BUILT_IN_LLCEILL): New.
* optabs.h (enum optab_index): Add new OTI_lceil.
(lceil_optab): Define corresponding macro.
* optabs.c (init_optabs): Initialize lceil_optab.
* genopinit.c (optabs): Implement lceil_optab using lceilsi2
and lceildi2 patterns.
* builtins.c (expand_builtin_int_roundingfn): Handle
BUILT_IN_LCEIL{,F,L} and BUILT_IN_LLCEIL{,F,L}.
(fold_builtin_int_roundingfn): Handle BUILT_IN_LCEIL{,F,L} and
BUILT_IN_LLCEIL{,F,L}.
(fold_builtin_1): Fold BUILT_IN_LCEIL{,F,L} and
BUILT_IN_LLCEIL{,F,L} using fold_builtin_int_roundingfn.
(mathfn_built_in): Handle BUILT_IN LCEIL and BUILT_IN_LLCEIL.
(expand_builtin): Expand BUILT_IN_LCEIL{,F,L} and
BUILT_IN_LLCEIL{,F,L} using expand_builtin_int_roundingfn.
* convert.c (convert_to_integer): Convert (long int)ceil{,f,l},
into lceil built-in function and (long long int)ceil{,f,l} into
llceil built-in function.
* fold-const.c (tree_expr_nonnegative_p): Add BUILT_IN_LCEIL and
BUILT_IN_LLCEIL.
testsuite:
* gcc.dg/builtins-53.c: Also check (int)ceil* and
(long long int)ceil*.
From-SVN: r97964
|
|
(BUILT_IN_LLFLOOR, BUILT_IN_LLFLOORF, BUILT_IN_LLFLOORL): New.
* optabs.h (enum optab_index): Add new OTI_lfloor.
(lfloor_optab): Define corresponding macro.
* optabs.c (init_optabs): Initialize lfloor_optab.
* genopinit.c (optabs): Implement lfloor_optab using lfloorsi2
and lfloordi2 patterns.
* builtins.c (expand_builtin_int_roundingfn): New prototype.
(expand_builtin_int_roundingfn): New function.
(fold_builtin_int_roundingfn): New prototype.
(fold_builtin_int_roundingfn): New function, renamed from
fold_builtin_lround.
Handle BUILT_IN_LROUND{,F,L}, BUILT_IN_LLROUND{,F,L} and
BUILT_IN_LFLOOR{,F,L}, BUILT_IN_LLFLOOR{,F,L}.
(fold_builtin_1): Fold BUILT_IN_LFLOOR{,F,L} and
BUILT_IN_LLFLOOR{,F,L} using fold_builtin_int_roundingfn.
(mathfn_built_in): Handle BUILT_IN LFLOOR and BUILT_IN_LLFLOOR.
(expand_builtin): Expand BUILT_IN_LFLOOR{,F,L} and
BUILT_IN_LLFLOOR{,F,L} using expand_builtin_int_roundingfn.
* convert.c (convert_to_integer): Convert (long int)floor{,f,l},
into lfloor built-in function and (long long int)floor{,f,l} into
llfloor built-in function.
* fold-const.c (tree_expr_nonnegative_p): Add BUILT_IN_LFLOOR and
BUILT_IN_LLFLOOR.
testsuite:
* gcc.dg/builtins-53.c: New test.
From-SVN: r97886
|
|
* optabs.h (enum optab_index): Remove OTI_llrint.
(llrint_optab): Remove macro.
* optabs.c (init_optabs): Remove llrint_optab initialization.
* genopinit.c (optabs): Remove llrint_optab implementation.
* builtins.c (expand_builtin_mathfn): Handle BUILT_IN_LLRINT{,F,L}
using lrint_optab.
From-SVN: r96983
|
|
* optabs.h (enum optab_index): Add new OTI_lrint and OTI_llrint.
(lrint_optab, llrint_optab): Define corresponding macros.
* optabs.c (init_optabs): Initialize lrint_optab and llrint_optab.
* genopinit.c (optabs): Implement lrint_optab using lrintsi2
pattern and llrint_optab using llrintdi2 patterns.
* builtins.c (expand_builtin_mathfn): Handle BUILT_IN_LRINT{,F,L}
using lrint_optab and BUILT_IN_LLRINT{,F,L} using llrint_optab.
(expand_builtin): Expand BUILT_IN_LRINT{,F,L} and
BUILT_IN_LLRINT{,F,L} using expand_builtin_mathfn if
flag_unsafe_math_optimizations is set.
testsuite:
* gcc.dg/builtins-46.c: Also check lrint* and llrint*.
From-SVN: r96802
|
|
* optabs.h (enum optab_index): Add new OTI_ldexp.
(ldexp_optab): Define corresponding macro.
* optabs.c (init_optabs): Initialize ldexp_optab.
* genopinit.c (optabs): Implement ldexp_optab using ldexp?f3
patterns.
* builtins.c (expand_builtin_mathfn_2): Handle BUILT_IN_LDEXP{,F,L}
using ldexp_optab.
(expand_builtin): Expand BUILT_IN_LDEXP{,F,L} using
expand_builtin_mathfn_2 if flag_unsafe_math_optimizations is set.
* config/i386/i386.md (ldexpsf3, ldexpdf3, ldexpxf3): New expanders
to implement ldexpf, ldexp and ldexpl built-ins as inline x87
intrinsics.
testsuite:
* gcc.dg/builtins-34.c: Also check ldexp*.
From-SVN: r94931
|
|
* builtins.c (expand_builtin_copysign): New.
(expand_builtin): Call it.
* genopinit.c (optabs): Add copysign_optab.
* optabs.c (init_optabs): Initialize it.
(expand_copysign): New.
* optabs.h (OTI_copysign, copysign_optab): New.
(expand_copysign): Declare.
* config/alpha/alpha.md (UNSPEC_COPYSIGN): New.
(copysignsf3, ncopysignsf3, copysigndf3, ncopysigndf3): New.
* config/i386/i386.c (ix86_build_signbit_mask): Split from ...
(ix86_expand_fp_absneg_operator): ... here.
(ix86_split_copysign): New.
* config/i386/i386-protos.h: Update.
* config/i386/i386.md (UNSPEC_COPYSIGN): New.
(copysignsf3, copysigndf3): New.
* config/ia64/ia64.md (UNSPEC_COPYSIGN): New.
(copysignsf3, ncopysignsf3): New.
(copysigndf3, ncopysigndf3): New.
(copysignxf3, ncopysignxf3): New.
* config/ia64/ia64.c (rtx_needs_barrier): Handle UNSPEC_COPYSIGN.
From-SVN: r94357
|
|
* genopinit.c (optabs): Use smin/smax for floating point too.
* doc/md.texi: Update to match. Clarify that floating point
results are undefined for +0/-0 and NaN.
* doc/rtl.texi: Likewise.
* rtl.def (SMIN, SMAX): Likewise
* tree.def (MIN_EXPR, MAX_EXPR): Likewise.
* config/alpha/alpha.md (smaxdf3, smindf3, smaxsf3, sminsf3): Add
leading 's' to the name.
* config/ia64/ia64.md (smaxsf3, sminsf3, smaxdf3, smindf3,
smaxxf3, sminxf3): Likewise.
* config/rs6000/rs6000.md (smaxdf3, smindf3, smaxsf3, sminsf3):
Likewise.
From-SVN: r94083
|
|
* optabs.h (OTI_movmisalign, movmisalign_optab): New.
* optabs.c (init_optabs): Create it.
* genopinit.c (optabs): Initialize it.
* expr.c (expand_expr_real_1) <MISALIGNED_INDIRECT_REF>: Use it.
* tree-vectorizer.c (vect_supportable_dr_alignment): Likewise.
* target-def.h (TARGET_VECTORIZE_MISALIGNED_MEM_OK): Remove.
* target.h (vectorize.misaligned_mem_ok): Remove.
* targhooks.c (default_vect_misaligned_mem_ok): Remove.
* doc/md.texi (movmisalign): New.
* doc/tm.texi (TARGET_VECTORIZE_MISALIGNED_MEM_OK): Remove.
From-SVN: r92537
|
|
2004-12-09 Dorit Naishlos <dorit@il.ibm.com>
* genopinit.c (vec_realign_store_optab): Initialization removed.
* optabs.c (optab_for_tree_code): REALIGN_STORE_EXPR case removed.
* optabs.h (optab_index): OTI_vec_realign_store Removed.
(vec_realign_store_optab): Removed.
* target-def.h (TARGET_VECTORIZE_BUILTIN_MASK_FOR_STORE): Removed.
* target.h (builtin_mask_for_store): Removed.
* tree.def (REALIGN_STORE_EXPR): Removed.
* config/rs6000/rs6000.c (rs6000_builtin_mask_for_store): Removed.
(altivec_builtin_mask_for_store): Removed.
(altivec_init_builtins): Removed initialization of
altivec_builtin_mask_for_store.
* doc/tm.texi (TARGET_VECTORIZE_MISALIGNED_MEM_OK): New.
(TARGET_VECTORIZE_BUILTIN_MASK_FOR_LOAD): New.
From-SVN: r91932
|
|
* expr.c (expand_expr_real_1): Handle VEC_COND_EXPR.
* genopinit.c (optabs): New entry for vcond_gen_code and
vcondu_gen_code.
* optabs.c (vcond_gen_code, vcondu_gen_code): New optabs.
(get_rtx_code): New function.
(vector_compare_rtx): New function.
(init_optabs): Initialize vcond_gen_code and vcondu_gen_code.
(expand_vec_cond_expr_p): New function.
(expand_vec_cond_expr): New function.
(get_vcond_icode): New function.
* optabs.h (expand_vec_cond_expr, expand_vec_cond_expr_p): New externs.
(vcond_gen_code, vcondu_gen_code): Same.
From-SVN: r88209
|
|
2004-09-23 Dorit Naishlos <dorit@il.ibm.com>
* tree.def (ALIGN_INDIRECT_REF, MISALIGNED_INDIRECT_REF):
New tree-codes.
* tree.h (REF_ORIGINAL): Consider ALIGN_INDIRECT_REF and
MISALIGNED_INDIRECT_REF.
* alias.c (get_alias_set, nonoverlapping_memrefs_p): Likewise.
* emit-rtl.c (mem_expr_equal_p, set_mem_attributes_minus_bitpos):
Likewise.
* expr.c (safe_from_p, expand_expr_real_1, rewrite_address_base)
(find_interesting_uses_address): Likewise.
* fold-const.c (non_lvalue, operand_equal_p): Likewise.
(build_fold_addr_expr_with_type): Likewise.
* gimplify.c (gimplify_addr_expr, gimplify_expr): Likewise.
* print-rtl.c (print_mem_expr): Likewise.
* tree-dump.c (dequeue_and_dump): Likewise.
* tree-eh.c (tree_could_trap_p): Likewise.
* tree-gimple.c (is_gimple_addressable, get_base_address): Likewise.
* tree-pretty-print.c (op_prio, op_symbol, dump_generic_node): Likewise.
* tree-ssa-alias.c (find_ptr_dereference, ptr_is_dereferenced_by):
Likewise.
* tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
* tree-ssa-dom.c (record_equivalences_from_stmt): Likewise.
* tree-ssa-loop-im.c (for_each_index, is_call_clobbered_ref): Likewise.
* tree-ssa-loop-ivopts.c (find_interesting_uses_address): Likewise.
(add_address_candidates, rewrite_address_base): Likewise.
* tree-ssa-operands.c (get_expr_operands, get_indirect_ref_operands):
Likewise.
* tree.c (staticp, build1_stat): Likewise.
* tree.def (REALIGN_LOAD_EXPR, REALIGN_STORE_EXPR): New tree-codes.
* tree-pretty-print.c (dump_generic_node): Consider REALIGN_LOAD_EXPR.
* tree-ssa-operands.c (get_expr_operands): Likewise.
* expr.c (expand_expr_real_1): Likewise.
* optabs.h (vec_realign_store_optab, vec_realign_load_optab): New
optabs.
(OTI_vec_realign_store, OTI_vec_realign_load): New optab_index values
for the new optabs.
(expand_ternary_op): New function.
* genopinit.c (optabs): Handle the new optabs.
* optabs.c (optab_for_tree_code): Add cases for the new tree-codes.
(init_optabs): Initialize vec_realign_load_optab.
(expand_ternary_op): New functions.
* target-def.h (TARGET_VECTORIZE): New member for struct gcc_target.
(TARGET_VECTORIZE_MISALIGNED_MEM_OK): New member for targetm.vectorize.
(TARGET_VECTORIZE_BUILTIN_MASK_FOR_LOAD): Likewise.
(TARGET_VECTORIZE_BUILTIN_MASK_FOR_STORE): Likewise.
* target.h (struct vectorize): New member for struct gcc_target.
(misaligned_mem_ok): New member for targetm.vectorize.
(builtin_mask_for_load): Likewise.
(builtin_mask_for_store): Likewise.
* targethooks.c (default_vect_misaligned_mem_ok): New function.
* targethooks.h (default_vect_misaligned_mem_ok): New function.
* config/rs6000/altivec.md (build_vector_mask_for_load): New
define_expand.
(vec_realign_load_v4si, vec_realign_load_v4sf, vec_realign_load_v8hi)
(vec_realign_load_v16qi): New define_insn.
* config/rs6000/rs6000.h (ALTIVEC_BUILTIN_MASK_FOR_LOAD):
(ALTIVEC_BUILTIN_MASK_FOR_STORE): New target builtins.
* config/rs6000/rs6000.c (altivec_builtin_mask_for_load):
(altivec_builtin_mask_for_store): New variables.
(rs6000_builtin_mask_for_load): New function. Implements
TARGET_VECTORIZE_BUILTIN_MASK_FOR_LOAD.
(rs6000_builtin_mask_for_store): New function. Implements
TARGET_VECTORIZE_BUILTIN_MASK_FOR_STORE.
(rs6000_expand_builtin): Expand the target builtins
builtin_mask_for_load and builtin_mask_for_store.
(altivec_init_builtins): Initialize the new target builtins.
* config/i386/i386.c (ix86_misaligned_mem_ok): New function.
Implements the target hook TARGET_VECTORIZE_MISALIGNED_MEM_OK.
* tree-vectorizer.c (vect_create_data_ref): Renamed to
vect_create_data_ref_ptr. Returns a pointer instead of an array-ref.
(vect_create_addr_base_for_vector_ref): Additional argument (offset).
(vectorizable_store): Call vect_create_data_ref_ptr with additional
arguments, and create an indirect_ref with its return value data_ref.
Check aligned_access_p.
(vectorizable_load): Handle misaligned loads, using software-pipelined
scheme with REALIGN_LOAD_EXPR and ALIGN_INDIRECT_REF if
vec_realign_load_optab is supported, or using a scheme without
software-pipelining with MISALIGNED_INDIRECT_REF if the target hook
misaligned_mem_ok is supported.
(vect_finish_stmt_generation): Typo.
(vect_enhance_data_refs_alignment): Rename loop_vinfo to loop_info.
(vect_analyze_data_refs_alignment): Don't fail vectorization in the
presence of misaligned loads.
(vect_analyze_data_ref_access): Add check for constant init.
(vect_get_symbl_and_dr): Remove duplicate line.
* tree-vectorizer.h (DR_MISALIGNMENT): Add comment.
From-SVN: r87948
|
|
* Makefile.in (gengtype): Use $(BUILD_ERRORS).
(gengtype.o): Depend on errors.h.
* genattrtab.c (strcmp_check): Use gcc_assert and gcc_unreachable.
(attr_rtx_1, attr_printf, attr_copy_rtx, evaluate_eq_attr,
attr_alt_subset_p, attr_alt_subset_of_compl_p,
attr_alt_intersection, attr_alt_union, optimize_attrs, gen_insn,
write_test_expr, write_attr_value, write_eligible_delay,
make_internal_attr, make_numeric_value): Likewise.
* genautomata.c (regexp_name, get_str_vect,
gen_presence_absence_set, automaton_decl_hash,
automaton_decl_eq_p, insn_decl_hash, insn_decl_eq_p, decl_hash,
decl_eq_p, process_regexp, loop_in_regexp, check_loops_in_regexps,
process_regexp_cycles, reserv_sets_cmp, set_unit_reserv,
test_unit_reserv, it_is_empty_reserv_sets,
reserv_sets_are_intersected, reserv_sets_shift, reserv_sets_or,
reserv_sets_and, output_cycle_reservs, get_free_state,
intersected_state_reservs_p, states_union, remove_arc,
copy_insn_regexp, transform_1, transform_2, transform_3,
regexp_transform_func, store_alt_unit_usage,
check_regexp_units_distribution, process_seq_for_forming_states,
process_alts_for_forming_states, make_automaton,
form_arcs_marked_by_insn, create_composed_state,
set_out_arc_insns_equiv_num, partition_equiv_class,
process_insn_equiv_class, set_insn_equiv_classes,
units_to_automata_heuristic_distr, form_regexp,
longest_path_length, output_dfa_max_issue_rate, add_vect,
out_state_arcs_num, add_vect_el, output_trans_table,
output_state_alts_table, output_dead_lock_vect,
output_max_insn_queue_index_def,
output_min_insn_conflict_delay_func,
output_internal_insn_latency_func, output_print_reservation_func,
output_cpu_unit_reservation_p, output_state_arcs,
make_insn_alts_attr, make_internal_dfa_insn_code_attr,
make_default_insn_latency_attr,
form_important_insn_automata_lists): Likewise.
* genemit.c (gen_exp, output_add_clobbers,
output_added_clobbers_hard_reg_p): Likewise.
* genextract.c (print_path, main): Likewise.
* genflags.c (gen_macro): Likewise.
* gengenrtl.c: Include errors.h
(type_from_format, accessor_from_format): Likewise.
* gengtype.c (get_file_basename, output_mangled_typename,
walk_type, write_types_process_field,
write_types_local_process_field): Likewise.
* genmodes.c (complete_mode): Likewise.
* genopinit.c (gen_insn): Likewise.
* genoutput.c (output_insn_data, check_constraint_len,
constraint_len): Likewise.
* genpreds.c (add_mode_tests):Likewise.
* gen-protos.c (add_hash): Likewise.
* genrecog.c (find_operand, find_matching_operand,
validate_pattern, add_to_sequence, maybe_both_true,
nodes_identical_1, merge_trees, write_switch, write_cond,
write_action, is_unconditional, make_insn_sequence,
debug_decision_2): Likewise.
* gensupport.c (is_predicable, collect_insn_data,
alter_predicate_for_insn, maybe_eval_c_test): Likewise.
From-SVN: r87236
|
|
2004-09-04 Uros Bizjak <uros@kss-loka.si>
* builtins.c (expand_builtin_mathfn): Handle BUILT_IN_RINT{,F,L}
using rint_optab.
(expand_builtin): Expand BUILT_IN_RINT{,F,L} using
expand_builtin_mathfn.
* genopinit.c (optabs): Rename trunc_optab to btrunc_optab. Use
btrunc?f patterns for btrunc_optab. Implement rint_optab using
rint?f patterns.
* optabs.c (init_optabs): Initialize rint_optab.
* optabs.h (enum optab_index): Rename OTI_trunc to OTI_btrunc.
Add new OTI_rint.
(btrunc_optab): Rename macro from trunc_optab.
(rint_optab): Define corresponding macro.
* reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_FRNDINT_FLOOR,
UNSPEC_FRNDINT_CEIL, UNSPEC_FRNDINT_TRUNC, UNSPEC_FRNDINT_MASK_PM.
* config/i386/i386-protos.h (emit_i387_cw_initialization):
Change prototype. Add new int parameter.
* config/i386/i386.c (emit_i387_cw_initialization):
Handle new rounding modes.
* config/i386/i386.h (enum fp_cw_mode): Delete.
(MODE_NEEDED): Handle new rounding modes.
(EMIT_MODE_SET): Change condition to handle new rounding modes.
* config/i386/i386.md (UNSPEC_FRNDINT_FLOOR, UNSPEC_FRNDINT_CEIL,
UNSPEC_FRNDINT_TRUNC, UNSPEC_FRNDINT_MASK_PM): New unspecs to
represent different rounding modes of frndint insn.
(type): Add frndint type.
(i387, length, memory): Handle this type.
(i387_cw): New attribute definition.
(*fix_truncdi_1, fix_truncdi_nomemory, fix_truncdi_memory,
*fix_truncsi_1, fix_truncsi_nomemory, fix_truncsi_memory,
*fix_trunchi_1, fix_trunchi_nomemory, fix_trunchi_memory):
Add "i387_cw" attribute defined to "trunc".
(x86_fnstcw_1): Remove comment.
(*frndintxf2): Rename insn definition to frndintxf2. Move
insn definition near rint?f2 expanders.
(rintdf2, rintsf2, rintxf2): New expanders to implement rint,
rintf and rintl built-ins as inline x87 intrinsics.
(frndintxf2_floor): New pattern to implement floor rounding
mode with frndint x87 instruction.
(floordf2, floorsf2, floorxf2): New expanders to implement floor,
floorf and floorl built-ins as inline x87 intrinsics.
(frndintxf2_ceil): New pattern to implement ceil rounding
mode with frndint x87 instruction.
(ceildf2, ceilsf2, ceilxf2): New expanders to implement ceil,
ceilf and ceill built-ins as inline x87 intrinsics.
(frndintxf2_trunc): New pattern to implement trunc rounding
mode with frndint x87 instruction.
(btruncdf2, btruncsf2, btruncxf2): New expanders to implement trunc,
truncf and truncl built-ins as inline x87 intrinsics.
(frndintxf2_mask_pm): New pattern to implement rounding
mode with exceptions with frndint x87 instruction.
(nearbyintdf2, nearbyintsf2, nearbyintxf2): New expanders to
implement nearbyint, nearbyintf and nearbyintl built-ins as
inline x87 intrinsics.
* testsuite/gcc.dg/builtins-46.c: New.
From-SVN: r87076
|
|
* gensupport.c (init_md_reader_args_cb): Renamed from
init_md_reader_args. Add third option, callback function for
parsing program-specific options. Add diagnosis of incorrect
number of input files.
(init_md_reader): Fold into init_md_reader_args_cb.
(init_md_reader_args): Now a thin wrapper around
init_md_reader_args_cb.
* gensupport.h: Update prototypes.
* genattr.c, genattrtab.c, gencodes.c, genconfig.c, genemit.c
* genextract.c, genflags.c, genopinit.c, genoutput.c, genpeep.c
* genrecog.c: No need to diagnose lack of an input file;
init_md_reader_args will handle it.
* genconditions.c: Likewise, and use init_md_reader_args.
* genconstants.c: Likewise, and no need to call read_md_rtx.
From-SVN: r85511
|
|
From-SVN: r85435
|
|
clrmem*.
gcc/ChangeLog:
* builtins.c: Rename movstr*, except for movstrict*, to
movmem* and clrstr* to clrmem*.
* expr.c: Likewise.
* expr.h: Likewise.
* genopinit.c: Likewise.
* integrate.c: Likewise.
* local-alloc.c: Likewise.
* optabs.c: Likewise.
* optabs.h: Likewise.
* config/alpha/alpha.h: Likewise.
* config/alpha/alpha.md: Likewise.
* config/arm/arm-protos.h: Likewise.
* config/arm/arm.c: Likewise.
* config/arm/arm.md: Likewise.
* config/avr/avr.md: Likewise.
* config/c4x/c4x.c: Likewise.
* config/c4x/c4x.md: Likewise.
* config/frv/frv.md: Likewise.
* config/i386/i386-protos.h: Likewise.
* config/i386/i386.c: Likewise.
* config/i386/i386.h: Likewise.
* config/i386/i386.md: Likewise.
* config/i860/i860.c: Likewise.
* config/i860/i860.md: Likewise.
* config/ip2k/ip2k.md: Likewise.
* config/ip2k/libgcc.S: Likewise.
* config/ip2k/t-ip2k: Likewise.
* config/m32r/m32r.c: Likewise.
* config/m32r/m32r.md: Likewise.
* config/mcore/mcore.md: Likewise.
* config/mips/mips.c: Likewise.
* config/mips/mips.md: Likewise.
* config/ns32k/ns32k.c: Likewise.
* config/ns32k/ns32k.h: Likewise.
* config/ns32k/ns32k.md: Likewise.
* config/pa/pa.c: Likewise.
* config/pa/pa.md: Likewise.
* config/pdp11/pdp11.h: Likewise.
* config/pdp11/pdp11.md: Likewise.
* config/rs6000/rs6000.c: Likewise.
* config/rs6000/rs6000.md: Likewise.
* config/s390/s390-protos.h: Likewise.
* config/s390/s390.c: Likewise.
* config/s390/s390.md: Likewise.
* config/sh/lib1funcs.asm: Likewise.
* config/sh/sh.c: Likewise.
* config/sh/sh.md: Likewise.
* config/sh/t-sh: Likewise.
* config/sparc/sparc.h: Likewise.
* config/vax/vax.md: Likewise.
* config/xtensa/xtensa.c: Likewise.
* config/xtensa/xtensa.md: Likewise.
* doc/invoke.texi: Likewise.
* doc/md.texi: Likewise.
* doc/rtl.texi: Likewise.
gcc/testsuite/ChangeLog:
* gcc.c-torture/execute/builtins/mempcpy-2.c: Rename movstr*,
except for movstrict*, to movmem* and clrstr* to clrmem*.
From-SVN: r84222
|
|
* optabs.h (enum optab_index): Add new OTI_log1p.
(log1p_optab): Define corresponding macro.
* optabs.c (init_optabs): Initialize log1p_optab.
* genopinit.c (optabs): Implement log1p_optab using log1p?f2
patterns.
* builtins.c (expand_builtin_mathfn): Handle BUILT_IN_LOG1P{,F,L}
using log1p_optab.
(expand_builtin): Expand BUILT_IN_LOG1P{,F,L} using
expand_builtin_mathfn if flag_unsafe_math_optimizations is set.
* reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_FYL2XP1.
* config/i386/i386.c (ix86_emit_i387_log1p): New function.
* config/i386/i386-protos.h (ix86_emit_i387_log1p):
Prototype here.
* config/i386/i386.md (UNSPEC_FYL2XP1): New unspec to represent
x87's fyl2xp1 instruction.
(*fyl2x_xf3): Rename insn definition to fyl2x_xf3.
(fyl2xp1_xf3): New pattern to implement fyl2xp1 x87 instruction.
(log1psf2, log1pdf2, log1pxf2): New expanders to implement log1pf,
log1p and log1pl built-ins as inline x87 intrinsics.
* testsuite/gcc.dg/builtins-33.c: Also check log1p*.
From-SVN: r81606
|
|
* optabs.h (enum optab_index): Add new OTI_fmod and OTI_drem.
(fmod_optab): Define corresponding macros.
* optabs.c (init_optabs): Initialize fmod_optab and drem_optab.
* genopinit.c (optabs): Implement fmod_optab and drem_optab
using fmod?f3 and drem?f3 patterns.
* builtins.c (expand_builtin_mathfn_2): Handle BUILT_IN_FMOD{,F,L}
using fmod_optab and BUILT_IN_DREM{,F,L} using drem_optab.
(expand_builtin): Expand BUILT_IN_FMOD{,F,L} and
BUILT_IN_DREM{,F,L} using expand_builtin_mathfn_2 if
flag_unsafe_math_optimizations is set.
* reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_FPREM_F,
UNSPEC_FPREM_U, UNSPEC_FPREM1_F and UNSPEC_FPREM1_U.
* config/i386/i386.c (ix86_emit_fp_unordered_jump): New function.
* config/i386/i386-protos.h (ix86_emit_fp_unordered_jump):
Prototype here.
* config/i386/i386.md (UNSPEC_FPREM_F, UNSPEC_FPREM_U,
UNSPEC_FPREM1_F, UNSPEC_FPREM1_U): New unspecs to represent x87's
fprem and fprem1 instructions.
(*x86_fnstsw_1): Change input parameter to (reg:CCFP 18).
Rename insn definition to x86_fnstsw_1.
(fpremxf4, fprem1xf4): New patterns to implement fprem and fprem1
x87 instructions.
(fmodsf3, fmoddf3, fmodxf3): New expanders to implement fmodf, fmod
and fmodl built-ins as inline x87 intrinsics.
(dremsf3, dremdf3, dremxf3): New expanders to implement dremf, drem
and dreml built-ins as inline x87 intrinsics.
* testsuite/gcc.dg/builtins-40.c: New test.
From-SVN: r81555
|
|
2004-05-03 Uros Bizjak <uros@kss-loka.si>
* optabs.h (enum optab_index): Add new OTI_expm1.
(expm1_optab): Define corresponding macro.
* optabs.c (init_optabs): Initialize expm1_optab.
* genopinit.c (optabs): Implement expm1_optab using expm1?f2
patterns.
* builtins.c (expand_builtin_mathfn): Handle BUILT_IN_EXPM1{,F,L}
using expm1_optab.
(expand_builtin): Expand BUILT_IN_EXPM1{,F,L} using
expand_builtin_mathfn if flag_unsafe_math_optimizations is set.
* config/i386/i386.md (expm1df2, expm1sf2, expm1xf2): New expanders
to implement expm1, expm1f and expm1l built-ins as inline x87
intrinsics.
testsuite:
* gcc.dg/builtins-34.c: Also check expm1*.
From-SVN: r81425
|
|
2004-04-20 Uros Bizjak <uros@kss-loka.si>
* optabs.h (enum optab_index): Add new OTI_asin and OTI_acos.
(asin_optab, acos_optab): Define corresponding macros.
* optabs.c (init_optabs): Initialize asin_optab and acos_optab.
* genopinit.c (optabs): Implement asin_optab and acos_optab
using asin?f2 and acos?f2 patterns.
* builtins.c (expand_builtin_mathfn): Handle BUILT_IN_ASIN{,F,L}
using asin_optab, and BUILT_IN_ACOS{,F,L} using acos_optab.
(expand_builtin): Expand BUILT_IN_ASIN{,F,L} and BUILT_IN_ACOS{,F,L}
using expand_builtin_mathfn if flag_unsafe_math_optimizations is set.
* config/i386/i386.md (asindf2, asinsf2, asinxf2, acosdf2,
acossf2, acosxf2): New expanders to implement asin, asinf, asinl,
acos, acosf and acosl built-ins as inline x87 intrinsics.
* gcc.dg/builtins-39.c: New test.
From-SVN: r80921
|
|
2004-04-14 Uros Bizjak <uros@kss-loka.si>
* optabs.h (enum optab_index): Add new OTI_logb and OTI_ilogb.
(logb_optab, ilogb_optab): Define corresponding macros.
* optabs.c (init_optabs): Initialize logb_optab and ilogb_optab.
* genopinit.c (optabs): Implement logb_optab and ilogb_optab
using logb?f2 and ilogb?i2 patterns.
* builtins.c (expand_builtin_mathfn): Handle BUILT_IN_LOGB{,F,L}
using logb_optab, and BUILT_IN_ILOGB{,F,L} using ilogb_optab.
(expand_builtin): Expand BUILT_IN_LOGB{,F,L} and BUILT_IN_ILOGB{,F,L}
using expand_builtin_mathfn if flag_unsafe_math_optimizations is set.
* reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_XTRACT_FRACT
and UNSPEC_XTRACT_EXP.
* config/i386/i386.md (*fxtractdf3, *fxtractsf3, *fxtractxf3): New
patterns to implement fxtract x87 instruction.
(logbdf2, logbsf2, logbxf2, ilogbsi2): New expanders to implement
logb, logbf, logbl, ilogb, ilogbf and ilogbl built-ins as inline x87
intrinsics.
(UNSPEC_XTRACT_FRACT, UNSPEC_XTRACT_EXP): New unspecs to represent
x87's fxtract insn.
* gcc.dg/builtins-38.c: New test.
From-SVN: r80709
|
|
2004-04-06 Uros Bizjak <uros@kss-loka.si>
* builtins.c: Implement support for sincos function.
(expand_builtin_mathfn): Remove BUILT_IN_SIN{,F,L} and
BUILT_IN_COS{,F,L}.
(expand_builtin_mathfn_3): New function.
(expand_builtin): Expand BUILT_IN_SIN{,F,L} and
BUILT_IN_COS{,F,L} using expand_builtin_mathfn_3 if
flag_unsafe_math_optimization is set.
* optabs.h (enum optab_index): Add new OTI_sincos.
(sincos_optab): Define corresponding macro.
* optabs.c (init_optabs): Initialize sincos_optab.
(expand_twoval_unop): New function.
* genopinit.c (optabs): Implement sincos_optab using sincos?f3
patterns.
* reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_SINCOS_COS
and UNSPEC_SINCOS_SIN.
* config/i386/i386.md (sincosdf3, sincossf3, *sincosextendsfdf3,
sincosxf3): New patterns to implement sincos, sincosf and sincosl
built-ins as inline x87 intrinsics. Define splits for
sindf2, sinsf2, *sinextendsfdf2, sinxf2, cosdf2,
cossf2, *cosextendsfdf2 and cosxf2 patterns from corresponding
sincos patterns.
(sindf2, sinsf2, sinxf2): Rename to *sindf2, *sinsf2, *sinxf2.
(cosdf2, cossf2, cosxf2): Rename to *cosdf2, *cossf2, *cosxf2.
(UNSPEC_SINCOS_SIN, UNPEC_SINCOS_COS): New unspecs to represent
x87's unspec insn.
* gcc.dg/builtins-36.c: New test.
From-SVN: r80463
|
|
2004-03-10 Uros Bizjak <uros@kss-loka.si>
* optabs.h (enum optab_index): Add new OTI_exp10 and OTI_exp2.
(exp10_optab, exp2_optab): Define corresponding macros.
* optabs.c (init_optabs): Initialize exp10_optab and exp2_optab.
* genopinit.c (optabs): Implement exp10_optab and exp2_optab
using exp10?f2 and exp2?f2 patterns.
* builtins.c (expand_builtin_mathfn): Handle BUILT_IN_EXP10{,F,L}
using exp10_optab, and BUILT_IN_EXP2{,F,L} using exp2_optab.
(expand_builtin): Expand BUILT_IN_EXP10{,F,L} and BUILT_IN_EXP2{,F,L}
using expand_builtin_mathfn if flag_unsafe_math_optimizations is set.
* config/i386/i386.md (exp10sf2, exp10df2, exp10xf2, exp2sf2,
exp2df2, exp2xf2): New patterns to implement exp10, exp10f, exp10l,
exp2, exp2f and exp2l built-ins as inline x87 intrinsics.
* gcc.dg/builtins-34.c: New test.
From-SVN: r79279
|
|
rtx class codes...
2004-02-07 Paolo Bonzini <bonzini@gnu.org>
* alias.c (rtx_equal_for_memref_p): Use predicates
to test rtx classes and new rtx class codes, possibly
splitting conditionals that tested against '<' and 'o'.
* caller-save.c (save_call_clobbered_regs): Likewise.
* combine.c (contains_muldiv, find_split_point, subst,
combine_simplify_rtx, simplify_if_then_else,
simplify_set, simplify_logical, expand_compound_operation,
make_compound_operation, if_then_else_cond, known_cond,
apply_distributive_law, cached_nonzero_bits,
cached_num_sign_bit_copies, simplify_shift_const,
gen_binary, simplify_comparison, update_table_tick,
record_value_for_reg, get_lsat_value_validate): Likewise.
* cse.c (mention_regs, find_best_addr, find_comparison_args,
fold_rtx, cse_insn, invalidate_memory, cse_basic_block):
Likewise.
* emit-rtl.c (copy_insn_1): Likewise.
* expr.c (force_operand): Likewise.
* final.c (final_scan_insn, get_mem_expr_from_op): Likewise.
* flow.c (notice_stack_pointer_modification_1,
invalidate_mems_from_autoinc, ior_reg_cond, not_reg_cond,
and_reg_cond, elim_reg_cond): Likewise.
* function.c (update_epilogue_consts): Likewise.
* genattrtab.c (attr_rtx_1): Likewise.
* genopinit.c (gen_insn): Likewise.
* integrate.c (subst_constants): Likewise.
* jump.c (reversed_comparison_code_parts,
reversed_comparison_code, delete_related_insns,
rtx_renumbered_equal_p): Likewise.
* local-alloc.c (block_alloc): Likewise.
* loop.c (rtx_equal_for_prefetch_p, maybe_eliminate_biv,
canonicalize_condition): Likewise.
* loop-iv.c (simplify_using_conditions, iv_number_of_iterations):
Likewise.
* optabs.c (add_equal_node, expand_binop): Likewise.
* predict.c (estimate_probability): Likewise.
* ra-debug.c (ra_print_rtx_2op, ra_print_rtx): Likewise.
* recog.c (validate_replace_rtx_1, comparison_operator,
offsettable_address_p, constrain_operands): Likewise.
* reg-stack.c (swap_rtx_condition_1, subst_stack_regs_pat):
Likewise.
* regclass.c (scan_one_insn): Likewise.
* regmove.c (stable_and_no_regs_but_for_p): Likewise.
* regrename.c (kill_autoinc_value): Likewise.
* reload.c (find_reusable_reload, find_reloads,
reg_overlap_mentioned_for_reload_p): Likewise.
* reload1.c (gen_reload, delete_address_reloads_1): Likewise.
* rtl.c (copy_rtx): Likewise.
* rtl.h (CONSTANT_P, INSN_P): Likewise.
* rtlanal.c (commutative_operand_precedence): Likewise.
* sched-deps.c (conditions_mutex_p): Likewise.
* sched-rgn.c (is_cfg_nonregular): Likewise.
* simplify-rtx.c (simplify_gen_binary,
simplify_gen_relational, simplify_replace_rtx,
simplify_unary_operation, simplify_binary_operation,
simplify_ternary_operation, simplify_rtx): Likewise.
* unroll.c (reg_dead_after_loop): Likewise.
* config/alpha/alpha.c (alpha_swapped_comparison_operator,
print_operand): Likewise.
* config/arc/arc.c (proper_comparison_operator): Likewise.
* config/arm/arm.c (arm_arm_address_cost, arm_select_cc_mode):
Likewise.
* config/avr/avr.c (_reg_unused_after): Likewise.
* config/frv/frv.c (frv_ifcvt_modify_tests,
frv_ifcvt_modify_insn, frv_pack_insn): Likewise.
* config/i386/i386.c (ix86_comparison_operator,
ix86_carry_flag_operator, fcmov_comparison_operator,
arith_or_logical_operator, print_operand,
ix86_expand_binary_operator, ix86_binary_operator_ok):
Likewise.
* config/i386/i386.md: Likewise.
* config/ia64/ia64.c (not_postinc_memory_operand,
ia64_print_operand, update_set_flags, errata_emit_nops):
Likewise.
* config/ia64/ia64.h (PREFERRED_RELOAD_CLASS,
CONSTRAINT_OK_FOR_S): Likewise.
* config/ip2k/ip2k.c (mdr_resequence_xy_yx,
mdr_try_move_dp_reload, ip2k_check_can_adjust_stack_ref,
ip2k_xexp_not_uses_reg_for_mem, ip2k_xexp_not_uses_reg_p,
ip2k_composite_xexp_not_uses_reg_p, ip2k_unary_operator):
Likewise.
* config/iq2000/iq2000.c (cmp_op, symbolic_expression_p,
eqne_comparison_operator, signed_comparison_operator):
Likewise.
* config/mips/mips.c (cmp_op, symbolic_expression_p):
Likewise.
* config/mmix/mmix (mmix_foldable_comparison_operator,
mmix_comparison_operator): Likewise.
* config/pa/pa.c (hppa_legitimize_address): Likewise.
* config/rs6000/rs6000.c (stmw_operation,
branch_comparison_operator, trap_comparison_operator,
ccr_bit): Likewise.
* config/rs6000/rs6000.h (SELECT_CC_MODE): Likewise.
* config/s390/s390.c (s390_alc_comparison,
s390_slb_comparison):L Likewise.
* config/sh/sh.c (gen_block_redirect, reg_unused_after):
Likewise.
* config/sparc/sparc.c (eq_or_neq, normal_comp_operator,
noov_compare_op, noov_compare64_op, v9_regcmp_op,
emit_hard_tfmode_operation, reg_unused_after)
* doc/md.texi, doc/rtl.texi: Likewise.
* ra-debug.c: Add 2004 to list of copyright years.
* unroll.c: Likewise.
* combine.c (simplify_logical): Remove dummy test,
(apply_distributive_law): Fix typo in comment.
GET_CODE (x) == AND so x is a commutative binary op.
* jump.c (delete_related_insns): simplify loop
condition, move testing of RTX codes inside the loop.
(rtx_renumbered_equal_p): do not use RTX_CODE.
* rtl.c (rtx_class): Declare as enum rtx_class.
* rtl.def (EQ, NE, UNEQ, LTGT, UNORDERED, ORDERED):
Move to RTX_COMM_COMPARE class.
(HIGH, SYMBOL_REF, LABEL_REF, CONST, CONST_INT, CONST_DOUBLE):
Move to RTX_CONST_OBJ class.
* rtl.h (enum rtx_class): New declaration,
(RTX_OBJ_MASK, RTX_OBJ_RESULT, RTX_COMPARE_MASK,
RTX_COMPARE_RESULT, RTX_ARITHMETIC_MASK, RTX_ARITHMETIC_RESULT,
RTX_BINARY_MASK, RTX_BINARY_RESULT, RTX_COMMUTATIVE_MASK,
RTX_COMMUTATIVE_RESULT, RTX_NON_COMMUTATIVE_RESULT,
RTX_EXPR_FIRST, RTX_EXPR_LAST, UNARY_P, BINARY_P,
ARITHMETIC_P, COMMUTATIVE_ARITHMETIC_P, COMPARISON_P,
SWAPPABLE_OPERANDS_P, NON_COMMUTATIVE_P, COMMUTATIVE_P,
OBJECT_P): New macros.
* config/sparc/sparc.c (noov_compare_op): Remove register
from parameter.
From-SVN: r78824
|
|
2004-02-11 Uros Bizjak <uros@kss-loka.si>
* optabs.h (enum optab_index): Add new OTI_log10 and OTI_log2.
(log10_optab, log2_optab): Define corresponding macros.
* optabs.c (init_optabs): Initialize log10_optab and log2_optab.
* genopinit.c (optabs): Implement log10_optab and log2_optab
using log10?f2 and log2?f2 patterns.
* builtins.c (expand_builtin_mathfn): Handle BUILT_IN_LOG10{,F,L}
using log10_optab, and BUILT_IN_LOG2{,F,L} using log2_optab.
(expand_builtin): Expand BUILT_IN_LOG10{,F,L} and BUILT_IN_LOG2{,F,L}
using expand_builtin_mathfn if flag_unsafe_math_optimizations is set.
* config/i386/i386.md (log10sf2, log10df2, log10xf2, log2sf2,
log2df2, log2xf2): New patterns to implement log10, log10f, log10l,
log2, log2f and log2l built-ins as inline x87 intrinsics.
* gcc.dg/builtins-33.c: New test.
From-SVN: r77675
|
|
* alias.c, basic-block.h, c-common.c, c-common.h,
c-cppbuiltin.c, c-opts.c, c-pragma.c, c-pretty-print.c,
calls.c, cfg.c, cfgcleanup.c, cfgrtl.c, cgraph.h, collect2.c,
combine.c, cppcharset.c, cpphash.h, cppinit.c, cpplib.c,
cpplib.h, cppmacro.c, crtstuff.c, cselib.c, cselib.h,
defaults.h, df.c, dominance.c, et-forest.c, expmed.c, expr.c,
expr.h, fix-header.c, function.h, gcc.c, gcse.c, genattrtab.c,
genautomata.c, genconditions.c, genemit.c, genflags.c,
gengtype.c, gengtype.h, genopinit.c, genrecog.c, gensupport.c,
ggc-zone.c, graph.c, haifa-sched.c, input.h, integrate.c,
langhooks-def.h, langhooks.c, langhooks.h, line-map.c,
line-map.h, local-alloc.c, optabs.c, optabs.h, postreload.c,
ra.h, recog.c, reg-stack.c, regmove.c, reload.c, reorg.c,
rtl.c, sched-deps.c, sched-ebb.c, sdbout.c, system.h,
target.h, targhooks.c, toplev.h, tree-inline.c, unwind-pe.h,
unwind.h, varray.c, varray.h: Update copyright.
From-SVN: r76302
|
|
* expmed.c (store_bit_field, extract_bit_field): Use new named patterns
* expr.c (store_constructor): Use vec_init pattern.
* genopinit.c (optabs): Initailize vec_set/vec_extract/vec_init.
* optabs.h (optab_index): ADD OTI_vec_set/OTI_vec_extract/OTI_vec_init
(vec_set_optab, vec_extract_optab, vec_init_optab): New.
* i386.md (vec_setv2df, vec_extractv2df, vec_setv4sf, vec_extractv4sf):
New patterns.
(sse2_unpc?pd): Fix pattern.
(sse2_movlpd): Kill.
(sse2_movsd): Deal with movlpd too.
* i386.c (ix86_expand_builtin): Use sse2_movsd instead of sse2_movlpd.
(ix86_expand_vector_init): New.
* emmintrin.h (__mm_set_pd, __mm_set_ps): Use vector extensions.
* md.texi (vec_set, vec_extract): Document
From-SVN: r75304
|
|
min-insn-modes.o.
* Makefile.in (BUILD_RTL): Replace $(BUILD_PREFIX)insn-modes.o
with min-insn-modes.o.
(STAGESTUFF): Add min-insn-modes.c.
(genobjs): Add genmodes.o.
(print-rtl.o, print-rtl1.o): Depend on $(TM_P_H).
(insn-modes.o): Depend on $(TM_H) not $(GTM_H); also real.h.
(min-insn-modes.c, min-insn-modes.o): New rules.
(s-modes): Also generate min-insn-modes.c.
($(BUILD_PREFIX_1)insn-modes.o): Kill.
* genmodes.c (struct mode_data): Add format field.
(blank_mode, validate_mode, complete_mode): Update to match.
(make_scalar_mode): Separate into make_int_mode and make_float_mode.
(_SCALAR_MODE): Kill.
(FLOAT_MODE, FRACTIONAL_FLOAT_MODE): Add format argument.
(emit_insn_modes_c_header): Adjust.
(emit_min_insn_modes_c_header, emit_real_format_for_mode)
(emit_min_insn_modes_c): New functions.
(emit_insn_modes_c): Call emit_real_format_for_mode.
(main): Add -m option to generate min-insn-modes.c.
* machmode.h: Update documentation. Add format argument to
all uses of FLOAT_MODE.
* real.c: Don't define real_format_for_mode here.
* dwarfout.c: Move default definition of PRINT_REG...
* defaults.h: ...here.
* print-rtl.c: Include tm_p.h.
(DEBUG_PRINT_REG, DEBUG_REGISTER_NAMES, debug_reg_names, reg_names):
Kill.
(print_rtx): Use PRINT_REG, not DEBUG_PRINT_REG. But surround
this entire block with #ifndef GENERATOR_FILE.
* regclass.c: Unconditionally define reg_names.
* config/mips/mips.h, config/rs6000/rs6000.h, config/sh/sh.h
Don't define DEBUG_REGISTER_NAMES.
* config/rs6000/darwin.h: Don't use DEBUG_REGISTER_NAMES in
redefinition of REGISTER_NAMES.
* config/i386/i386.h: Don't define DEBUG_PRINT_REG.
* combine.c: Change all preprocessor conditionals on
EXTRA_CC_MODES to use SELECT_CC_MODE instead; rearrange a bit
for clarity.
* genopinit.c: Remove mention of EXTRA_CC_MODES in comment.
* configure.in: Don't define EXTRA_CC_MODES.
* configure, config.in: Regenerate.
* doc/tm.texi: Remove documentation of EXTRA_CC_MODES.
* config/arc/arc.c, config/m32r/m32r.c, config/sparc/sparc.c:
May assume that GET_MODE_CLASS is accurate for extra CC modes
at all times.
* config/i860/i860.h (INIT_CUMULATIVE_ARGS): Pass correct
number of arguments to aggregate_value_p.
* genmodes.c (RESET_FLOAT_FORMAT, reset_float_format): New.
* machmode.def: Explain ARCH-modes.def. Document
RESET_FLOAT_FORMAT. Improve commentary on various mode
clusters. Do not define OI, PQI, PHI, PSI, PDI, QF, HF, TQF,
XF, or TF modes here. Remove backward-compatibility
definition of CC.
* config/alpha/alpha-modes.def: New file; define TF mode.
* config/arc/arm-modes.def: Define XF mode.
* config/c4x/c4x-modes.def: Define QF and HF modes. Unset
float format for SF and DF modes.
* config/dsp16xx/dsp16xx-modes.def: New file; define HF mode.
* config/i386/i386-modes.def: Define XF and TF modes.
* config/i960/i960-modes.def: Define TF mode.
* config/ia64/ia64-modes.def: Define TF and OI modes.
* config/m68k/m68k-modes.def: New file; define XF mode.
* config/mips/mips-modes.def: New file; define TF mode, reset
formats for SF and DF modes.
* config/pa/pa-modes.def: Define TF mode.
* config/rs6000/rs6000.c: Define TF and PSI modes.
* config/s390/s390-modes.def: Define OI mode.
* config/sh/sh-modes.def: New file; define PSI mode.
* config/sparc/sparc-modes.def: Define TF mode.
* config/vax/vax-modes.def: New file; reset formats for SF and
DF modes.
* config/c4x/c4x.c (c4x_override_options): No need to mess
with real_format_for_mode or set REAL_MODE_FORMATs.
(c4x_immed_int_constant): Don't apply GET_MODE_CLASS to rtx
variable.
* config/i386/i386.c (override_options): No need to set
REAL_MODE_FORMATs here.
* config/i960/i960.c (i960_initialize): Likewise.
* config/m68k/m68k.c (m68k_override_options): Likewise.
* config/ia64/ia64.c (ia64_override_options): Set REAL_MODE_FORMAT
for TFmode only if not the default.
* config/mips/mips.c (override_options): Likewise.
* config/vax/vax.c (override_optionms): Set REAL_MODE_FORMAT for
DFmode only if not the default.
* config/i370/i370.h (RET_REG): Don't consider TFmode.
* config/m68hc11/m68hc11.c (print_operand): Don't consider XFmode.
* config/dsp16xx/dsp16xx.c (hard_regno_mode_ok): #if 0 out use
of modes that don't appear anywhere in the machine description.
* config/arc/arc-modes.def, config/arm/arm-modes.def
* config/c4x/c4x-modes.def, config/frv/frv-modes.def
* config/i386/i386-modes.def, config/i960/i960-modes.def
* config/ia64/ia64-modes.def, config/mmix/mmix-modes.def
* config/pa/pa-modes.def, config/pdp11/pdp11-modes.def
* config/rs6000/rs6000-modes.def, config/s390/s390-modes.def
* config/sparc/sparc-modes.def: Convert to new style for
declaring extra CC modes.
From-SVN: r72440
|
|
* genopinit.c (main): Output code to declare undefined
variables.
From-SVN: r72220
|
|
* expr.c (cmpstr_optab, cmpmem_optab): New.
* genopinit.c: Initialize them.
* optabs.h: Declare them.
* optabs.c (init_optabs): Clear them.
(prepare_cmp_insn): Use cmpstr_optab and cmpmem_optab to find
block memory compare insns, not conditional chains. Restructure
the fallback generation of a call to memcmp/bcmp for better
readability.
From-SVN: r72185
|