Return one of the original RegisterType instances when merging, if possible

This commit is contained in:
Ben Gruver 2013-03-13 20:39:32 -07:00
parent dd714d9196
commit a555aa0c01

View File

@ -279,6 +279,15 @@ public class RegisterType {
assert other.category == UNKNOWN;
return this;
}
if (mergedType != null) {
if (mergedType.equals(this.type)) {
return this;
}
if (mergedType.equals(other.type)) {
return other;
}
}
return RegisterType.getRegisterType(mergedCategory, mergedType);
}