Commit 1635c1e3 authored by yb9976's avatar yb9976
Browse files

Fixed alias relation for two entities.

parent 59d4f317
......@@ -572,9 +572,18 @@ static ir_alias_relation _get_alias_relation(
/* same base address -> compare Sel entities */
if (base1 == base2 && ent1 != NULL && ent2 != NULL) {
if (ent1 != ent2)
if (ent1 != ent2) {
long offset1 = get_entity_offset(ent1);
long offset2 = get_entity_offset(ent2);
long size1 = get_type_size_bytes(type1);
long size2 = get_type_size_bytes(type2);
if (offset1 + size1 <= offset2 || offset2 + size2 <= offset1) {
return ir_no_alias;
else if (have_const_offsets)
}
return ir_may_alias;
} else if (have_const_offsets)
return different_sel_offsets(adr1, adr2);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment