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
This commit is contained in:
Jan Hubicka 2003-01-25 16:00:51 +01:00 committed by Jan Hubicka
parent c506155455
commit 26771da72f
5 changed files with 43 additions and 20 deletions

View File

@ -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.

View File

@ -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

View File

@ -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. */

View File

@ -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")

View File

@ -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))
{