From: Jakub Jelinek Date: Sun, 20 Oct 2019 20:44:26 +0000 (+0200) Subject: i386-protos.h (ix86_pre_reload_split): Declare. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=51085ca56935bae64d32a7783b250c7f970fa9b1;p=gcc.git i386-protos.h (ix86_pre_reload_split): Declare. * config/i386/i386-protos.h (ix86_pre_reload_split): Declare. * config/i386/i386.c (ix86_pre_reload_split): New function. * config/i386/i386.md (*fix_trunc_i387_1, *add3_eq, *add3_ne, *add3_eq_0, *add3_ne_0, *add3_eq, *add3_ne, *add3_eq_1, *add3_eq_0, *add3_ne_0, *anddi3_doubleword, *andndi3_doubleword, *di3_doubleword, *one_cmpldi2_doubleword, *ashl3_doubleword_mask, *ashl3_doubleword_mask_1, *ashl3_mask, *ashl3_mask_1, *3_mask, *3_mask_1, *3_doubleword_mask, *3_doubleword_mask_1, *3_mask, *3_mask_1, *_mask, *_mask_1, *btr_mask, *btr_mask_1, *jcc_bt, *jcc_bt_1, *jcc_bt_mask, *popcounthi2_1, frndintxf2_, *fist2__1, *3_1, *di3_doubleword): Use ix86_pre_reload_split instead of can_create_pseudo_p in condition. * config/i386/sse.md (*sse4_1_v8qiv8hi2_2, *avx2_v8qiv8si2_2, *sse4_1_v4qiv4si2_2, *sse4_1_v4hiv4si2_2, *avx512f_v8qiv8di2_2, *avx2_v4qiv4di2_2, *avx2_v4hiv4di2_2, *sse4_1_v2hiv2di2_2, *sse4_1_v2siv2di2_2, sse4_2_pcmpestr, sse4_2_pcmpistr): Likewise. From-SVN: r277216 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 019b216d9d0..6b9a57bb632 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,31 @@ +2019-10-20 Jakub Jelinek + + * config/i386/i386-protos.h (ix86_pre_reload_split): Declare. + * config/i386/i386.c (ix86_pre_reload_split): New function. + * config/i386/i386.md (*fix_trunc_i387_1, *add3_eq, + *add3_ne, *add3_eq_0, *add3_ne_0, *add3_eq, + *add3_ne, *add3_eq_1, *add3_eq_0, *add3_ne_0, + *anddi3_doubleword, *andndi3_doubleword, *di3_doubleword, + *one_cmpldi2_doubleword, *ashl3_doubleword_mask, + *ashl3_doubleword_mask_1, *ashl3_mask, *ashl3_mask_1, + *3_mask, *3_mask_1, + *3_doubleword_mask, + *3_doubleword_mask_1, *3_mask, + *3_mask_1, *_mask, *_mask_1, + *btr_mask, *btr_mask_1, *jcc_bt, *jcc_bt_1, + *jcc_bt_mask, *popcounthi2_1, frndintxf2_, + *fist2__1, *3_1, *di3_doubleword): + Use ix86_pre_reload_split instead of can_create_pseudo_p in condition. + * config/i386/sse.md (*sse4_1_v8qiv8hi2_2, + *avx2_v8qiv8si2_2, + *sse4_1_v4qiv4si2_2, + *sse4_1_v4hiv4si2_2, + *avx512f_v8qiv8di2_2, + *avx2_v4qiv4di2_2, *avx2_v4hiv4di2_2, + *sse4_1_v2hiv2di2_2, + *sse4_1_v2siv2di2_2, sse4_2_pcmpestr, + sse4_2_pcmpistr): Likewise. + 2019-10-20 Gerald Pfeifer * doc/install.texi (Configuration, --enable-objc-gc): hboehm.info diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h index c07dfe50855..ced1780be23 100644 --- a/gcc/config/i386/i386-protos.h +++ b/gcc/config/i386/i386-protos.h @@ -55,6 +55,7 @@ extern rtx standard_80387_constant_rtx (int); extern int standard_sse_constant_p (rtx, machine_mode); extern const char *standard_sse_constant_opcode (rtx_insn *, rtx *); extern bool ix86_standard_x87sse_constant_load_p (const rtx_insn *, rtx); +extern bool ix86_pre_reload_split (void); extern bool symbolic_reference_mentioned_p (rtx); extern bool extended_reg_mentioned_p (rtx); extern bool x86_extended_QIreg_mentioned_p (rtx_insn *); diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 1a272d99451..5354cdba9dc 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -4894,6 +4894,18 @@ ix86_standard_x87sse_constant_load_p (const rtx_insn *insn, rtx dst) return true; } +/* Predicate for pre-reload splitters with associated instructions, + which can match any time before the split1 pass (usually combine), + then are unconditionally split in that pass and should not be + matched again afterwards. */ + +bool +ix86_pre_reload_split (void) +{ + return (can_create_pseudo_p () + && !(cfun->curr_properties & PROP_rtl_split_insns)); +} + /* Returns true if OP contains a symbol reference */ bool diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index a1b849eaa9e..5e0795953d8 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -4920,7 +4920,7 @@ && !TARGET_FISTTP && !(SSE_FLOAT_MODE_P (GET_MODE (operands[1])) && (TARGET_64BIT || mode != DImode)) - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(const_int 0)] @@ -6857,7 +6857,7 @@ (match_operand:SWI 2 ""))) (clobber (reg:CC FLAGS_REG))] "ix86_binary_operator_ok (PLUS, mode, operands) - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(set (reg:CC FLAGS_REG) @@ -6881,7 +6881,7 @@ && (mode != DImode || INTVAL (operands[2]) != HOST_WIDE_INT_C (-0x80000000)) && ix86_binary_operator_ok (PLUS, mode, operands) - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(set (reg:CC FLAGS_REG) @@ -6904,7 +6904,7 @@ (match_operand:SWI 1 ""))) (clobber (reg:CC FLAGS_REG))] "ix86_unary_operator_ok (PLUS, mode, operands) - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(set (reg:CC FLAGS_REG) @@ -6925,7 +6925,7 @@ (match_operand:SWI 1 ""))) (clobber (reg:CC FLAGS_REG))] "ix86_unary_operator_ok (PLUS, mode, operands) - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(set (reg:CC FLAGS_REG) @@ -6951,7 +6951,7 @@ (match_operand:SWI 2 ""))) (clobber (reg:CC FLAGS_REG))] "ix86_binary_operator_ok (MINUS, mode, operands) - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(set (reg:CC FLAGS_REG) @@ -6976,7 +6976,7 @@ && (mode != DImode || INTVAL (operands[2]) != HOST_WIDE_INT_C (-0x80000000)) && ix86_binary_operator_ok (MINUS, mode, operands) - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(set (reg:CC FLAGS_REG) @@ -7005,7 +7005,7 @@ && (mode != DImode || INTVAL (operands[2]) != HOST_WIDE_INT_C (-0x80000000)) && ix86_binary_operator_ok (MINUS, mode, operands) - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(set (reg:CC FLAGS_REG) @@ -7028,7 +7028,7 @@ (eq:SWI (match_operand 2 "int_nonimmediate_operand") (const_int 0)))) (clobber (reg:CC FLAGS_REG))] "ix86_unary_operator_ok (MINUS, mode, operands) - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(set (reg:CC FLAGS_REG) @@ -7049,7 +7049,7 @@ (ne:SWI (match_operand 2 "int_nonimmediate_operand") (const_int 0)))) (clobber (reg:CC FLAGS_REG))] "ix86_unary_operator_ok (MINUS, mode, operands) - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(set (reg:CC FLAGS_REG) @@ -8621,7 +8621,7 @@ (clobber (reg:CC FLAGS_REG))] "!TARGET_64BIT && TARGET_STV && TARGET_SSE2 && ix86_binary_operator_ok (AND, DImode, operands) - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(const_int 0)] @@ -9076,7 +9076,7 @@ (match_operand:DI 2 "nonimmediate_operand"))) (clobber (reg:CC FLAGS_REG))] "!TARGET_64BIT && TARGET_STV && TARGET_SSE2 - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#") (define_split @@ -9176,7 +9176,7 @@ (clobber (reg:CC FLAGS_REG))] "!TARGET_64BIT && TARGET_STV && TARGET_SSE2 && ix86_binary_operator_ok (, DImode, operands) - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(const_int 0)] @@ -9898,7 +9898,7 @@ (not:DI (match_operand:DI 1 "nonimmediate_operand")))] "!TARGET_64BIT && TARGET_STV && TARGET_SSE2 && ix86_unary_operator_ok (NOT, DImode, operands) - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(set (match_dup 0) @@ -10032,7 +10032,7 @@ (match_operand:SI 3 "const_int_operand")) 0))) (clobber (reg:CC FLAGS_REG))] "(INTVAL (operands[3]) & ( * BITS_PER_UNIT)) == 0 - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(parallel @@ -10073,7 +10073,7 @@ (match_operand:QI 3 "const_int_operand")))) (clobber (reg:CC FLAGS_REG))] "(INTVAL (operands[3]) & ( * BITS_PER_UNIT)) == 0 - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(parallel @@ -10228,7 +10228,7 @@ "ix86_binary_operator_ok (ASHIFT, mode, operands) && (INTVAL (operands[3]) & (GET_MODE_BITSIZE (mode)-1)) == GET_MODE_BITSIZE (mode)-1 - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(parallel @@ -10250,7 +10250,7 @@ "ix86_binary_operator_ok (ASHIFT, mode, operands) && (INTVAL (operands[3]) & (GET_MODE_BITSIZE (mode)-1)) == GET_MODE_BITSIZE (mode)-1 - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(parallel @@ -10748,7 +10748,7 @@ "ix86_binary_operator_ok (, mode, operands) && (INTVAL (operands[3]) & (GET_MODE_BITSIZE (mode)-1)) == GET_MODE_BITSIZE (mode)-1 - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(parallel @@ -10770,7 +10770,7 @@ "ix86_binary_operator_ok (, mode, operands) && (INTVAL (operands[3]) & (GET_MODE_BITSIZE (mode)-1)) == GET_MODE_BITSIZE (mode)-1 - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(parallel @@ -10791,7 +10791,7 @@ (match_operand:SI 3 "const_int_operand")) 0))) (clobber (reg:CC FLAGS_REG))] "(INTVAL (operands[3]) & ( * BITS_PER_UNIT)) == 0 - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(parallel @@ -10832,7 +10832,7 @@ (match_operand:QI 3 "const_int_operand")))) (clobber (reg:CC FLAGS_REG))] "(INTVAL (operands[3]) & ( * BITS_PER_UNIT)) == 0 - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(parallel @@ -11298,7 +11298,7 @@ "ix86_binary_operator_ok (, mode, operands) && (INTVAL (operands[3]) & (GET_MODE_BITSIZE (mode)-1)) == GET_MODE_BITSIZE (mode)-1 - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(parallel @@ -11319,7 +11319,7 @@ "ix86_binary_operator_ok (, mode, operands) && (INTVAL (operands[3]) & (GET_MODE_BITSIZE (mode)-1)) == GET_MODE_BITSIZE (mode)-1 - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(parallel @@ -11622,7 +11622,7 @@ "TARGET_USE_BT && (INTVAL (operands[2]) & (GET_MODE_BITSIZE (mode)-1)) == GET_MODE_BITSIZE (mode)-1 - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(parallel @@ -11647,7 +11647,7 @@ "TARGET_USE_BT && (INTVAL (operands[2]) & (GET_MODE_BITSIZE (mode)-1)) == GET_MODE_BITSIZE (mode)-1 - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(parallel @@ -11687,7 +11687,7 @@ "TARGET_USE_BT && (INTVAL (operands[2]) & (GET_MODE_BITSIZE (mode)-1)) == GET_MODE_BITSIZE (mode)-1 - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(parallel @@ -11712,7 +11712,7 @@ "TARGET_USE_BT && (INTVAL (operands[2]) & (GET_MODE_BITSIZE (mode)-1)) == GET_MODE_BITSIZE (mode)-1 - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(parallel @@ -11897,7 +11897,7 @@ && INTVAL (operands[2]) >= (optimize_function_for_size_p (cfun) ? 8 : 32)) : !memory_operand (operands[1], mode)) - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(set (reg:CCC FLAGS_REG) @@ -11929,7 +11929,7 @@ (pc))) (clobber (reg:CC FLAGS_REG))] "(TARGET_USE_BT || optimize_function_for_size_p (cfun)) - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(set (reg:CCC FLAGS_REG) @@ -11965,7 +11965,7 @@ "(TARGET_USE_BT || optimize_function_for_size_p (cfun)) && (INTVAL (operands[3]) & (GET_MODE_BITSIZE (mode)-1)) == GET_MODE_BITSIZE (mode)-1 - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(set (reg:CCC FLAGS_REG) @@ -14058,7 +14058,7 @@ (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand")))) (clobber (reg:CC FLAGS_REG))] "TARGET_POPCNT - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(const_int 0)] @@ -16479,7 +16479,7 @@ (clobber (reg:CC FLAGS_REG))] "TARGET_USE_FANCY_MATH_387 && (flag_fp_int_builtin_inexact || !flag_trapping_math) - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(const_int 0)] @@ -16582,7 +16582,7 @@ (clobber (reg:CC FLAGS_REG))] "TARGET_USE_FANCY_MATH_387 && flag_unsafe_math_optimizations - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(const_int 0)] @@ -17973,7 +17973,7 @@ (match_operand:MAXMIN_IMODE 2 "nonimmediate_operand"))) (clobber (reg:CC FLAGS_REG))] "(TARGET_64BIT || mode != DImode) && TARGET_STV - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(set (match_dup 0) @@ -18002,7 +18002,7 @@ (match_operand:DI 2 "nonimmediate_operand"))) (clobber (reg:CC FLAGS_REG))] "!TARGET_64BIT && TARGET_STV && TARGET_AVX512VL - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(set (match_dup 0) diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index f474eed1c4e..403e91d4b17 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -17363,7 +17363,7 @@ (const_int 4) (const_int 5) (const_int 6) (const_int 7)]))))] "TARGET_SSE4_1 && && - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(set (match_dup 0) @@ -17420,7 +17420,7 @@ (const_int 4) (const_int 5) (const_int 6) (const_int 7)]))))] "TARGET_AVX2 && - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(set (match_dup 0) @@ -17469,7 +17469,7 @@ (parallel [(const_int 0) (const_int 1) (const_int 2) (const_int 3)]))))] "TARGET_SSE4_1 && - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(set (match_dup 0) @@ -17535,7 +17535,7 @@ (parallel [(const_int 0) (const_int 1) (const_int 2) (const_int 3)]))))] "TARGET_SSE4_1 && - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(set (match_dup 0) @@ -17579,7 +17579,7 @@ (const_int 2) (const_int 3) (const_int 4) (const_int 5) (const_int 6) (const_int 7)]))))] - "TARGET_AVX512F && can_create_pseudo_p ()" + "TARGET_AVX512F && ix86_pre_reload_split ()" "#" "&& 1" [(set (match_dup 0) @@ -17626,7 +17626,7 @@ (parallel [(const_int 0) (const_int 1) (const_int 2) (const_int 3)]))))] "TARGET_AVX2 && - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(set (match_dup 0) @@ -17693,7 +17693,7 @@ (parallel [(const_int 0) (const_int 1) (const_int 2) (const_int 3)]))))] "TARGET_AVX2 && - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(set (match_dup 0) @@ -17740,7 +17740,7 @@ (const_int 1)) 0) (parallel [(const_int 0) (const_int 1)]))))] "TARGET_SSE4_1 && - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(set (match_dup 0) @@ -17804,7 +17804,7 @@ (const_int 0)) 0) (parallel [(const_int 0) (const_int 1)]))))] "TARGET_SSE4_1 && - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(set (match_dup 0) @@ -18087,7 +18087,7 @@ (match_dup 6)] UNSPEC_PCMPESTR))] "TARGET_SSE4_2 - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(const_int 0)] @@ -18223,7 +18223,7 @@ (match_dup 4)] UNSPEC_PCMPISTR))] "TARGET_SSE4_2 - && can_create_pseudo_p ()" + && ix86_pre_reload_split ()" "#" "&& 1" [(const_int 0)]