From 285464d088412710a1dd83b7303775be88f7788e Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Tue, 11 Jun 2002 21:58:12 +0200 Subject: [PATCH] i386.c (x86_promote_QImode): Set for Athlon * i386.c (x86_promote_QImode): Set for Athlon (x86_fast_prefix): New global variable. (x86_arch_always_fancy_math_387): Fix formating. * i386.h (x86_fast_prefix): Declare (TARGET_FAST_PREFIX): define. * i386.md (and to strict_low_part, HI to SI promoting splitter): Use new macro. * i386.h (RTX_COSTS): float_extend is not for free for SSE. From-SVN: r54521 --- gcc/ChangeLog | 12 ++++++++++++ gcc/config/i386/i386.c | 5 +++-- gcc/config/i386/i386.h | 8 ++++++-- gcc/config/i386/i386.md | 5 +++-- gcc/gcse.c | 5 +++++ 5 files changed, 29 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e5c647985e3..8c89cdc473c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +Tue Jun 11 21:53:37 CEST 2002 Jan Hubicka + + * i386.c (x86_promote_QImode): Set for Athlon + (x86_fast_prefix): New global variable. + (x86_arch_always_fancy_math_387): Fix formating. + * i386.h (x86_fast_prefix): Declare + (TARGET_FAST_PREFIX): define. + * i386.md (and to strict_low_part, HI to SI + promoting splitter): Use new macro. + + * i386.h (RTX_COSTS): float_extend is not for free for SSE. + 2002-06-11 Zack Weinberg * Makefile.in (distclean): Delete junk left in testsuite diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 9ece4eb2402..93e1a65a6fe 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -376,7 +376,8 @@ const int x86_use_cltd = ~(m_PENT | m_K6); const int x86_read_modify_write = ~m_PENT; const int x86_read_modify = ~(m_PENT | m_PPRO); const int x86_split_long_moves = m_PPRO; -const int x86_promote_QImode = m_K6 | m_PENT | m_386 | m_486; +const int x86_promote_QImode = m_K6 | m_PENT | m_386 | m_486 | m_ATHLON; +const int x86_fast_prefix = ~(m_PENT | m_486 | m_386); const int x86_single_stringop = m_386 | m_PENT4; const int x86_qimode_math = ~(0); const int x86_promote_qi_regs = 0; @@ -393,7 +394,7 @@ const int x86_accumulate_outgoing_args = m_ATHLON | m_PENT4 | m_PPRO; const int x86_prologue_using_move = m_ATHLON | m_PENT4 | m_PPRO; const int x86_epilogue_using_move = m_ATHLON | m_PENT4 | m_PPRO; const int x86_decompose_lea = m_PENT4; -const int x86_arch_always_fancy_math_387 = m_PENT|m_PPRO|m_ATHLON|m_PENT4; +const int x86_arch_always_fancy_math_387 = m_PENT | m_PPRO | m_ATHLON | m_PENT4; /* In case the avreage insn count for single function invocation is lower than this constant, emit fast (but longer) prologue and diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 958ef58aa04..11b663c1645 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -201,7 +201,7 @@ extern const int x86_double_with_add, x86_partial_reg_stall, x86_movx; extern const int x86_use_loop, x86_use_fiop, x86_use_mov0; extern const int x86_use_cltd, x86_read_modify_write; extern const int x86_read_modify, x86_split_long_moves; -extern const int x86_promote_QImode, x86_single_stringop; +extern const int x86_promote_QImode, x86_single_stringop, x86_fast_prefix; extern const int x86_himode_math, x86_qimode_math, x86_promote_qi_regs; extern const int x86_promote_hi_regs, x86_integer_DFmode_moves; extern const int x86_add_esp_4, x86_add_esp_8, x86_sub_esp_4, x86_sub_esp_8; @@ -233,6 +233,7 @@ extern int x86_prefetch_sse; #define TARGET_READ_MODIFY_WRITE (x86_read_modify_write & CPUMASK) #define TARGET_READ_MODIFY (x86_read_modify & CPUMASK) #define TARGET_PROMOTE_QImode (x86_promote_QImode & CPUMASK) +#define TARGET_FAST_PREFIX (x86_fast_prefix & CPUMASK) #define TARGET_SINGLE_STRINGOP (x86_single_stringop & CPUMASK) #define TARGET_QIMODE_MATH (x86_qimode_math & CPUMASK) #define TARGET_HIMODE_MATH (x86_himode_math & CPUMASK) @@ -2698,7 +2699,10 @@ do { \ TOPLEVEL_COSTS_N_INSNS (ix86_cost->add); \ \ case FLOAT_EXTEND: \ - TOPLEVEL_COSTS_N_INSNS (0); \ + if (!TARGET_SSE_MATH \ + || !VALID_SSE_REG_MODE (GET_MODE (X))) \ + TOPLEVEL_COSTS_N_INSNS (0); \ + break; \ \ egress_rtx_costs: \ break; diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 10c31295fd3..fd2cb47f601 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -7881,7 +7881,7 @@ (and (match_dup 0) (const_int -65536))) (clobber (reg:CC 17))] - "optimize_size" + "optimize_size || (TARGET_FAST_PREFIX && !TARGET_PARTIAL_REG_STALL)" [(set (strict_low_part (match_dup 1)) (const_int 0))] "operands[1] = gen_lowpart (HImode, operands[0]);") @@ -16334,7 +16334,8 @@ (clobber (reg:CC 17))] "! TARGET_PARTIAL_REG_STALL && reload_completed && ((GET_MODE (operands[0]) == HImode - && (!optimize_size || GET_CODE (operands[2]) != CONST_INT + && ((!optimize_size && !TARGET_FAST_PREFIX) + || GET_CODE (operands[2]) != CONST_INT || CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'K'))) || (GET_MODE (operands[0]) == QImode && (TARGET_PROMOTE_QImode || optimize_size)))" diff --git a/gcc/gcse.c b/gcc/gcse.c index 28b7264751a..d390db3f528 100644 --- a/gcc/gcse.c +++ b/gcc/gcse.c @@ -5153,6 +5153,11 @@ gcse_emit_move_after (src, dest, insn) new = emit_insn_after (gen_rtx_SET (VOIDmode, dest, src), insn); + /* want_to_gcse_p verifies that this move will be valid. Still this call + is mandatory as it may create clobbers required by the pattern. */ + if (insn_invalid_p (insn)) + abort (); + /* Note the equivalence for local CSE pass. */ if ((note = find_reg_equal_equiv_note (insn))) eqv = XEXP (note, 0); -- 2.11.4.GIT