diff --git a/sootup.java.core/src/main/java/sootup/java/core/interceptors/CopyPropagator.java b/sootup.java.core/src/main/java/sootup/java/core/interceptors/CopyPropagator.java index 4509c3fe262..6c34369dedd 100644 --- a/sootup.java.core/src/main/java/sootup/java/core/interceptors/CopyPropagator.java +++ b/sootup.java.core/src/main/java/sootup/java/core/interceptors/CopyPropagator.java @@ -36,6 +36,7 @@ import sootup.core.jimple.common.constant.NullConstant; import sootup.core.jimple.common.expr.JCastExpr; import sootup.core.jimple.common.stmt.AbstractDefinitionStmt; +import sootup.core.jimple.common.stmt.InvokableStmt; import sootup.core.jimple.common.stmt.JAssignStmt; import sootup.core.jimple.common.stmt.Stmt; import sootup.core.model.Body; @@ -141,7 +142,7 @@ else if (rhs instanceof Local && !rhs.equivTo(use)) { private Stmt replaceUse( @Nonnull MutableStmtGraph graph, @Nonnull Stmt stmt, @Nonnull Value use, @Nonnull Value rhs) { - if (!use.equivTo(rhs) || rhs != use) { + if (!use.equivTo(rhs)) { // TODO: ms: check if rhs!=use would be enough Stmt newStmt = stmt.withNewUse(use, rhs); if (newStmt != stmt) { graph.replaceNode(stmt, newStmt);