fix: don't apply const split if not needed

This commit is contained in:
Skylot
2020-11-04 20:21:24 +00:00
parent 714b935474
commit 71bf2aa59f
2 changed files with 7 additions and 1 deletions
@@ -586,6 +586,10 @@ public final class TypeInferenceVisitor extends AbstractVisitor {
}
private boolean checkAndSplitConstInsn(MethodNode mth, SSAVar var) {
ArgType type = var.getTypeInfo().getType();
if (type.isTypeKnown() || var.isTypeImmutable()) {
return false;
}
if (var.getUsedInPhi().size() < 2) {
return false;
}