aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2003-01-25 16:00:51 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2003-01-25 15:00:51 +0000
commit26771da72fa978a233ed03aa4b29068798fdac19 (patch)
tree8253b892533105e767c0e62418a27fbd8be36e36 /gcc
parentc506155455a3f51e34a252d7ca00715b792d1537 (diff)
downloadgcc-26771da72fa978a233ed03aa4b29068798fdac19.zip
gcc-26771da72fa978a233ed03aa4b29068798fdac19.tar.gz
gcc-26771da72fa978a233ed03aa4b29068798fdac19.tar.bz2
i386.c (ix86_expand_movstr, [...]): Consistently do libcall for large blocks.
* 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 From-SVN: r61772
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/Makefile.in2
-rw-r--r--gcc/config/i386/i386.c15
-rw-r--r--gcc/config/i386/i386.md32
-rw-r--r--gcc/cse.c3
5 files changed, 43 insertions, 20 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 118b147..515a57d 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 f89929c..ecb1b33 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 eaaf4ab..fe76c91 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 688cf6b..02874dc 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 8f9ac33..180c31e 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))
{