1. 15 May, 2019 40 commits
    • i386: Emulate MMX ssse3_psign<mode>3 with SSE · e8b0e910
      Emulate MMX ssse3_psign<mode>3 with SSE.  Only SSE register source operand
      is allowed.
      
      	PR target/89021
      	* config/i386/sse.md (ssse3_psign<mode>3): Add SSE emulation.
      
      From-SVN: r271246
      H.J. Lu committed
    • i386: Emulate MMX pshufb with SSE version · 16ed2601
      Emulate MMX version of pshufb with SSE version by masking out the bit 3
      of the shuffle control byte.  Only SSE register source operand is allowed.
      
      	PR target/89021
      	* config/i386/sse.md (ssse3_pshufbv8qi3): Changed to
      	define_insn_and_split.  Also allow TARGET_MMX_WITH_SSE.  Add
      	SSE emulation.
      
      From-SVN: r271245
      H.J. Lu committed
    • i386: Emulate MMX ssse3_pmulhrswv4hi3 with SSE · 9c5a3533
      Emulate MMX ssse3_pmulhrswv4hi3 with SSE.  Only SSE register source
      operand is allowed.
      
      	PR target/89021
      	* config/i386/sse.md (ssse3_pmulhrswv4hi3): Require TARGET_MMX
      	or TARGET_MMX_WITH_SSE.
      	(*ssse3_pmulhrswv4hi3): Add SSE emulation.
      
      From-SVN: r271244
      H.J. Lu committed
    • i386: Emulate MMX ssse3_pmaddubsw with SSE · 6cbd0ef5
      Emulate MMX ssse3_pmaddubsw with SSE.  Only SSE register source operand
      is allowed.
      
      	PR target/89021
      	* config/i386/sse.md (ssse3_pmaddubsw): Add SSE emulation.
      
      From-SVN: r271243
      H.J. Lu committed
    • i386: Emulate MMX ssse3_ph<plusminus_mnemonic>dv2si3 with SSE · ea25b848
      Emulate MMX ssse3_ph<plusminus_mnemonic>dv2si3 with SSE by moving bits
      64:95 to bits 32:63 in SSE register.  Only SSE register source operand
      is allowed.
      
      	PR target/89021
      	* config/i386/sse.md (ssse3_ph<plusminus_mnemonic>dv2si3):
      	Changed to define_insn_and_split to support SSE emulation.
      
      From-SVN: r271242
      H.J. Lu committed
    • i386: Emulate MMX ssse3_ph<plusminus_mnemonic>wv4hi3 with SSE · 2da47f31
      Emulate MMX ssse3_ph<plusminus_mnemonic>wv4hi3 with SSE by moving bits
      64:95 to bits 32:63 in SSE register.  Only SSE register source operand
      is allowed.
      
      	PR target/89021
      	* config/i386/sse.md (ssse3_ph<plusminus_mnemonic>wv4hi3):
      	Changed to define_insn_and_split to support SSE emulation.
      
      From-SVN: r271241
      H.J. Lu committed
    • i386: Make _mm_empty () as NOP without MMX · 84791fca
      With SSE emulation of MMX intrinsics, we should make _mm_empty () as NOP
      without MMX.
      
      	PR target/89021
      	* config/i386/mmx.md (mmx_<emms>): Renamed to ...
      	(*mmx_<emms>): This.
      	(mmx_<emms>): New expander.
      
      From-SVN: r271240
      H.J. Lu committed
    • i386: Emulate MMX umulv1siv1di3 with SSE2 · 66248623
      Emulate MMX umulv1siv1di3 with SSE2.  Only SSE register source operand
      is allowed.
      
      	PR target/89021
      	* config/i386/mmx.md (sse2_umulv1siv1di3): Add SSE emulation
      	support.
      	(*sse2_umulv1siv1di3): Add SSE2 emulation.
      
      From-SVN: r271239
      H.J. Lu committed
    • i386: Emulate MMX movntq with SSE2 movntidi · 2ed7ae16
      Emulate MMX movntq with SSE2 movntidi.  Only register source operand is
      allowed.
      
      	PR target/89021
      	* config/i386/mmx.md (sse_movntq): Add SSE2 emulation.
      
      From-SVN: r271238
      H.J. Lu committed
    • i386: Emulate MMX mmx_psadbw with SSE · 018a45bd
      Emulate MMX mmx_psadbw with SSE.  Only SSE register source operand is
      allowed.
      
      	PR target/89021
      	* config/i386/mmx.md (mmx_psadbw): Add SSE emulation.
      
      From-SVN: r271237
      H.J. Lu committed
    • i386: Emulate MMX mmx_uavgv4hi3 with SSE · d9d6e621
      Emulate MMX mmx_uavgv4hi3 with SSE.  Only SSE register source operand is
      allowed.
      
      	PR target/89021
      	* config/i386/mmx.md (mmx_uavgv4hi3): Also check TARGET_MMX and
      	TARGET_MMX_WITH_SSE.
      	(*mmx_uavgv4hi3): Add SSE emulation.
      
      From-SVN: r271236
      H.J. Lu committed
    • i386: Emulate MMX mmx_uavgv8qi3 with SSE · a899fa35
      Emulate MMX mmx_uavgv8qi3 with SSE.  Only SSE register source operand is
      allowed.
      
      	PR target/89021
      	* config/i386/mmx.md (mmx_uavgv8qi3): Also check TARGET_MMX
      	and TARGET_MMX_WITH_SSE.
      	(*mmx_uavgv8qi3): Add SSE emulation.
      
      From-SVN: r271235
      H.J. Lu committed
    • i386: Emulate MMX maskmovq with SSE2 maskmovdqu · 55cd2379
      Emulate MMX maskmovq with SSE2 maskmovdqu for TARGET_MMX_WITH_SSE by
      zero-extending source and mask operands to 128 bits.  Handle unmapped
      bits 64:127 at memory address by adjusting source and mask operands
      together with memory address.
      
      	PR target/89021
      	* config/i386/xmmintrin.h: Emulate MMX maskmovq with SSE2
      	maskmovdqu for __MMX_WITH_SSE__.
      
      From-SVN: r271234
      H.J. Lu committed
    • i386: Emulate MMX mmx_umulv4hi3_highpart with SSE · 9377b54a
      Emulate MMX mmx_umulv4hi3_highpart with SSE.  Only SSE register source
      operand is allowed.
      
      	PR target/89021
      	* config/i386/mmx.md (mmx_umulv4hi3_highpart): Also check
      	TARGET_MMX and TARGET_MMX_WITH_SSE.
      	(*mmx_umulv4hi3_highpart): Add SSE emulation.
      
      From-SVN: r271233
      H.J. Lu committed
    • i386: Emulate MMX mmx_pmovmskb with SSE · 73371f6a
      Emulate MMX mmx_pmovmskb with SSE by zero-extending result of SSE pmovmskb
      from QImode to SImode.  Only SSE register source operand is allowed.
      
      	PR target/89021
      	* config/i386/mmx.md (mmx_pmovmskb): Changed to
      	define_insn_and_split to support SSE emulation.
      
      From-SVN: r271232
      H.J. Lu committed
    • i386: Emulate MMX V4HI smaxmin/V8QI umaxmin with SSE · 18184fdd
      Emulate MMX V4HI smaxmin/V8QI umaxmin with SSE.  Only SSE register source
      operand is allowed.
      
      	PR target/89021
      	* config/i386/mmx.md (mmx_<code>v4hi3): Also check TARGET_MMX
      	and TARGET_MMX_WITH_SSE.
      	(mmx_<code>v8qi3): Likewise.
      	(smaxmin:<code>v4hi3): New.
      	(umaxmin:<code>v8qi3): Likewise.
      	(smaxmin:*mmx_<code>v4hi3): Add SSE emulation.
      	(umaxmin:*mmx_<code>v8qi3): Likewise.
      
      From-SVN: r271231
      H.J. Lu committed
    • i386: Emulate MMX mmx_pinsrw with SSE · 42500d83
      Emulate MMX mmx_pinsrw with SSE.  Only SSE register destination operand
      is allowed.
      
      	PR target/89021
      	* config/i386/mmx.md (mmx_pinsrw): Also check TARGET_MMX and
      	TARGET_MMX_WITH_SSE.
      	(*mmx_pinsrw): Add SSE emulation.
      
      From-SVN: r271230
      H.J. Lu committed
    • i386: Emulate MMX mmx_pextrw with SSE · f2c2a6fb
      Emulate MMX mmx_pextrw with SSE.  Only SSE register source operand is
      allowed.
      
      	PR target/89021
      	* config/i386/mmx.md (mmx_pextrw): Add SSE emulation.
      
      From-SVN: r271229
      H.J. Lu committed
    • i386: Emulate MMX sse_cvtpi2ps with SSE · b7e97d9a
      Emulate MMX sse_cvtpi2ps with SSE2 cvtdq2ps, preserving upper 64 bits of
      destination XMM register.  Only SSE register source operand is allowed.
      
      	PR target/89021
      	* config/i386/sse.md (sse_cvtpi2ps): Changed to
      	define_insn_and_split.  Also allow TARGET_MMX_WITH_SSE.  Add
      	SSE emulation.
      
      From-SVN: r271228
      H.J. Lu committed
    • i386: Emulate MMX sse_cvtps2pi/sse_cvttps2pi with SSE · f3d6634b
      Emulate MMX sse_cvtps2pi/sse_cvttps2pi with SSE.
      
      	PR target/89021
      	* config/i386/sse.md (sse_cvtps2pi): Add SSE emulation.
      	(sse_cvttps2pi): Likewise.
      
      From-SVN: r271227
      H.J. Lu committed
    • i386: Emulate MMX pshufw with SSE · 3d34e8b0
      Emulate MMX pshufw with SSE.  Only SSE register source operand is allowed.
      
      	PR target/89021
      	* config/i386/mmx.md (mmx_pshufw): Also check TARGET_MMX and
      	TARGET_MMX_WITH_SSE.
      	(mmx_pshufw_1): Add SSE emulation.
      	(*vec_dupv4hi): Changed to define_insn_and_split and also allow
      	TARGET_MMX_WITH_SSE to support SSE emulation.
      
      From-SVN: r271226
      H.J. Lu committed
    • i386: Emulate MMX vec_dupv2si with SSE · 74e299b9
      Emulate MMX vec_dupv2si with SSE.  Add the "Yw" constraint to allow
      broadcast from integer register for AVX512BW with TARGET_AVX512VL.
      Only SSE register source operand is allowed.
      
      	PR target/89021
      	* config/i386/constraints.md (Yw): New constraint.
      	* config/i386/mmx.md (*vec_dupv2si): Changed to
      	define_insn_and_split and also allow TARGET_MMX_WITH_SSE to
      	support SSE emulation.
      
      From-SVN: r271225
      H.J. Lu committed
    • i386: Emulate MMX mmx_eq/mmx_gt<mode>3 with SSE · 2629da83
      Emulate MMX mmx_eq/mmx_gt<mode>3 with SSE.  Only SSE register source
      operand is allowed.
      
      	PR target/89021
      	* config/i386/mmx.md (mmx_eq<mode>3): Also allow
      	TARGET_MMX_WITH_SSE.
      	(*mmx_eq<mode>3): Also allow TARGET_MMX_WITH_SSE.  Add SSE
      	support.
      	(mmx_gt<mode>3): Likewise.
      
      From-SVN: r271224
      H.J. Lu committed
    • i386: Emulate MMX mmx_andnot<mode>3 with SSE · df0e1979
      Emulate MMX mmx_andnot<mode>3 with SSE.  Only SSE register source operand
      is allowed.
      
      	PR target/89021
      	* config/i386/mmx.md (mmx_andnot<mode>3): Also allow
      	TARGET_MMX_WITH_SSE.  Add SSE support.
      
      From-SVN: r271223
      H.J. Lu committed
    • i386: Emulate MMX <any_logic><mode>3 with SSE · fff6304f
      Emulate MMX <any_logic><mode>3 with SSE.  Only SSE register source
      operand is allowed.
      
      	PR target/89021
      	* config/i386/mmx.md (any_logic:mmx_<code><mode>3): Also allow
      	TARGET_MMX_WITH_SSE.
      	(any_logic:<code><mode>3): New.
      	(any_logic:*mmx_<code><mode>3): Also allow TARGET_MMX_WITH_SSE.
      	Add SSE support.
      
      From-SVN: r271222
      H.J. Lu committed
    • i386: Emulate MMX ashr<mode>3/<shift_insn><mode>3 with SSE · 5d48867b
      Emulate MMX ashr<mode>3/<shift_insn><mode>3 with SSE.  Only SSE register
      source operand is allowed.
      
      	PR target/89021
      	* config/i386/mmx.md (mmx_ashr<mode>3): Also allow
      	TARGET_MMX_WITH_SSE.  Add SSE emulation.
      	(mmx_<shift_insn><mode>3): Likewise.
      	(ashr<mode>3): New.
      	(<shift_insn><mode>3): Likewise.
      
      From-SVN: r271221
      H.J. Lu committed
    • i386: Emulate MMX mmx_pmaddwd with SSE · d0e9bf2a
      Emulate MMX pmaddwd with SSE.  Only SSE register source operand is
      allowed.
      
      	PR target/89021
      	* config/i386/mmx.md (mmx_pmaddwd): Also allow TARGET_MMX_WITH_SSE.
      	(*mmx_pmaddwd): Also allow TARGET_MMX_WITH_SSE.  Add SSE support.
      
      From-SVN: r271220
      H.J. Lu committed
    • i386: Emulate MMX smulv4hi3_highpart with SSE · 3fdce4b1
      Emulate MMX mulv4hi3 with SSE.  Only SSE register source operand is
      allowed.
      
      	PR target/89021
      	* config/i386/mmx.md (mmx_smulv4hi3_highpart): Also allow
      	TARGET_MMX_WITH_SSE.
      	(*mmx_smulv4hi3_highpart): Also allow TARGET_MMX_WITH_SSE. Add
      	SSE support.
      
      From-SVN: r271219
      H.J. Lu committed
    • i386: Emulate MMX mulv4hi3 with SSE · 08266db9
      Emulate MMX mulv4hi3 with SSE.  Only SSE register source operand is
      allowed.
      
      	PR target/89021
      	* config/i386/mmx.md (mmx_mulv4hi3): Also allow
      	TARGET_MMX_WITH_SSE.
      	(mulv4hi3): New.
      	(*mmx_mulv4hi3): Also allow TARGET_MMX_WITH_SSE.  Add SSE
      	support.
      
      From-SVN: r271218
      H.J. Lu committed
    • i386: Emulate MMX plusminus/sat_plusminus with SSE · 1f0dc22a
      Emulate MMX plusminus/sat_plusminus with SSE.  Only SSE register source
      operand is allowed.
      
      	PR target/89021
      	* config/i386/mmx.md (MMXMODEI8): Require TARGET_SSE2 for V1DI.
      	(plusminus:mmx_<plusminus_insn><mode>3): Check
      	TARGET_MMX_WITH_SSE.
      	(sat_plusminus:mmx_<plusminus_insn><mode>3): Likewise.
      	(<plusminus_insn><mode>3): New.
      	(*mmx_<plusminus_insn><mode>3): Add SSE emulation.
      	(*mmx_<plusminus_insn><mode>3): Likewise.
      
      From-SVN: r271217
      H.J. Lu committed
    • i386: Emulate MMX punpcklXX/punpckhXX with SSE punpcklXX · 6e9fffcf
      Emulate MMX punpcklXX/punpckhXX with SSE punpcklXX.  For MMX punpckhXX,
      move bits 64:127 to bits 0:63 in SSE register.  Only SSE register source
      operand is allowed.
      
      	PR target/89021
      	* config/i386/i386-expand.c (ix86_split_mmx_punpck): New function.
      	* config/i386/i386-protos.h (ix86_split_mmx_punpck): New
      	prototype.
      	* config/i386/mmx.m (mmx_punpckhbw): Changed to
      	define_insn_and_split to support SSE emulation.
      	(mmx_punpcklbw): Likewise.
      	(mmx_punpckhwd): Likewise.
      	(mmx_punpcklwd): Likewise.
      	(mmx_punpckhdq): Likewise.
      	(mmx_punpckldq): Likewise.
      
      From-SVN: r271216
      H.J. Lu committed
    • i386: Emulate MMX packsswb/packssdw/packuswb with SSE2 · b74ebb2a
      Emulate MMX packsswb/packssdw/packuswb with SSE packsswb/packssdw/packuswb
      plus moving bits 64:95 to bits 32:63 in SSE register.  Only SSE register
      source operand is allowed.
      
      	PR target/89021
      	* config/i386/i386-expand.c (ix86_move_vector_high_sse_to_mmx):
      	New function.
      	(ix86_split_mmx_pack): Likewise.
      	* config/i386/i386-protos.h (ix86_move_vector_high_sse_to_mmx):
      	New prototype.
      	(ix86_split_mmx_pack): Likewise.
      	* config/i386/i386.md (mmx_isa): New.
      	(enabled): Also check mmx_isa.
      	* config/i386/mmx.md (any_s_truncate): New code iterator.
      	(s_trunsuffix): New code attr.
      	(mmx_packsswb): Removed.
      	(mmx_packssdw): Likewise.
      	(mmx_packuswb): Likewise.
      	(mmx_pack<s_trunsuffix>swb): New define_insn_and_split to emulate
      	MMX packsswb/packuswb with SSE2.
      	(mmx_packssdw): Likewise.
      	* config/i386/predicates.md (register_mmxmem_operand): New.
      
      Co-Authored-By: Uros Bizjak <ubizjak@gmail.com>
      
      From-SVN: r271215
      H.J. Lu committed
    • i386: Allow MMX register modes in SSE registers · dfa61b9e
      In 64-bit mode, SSE2 can be used to emulate MMX instructions without
      3DNOW.  We can use SSE2 to support MMX register modes.
      
      	PR target/89021
      	* config/i386/i386-c.c (ix86_target_macros_internal): Define
      	__MMX_WITH_SSE__ for TARGET_MMX_WITH_SSE.
      	* config/i386/i386.c (ix86_set_reg_reg_cost): Add support for
      	TARGET_MMX_WITH_SSE with VALID_MMX_REG_MODE.
      	(ix86_vector_mode_supported_p): Likewise.
      	* config/i386/i386.h (TARGET_MMX_WITH_SSE): New.
      
      From-SVN: r271213
      H.J. Lu committed
    • lto-plugin, removed unused variable · 2e97dfdd
      2019-05-15  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* lto-plugin.c (cleanup_handler): Remove unused var.
      
      From-SVN: r271212
      Iain Sandoe committed
    • call.c (perform_overload_resolution, [...]): Use OVL_P; remove redundant TEMPLATE_DECL checks. · d509bb8c
      2019-05-15  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	* call.c (perform_overload_resolution, build_new_method_call_1):
      	Use OVL_P; remove redundant TEMPLATE_DECL checks.
      	* decl.c (grokfndecl): Likewise.
      	* mangle.c (write_expression): Likewise.
      	* parser.c (cp_parser_template_id): Likewise.
      	* pt.c (resolve_overloaded_unification, type_dependent_expression_p):
      	Likewise.
      	* search.c (build_baselink): Likewise.
      	* tree.c (is_overloaded_fn, dependent_name, maybe_get_fns): Likewise.
      
      From-SVN: r271211
      Paolo Carlini committed
    • Check for overflow in tree-switch-conversion (PR middle-end/90478). · 86e3947e
      2019-05-15  Martin Liska  <mliska@suse.cz>
      
      	PR middle-end/90478
      	* tree-switch-conversion.c (jump_table_cluster::can_be_handled):
      	Check for overflow.
      2019-05-15  Martin Liska  <mliska@suse.cz>
      
      	PR middle-end/90478
      	* gcc.dg/tree-ssa/pr90478-2.c: New test.
      	* gcc.dg/tree-ssa/pr90478.c: New test.
      
      From-SVN: r271210
      Martin Liska committed
    • tree-into-ssa.c (pass_build_ssa::execute): Run update_address_taken before going into SSA. · 2092f134
      2019-05-15  Richard Biener  <rguenther@suse.de>
      
      	* tree-into-ssa.c (pass_build_ssa::execute): Run
      	update_address_taken before going into SSA.
      
      From-SVN: r271209
      Richard Biener committed
    • gimple-parser.c (c_parser_gimple_postfix_expression): Handle __BIT_FIELD_REF. · 186dabf2
      2019-05-15  Richard Biener  <rguenther@suse.de>
      
      	c/
      	* gimple-parser.c (c_parser_gimple_postfix_expression): Handle
      	__BIT_FIELD_REF.
      
      	* tree-pretty-print.c (dump_generic_node): Dump BIT_FIELD_REF
      	as __BIT_FIELD_REF with type with -gimple.
      
      	* gcc.dg/gimplefe-40.c: Amend.
      
      From-SVN: r271208
      Richard Biener committed
    • tree-ssa-uninit: clean up is_value_included_in · fb4b60c6
      2019-05-15  Vladislav Ivanishin  <vlad@ispras.ru>
      
      	* tree-ssa-uninit.c (is_value_included_in): Remove is_unsigned and merge
      	semantically equivalent branches (left over after prior refactorings).
      
      From-SVN: r271207
      Vladislav Ivanishin committed
    • re PR tree-optimization/90474 (ICE: verify_gimple failed (error:… · 6b943512
      re PR tree-optimization/90474 (ICE: verify_gimple failed (error: DECL_GIMPLE_REG_P set on a variable with address taken; error: invalid address operand in MEM_REF))
      
      2019-05-15  Richard Biener  <rguenther@suse.de>
      
      	PR c/90474
      	* c-common.c (c_common_mark_addressable_vec): Also mark
      	a COMPOUND_LITERAL_EXPR_DECL addressable similar to
      	c_mark_addressable.
      
      From-SVN: r271206
      Richard Biener committed