diff options
-rw-r--r-- | gcc/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/Makefile.in | 2 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 15 | ||||
-rw-r--r-- | gcc/config/i386/i386.md | 32 | ||||
-rw-r--r-- | gcc/cse.c | 3 |
5 files changed, 43 insertions, 20 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 118b147fc76..515a57d8eac 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +Sat Jan 25 15:55:08 CET 2003 Jan Hubicka <jh@suse.cz> + + * i386.c (ix86_expand_movstr, ix86_expand_clrstr): Consistently + do libcall for large blocks. + * i386.md (comi patterns): Set type to ssecomi. + (sse2_unpck?pd): Fix mode of vec_select. + + * cse.c: Include except.h + (cse_set_around_loop): Do not create new basic blocks. + * Makefile.in (cse.o): Add dependnecy on except.h + Sat Jan 25 12:05:17 CET 2003 Jan Hubicka <jh@suse.cz> * builtins.c (fold_trunc_transparent_mathfn): New function. diff --git a/gcc/Makefile.in b/gcc/Makefile.in index f89929c50f2..ecb1b33b5b8 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -1530,7 +1530,7 @@ cselib.o : cselib.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_ output.h function.h cselib.h $(GGC_H) $(TM_P_H) gt-cselib.h cse.o : cse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \ hard-reg-set.h flags.h real.h insn-config.h $(RECOG_H) $(EXPR_H) toplev.h output.h \ - function.h $(BASIC_BLOCK_H) $(GGC_H) $(TM_P_H) $(TIMEVAR_H) + function.h $(BASIC_BLOCK_H) $(GGC_H) $(TM_P_H) $(TIMEVAR_H) except.h gcse.o : gcse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \ hard-reg-set.h flags.h real.h insn-config.h ggc.h $(RECOG_H) $(EXPR_H) \ $(BASIC_BLOCK_H) function.h output.h toplev.h $(TM_P_H) $(PARAMS_H) except.h gt-gcse.h diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index eaaf4abef8c..fe76c91562b 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -10639,7 +10639,6 @@ ix86_expand_movstr (dst, src, count_exp, align_exp) unsigned HOST_WIDE_INT count = 0; rtx insns; - start_sequence (); if (GET_CODE (align_exp) == CONST_INT) align = INTVAL (align_exp); @@ -10649,7 +10648,11 @@ ix86_expand_movstr (dst, src, count_exp, align_exp) align = 64; if (GET_CODE (count_exp) == CONST_INT) - count = INTVAL (count_exp); + { + count = INTVAL (count_exp); + if (!TARGET_INLINE_ALL_STRINGOPS && count > 64) + return 0; + } /* Figure out proper mode for counter. For 32bits it is always SImode, for 64bits use SImode when possible, otherwise DImode. @@ -10660,6 +10663,8 @@ ix86_expand_movstr (dst, src, count_exp, align_exp) else counter_mode = DImode; + start_sequence (); + if (counter_mode != SImode && counter_mode != DImode) abort (); @@ -10877,7 +10882,11 @@ ix86_expand_clrstr (src, count_exp, align_exp) align = 32; if (GET_CODE (count_exp) == CONST_INT) - count = INTVAL (count_exp); + { + count = INTVAL (count_exp); + if (!TARGET_INLINE_ALL_STRINGOPS && count > 64) + return 0; + } /* Figure out proper mode for counter. For 32bits it is always SImode, for 64bits use SImode when possible, otherwise DImode. Set count to number of bytes copied when known at compile time. */ diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 688cf6b75fe..02874dc60fc 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -999,7 +999,7 @@ && SSE_FLOAT_MODE_P (GET_MODE (operands[0])) && GET_MODE (operands[0]) == GET_MODE (operands[0])" "* return output_fp_compare (insn, operands, 1, 0);" - [(set_attr "type" "fcmp,ssecmp") + [(set_attr "type" "fcmp,ssecomi") (set (attr "mode") (if_then_else (match_operand:SF 1 "" "") (const_string "SF") @@ -1013,7 +1013,7 @@ "SSE_FLOAT_MODE_P (GET_MODE (operands[0])) && GET_MODE (operands[0]) == GET_MODE (operands[0])" "* return output_fp_compare (insn, operands, 1, 0);" - [(set_attr "type" "ssecmp") + [(set_attr "type" "ssecomi") (set (attr "mode") (if_then_else (match_operand:SF 1 "" "") (const_string "SF") @@ -1047,7 +1047,7 @@ && SSE_FLOAT_MODE_P (GET_MODE (operands[0])) && GET_MODE (operands[0]) == GET_MODE (operands[1])" "* return output_fp_compare (insn, operands, 1, 1);" - [(set_attr "type" "fcmp,ssecmp") + [(set_attr "type" "fcmp,ssecomi") (set (attr "mode") (if_then_else (match_operand:SF 1 "" "") (const_string "SF") @@ -1061,7 +1061,7 @@ "SSE_FLOAT_MODE_P (GET_MODE (operands[0])) && GET_MODE (operands[0]) == GET_MODE (operands[1])" "* return output_fp_compare (insn, operands, 1, 1);" - [(set_attr "type" "ssecmp") + [(set_attr "type" "ssecomi") (set (attr "mode") (if_then_else (match_operand:SF 1 "" "") (const_string "SF") @@ -19769,7 +19769,7 @@ (parallel [(const_int 0)]))))] "TARGET_SSE" "comiss\t{%1, %0|%0, %1}" - [(set_attr "type" "ssecmp") + [(set_attr "type" "ssecomi") (set_attr "mode" "SF")]) (define_insn "sse_ucomi" @@ -19782,7 +19782,7 @@ (parallel [(const_int 0)]))))] "TARGET_SSE" "ucomiss\t{%1, %0|%0, %1}" - [(set_attr "type" "ssecmp") + [(set_attr "type" "ssecomi") (set_attr "mode" "SF")]) @@ -21348,7 +21348,7 @@ (parallel [(const_int 0)]))))] "TARGET_SSE2" "comisd\t{%1, %0|%0, %1}" - [(set_attr "type" "ssecmp") + [(set_attr "type" "ssecomi") (set_attr "mode" "DF")]) (define_insn "sse2_ucomi" @@ -21361,7 +21361,7 @@ (parallel [(const_int 0)]))))] "TARGET_SSE2" "ucomisd\t{%1, %0|%0, %1}" - [(set_attr "type" "ssecmp") + [(set_attr "type" "ssecomi") (set_attr "mode" "DF")]) ;; SSE Strange Moves. @@ -22244,10 +22244,10 @@ (define_insn "sse2_unpckhpd" [(set (match_operand:V2DF 0 "register_operand" "=x") (vec_concat:V2DF - (vec_select:V2DF (match_operand:V2DF 1 "register_operand" "0") - (parallel [(const_int 1)])) - (vec_select:V2DF (match_operand:V2DF 2 "register_operand" "x") - (parallel [(const_int 0)]))))] + (vec_select:DF (match_operand:V2DF 1 "register_operand" "0") + (parallel [(const_int 1)])) + (vec_select:DF (match_operand:V2DF 2 "register_operand" "x") + (parallel [(const_int 0)]))))] "TARGET_SSE2" "unpckhpd\t{%2, %0|%0, %2}" [(set_attr "type" "ssecvt") @@ -22256,10 +22256,10 @@ (define_insn "sse2_unpcklpd" [(set (match_operand:V2DF 0 "register_operand" "=x") (vec_concat:V2DF - (vec_select:V2DF (match_operand:V2DF 1 "register_operand" "0") - (parallel [(const_int 0)])) - (vec_select:V2DF (match_operand:V2DF 2 "register_operand" "x") - (parallel [(const_int 1)]))))] + (vec_select:DF (match_operand:V2DF 1 "register_operand" "0") + (parallel [(const_int 0)])) + (vec_select:DF (match_operand:V2DF 2 "register_operand" "x") + (parallel [(const_int 1)]))))] "TARGET_SSE2" "unpcklpd\t{%2, %0|%0, %2}" [(set_attr "type" "ssecvt") diff --git a/gcc/cse.c b/gcc/cse.c index 8f9ac33cc25..180c31e9635 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -40,6 +40,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "output.h" #include "ggc.h" #include "timevar.h" +#include "except.h" /* The basic idea of common subexpression elimination is to go through the code, keeping a record of expressions that would @@ -6809,6 +6810,8 @@ cse_set_around_loop (x, insn, loop_start) SET_SRC, add an insn after P to copy its destination to what we will be replacing SET_SRC with. */ if (cse_check_loop_start_value + && single_set (p) + && !can_throw_internal (insn) && validate_change (insn, &SET_SRC (x), src_elt->exp, 0)) { |