summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2002-09-30 13:00:32 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2002-09-30 13:00:32 +0000
commit7832abdcde73d037e78e997d5c7cd8033773bece (patch)
tree33d3f218be00b75d8fa831ceef6ceaea83289f19
parent971b1aa439c23bde10a7e729616811377c9fbb58 (diff)
downloadppe42-gcc-7832abdcde73d037e78e997d5c7cd8033773bece.tar.gz
ppe42-gcc-7832abdcde73d037e78e997d5c7cd8033773bece.zip
* i386.h (TARGET_CPP_CPU_BUILTINS): Define __SSE_MATH__.
* gcse.c (cprop_jump): Check that the register has not been modified (cprop_jump): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57648 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/i386/i386.h4
-rw-r--r--gcc/gcse.c11
3 files changed, 21 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 15dfb25db7f..76793fb896f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+Mon Sep 30 14:57:18 CEST 2002 Jan Hubicka <jh@suse.cz>
+
+ * i386.h (TARGET_CPP_CPU_BUILTINS): Define __SSE_MATH__.
+
+ * gcse.c (cprop_jump): Check that the register has not
+ been modified
+ (cprop_jump): Likewise.
+
2002-09-30 Richard Earnshaw <rearnsha@arm.com>
* arm.h (BASE_REG_CLASS): Always return LO_REGS for Thumb.
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index 68fa7409b7e..af9c37fc131 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -529,6 +529,10 @@ extern int x86_prefetch_sse;
builtin_define ("__SSE__"); \
if (TARGET_SSE2) \
builtin_define ("__SSE2__"); \
+ if (TARGET_SSE_MATH && TARGET_SSE) \
+ builtin_define ("__SSE_MATH__"); \
+ if (TARGET_SSE_MATH && TARGET_SSE2) \
+ builtin_define ("__SSE2_MATH__"); \
\
/* Built-ins based on -march=. */ \
if (ix86_arch == PROCESSOR_I486) \
diff --git a/gcc/gcse.c b/gcc/gcse.c
index fbe3fcb1200..081275a0c7d 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -4054,7 +4054,9 @@ cprop_jump (bb, setcc, jump, from, src)
/* First substitute in the INSN condition as the SET_SRC of the JUMP,
then substitute that given values in this expanded JUMP. */
- if (setcc != NULL)
+ if (setcc != NULL
+ && !modified_between_p (from, setcc, jump)
+ && !modified_between_p (src, setcc, jump))
{
rtx setcc_set = single_set (setcc);
new_set = simplify_replace_rtx (SET_SRC (set),
@@ -4068,7 +4070,7 @@ cprop_jump (bb, setcc, jump, from, src)
/* If no simplification can be made, then try the next
register. */
- if (rtx_equal_p (new, new_set))
+ if (rtx_equal_p (new, new_set) || rtx_equal_p (new, SET_SRC (set)))
return 0;
/* If this is now a no-op delete it, otherwise this must be a valid insn. */
@@ -4076,6 +4078,11 @@ cprop_jump (bb, setcc, jump, from, src)
delete_insn (jump);
else
{
+ /* Ensure the value computed inside the jump insn to be equivalent
+ to one computed by setcc. */
+ if (setcc
+ && modified_in_p (new, setcc))
+ return 0;
if (! validate_change (jump, &SET_SRC (set), new, 0))
return 0;
OpenPOWER on IntegriCloud