aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcse.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2002-09-30 15:00:32 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2002-09-30 13:00:32 +0000
commit48ddd46c41cb690543ffc86828d664ce78af6122 (patch)
tree33d3f218be00b75d8fa831ceef6ceaea83289f19 /gcc/gcse.c
parentca25149e05e3fbd98290f71f1d41d008cd77cf56 (diff)
downloadgcc-48ddd46c41cb690543ffc86828d664ce78af6122.zip
gcc-48ddd46c41cb690543ffc86828d664ce78af6122.tar.gz
gcc-48ddd46c41cb690543ffc86828d664ce78af6122.tar.bz2
i386.h (TARGET_CPP_CPU_BUILTINS): Define __SSE_MATH__.
* i386.h (TARGET_CPP_CPU_BUILTINS): Define __SSE_MATH__. * gcse.c (cprop_jump): Check that the register has not been modified (cprop_jump): Likewise. From-SVN: r57648
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r--gcc/gcse.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/gcse.c b/gcc/gcse.c
index fbe3fcb..081275a 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;