aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rtl.c')
-rw-r--r--gcc/rtl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/rtl.c b/gcc/rtl.c
index aefbbf3..58867ae 100644
--- a/gcc/rtl.c
+++ b/gcc/rtl.c
@@ -385,6 +385,10 @@ rtx_equal_p_cb (const_rtx x, const_rtx y, rtx_equal_p_callback_function cb)
if (GET_MODE (x) != GET_MODE (y))
return 0;
+ /* MEMs refering to different address space are not equivalent. */
+ if (code == MEM && MEM_ADDR_SPACE (x) != MEM_ADDR_SPACE (y))
+ return 0;
+
/* Some RTL can be compared nonrecursively. */
switch (code)
{
@@ -501,6 +505,10 @@ rtx_equal_p (const_rtx x, const_rtx y)
if (GET_MODE (x) != GET_MODE (y))
return 0;
+ /* MEMs refering to different address space are not equivalent. */
+ if (code == MEM && MEM_ADDR_SPACE (x) != MEM_ADDR_SPACE (y))
+ return 0;
+
/* Some RTL can be compared nonrecursively. */
switch (code)
{