diff -r 1a8d65e71a66 -r aec7bf35d6f5 src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/MathUtil.java --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/MathUtil.java Thu Oct 31 14:23:06 2019 -0700 +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/MathUtil.java Thu Oct 31 16:54:16 2019 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -94,7 +94,9 @@ if (before.predecessor() instanceof FixedBinaryNode) { FixedBinaryNode binaryPredecessor = (FixedBinaryNode) before.predecessor(); if (fixedDiv.dataFlowEquals(binaryPredecessor)) { - fixedDiv.safeDelete(); + if (fixedDiv.isAlive()) { + fixedDiv.safeDelete(); + } return binaryPredecessor; } }