diff --git a/Content.Tests/DMProject/Tests/Tree/Const/Div_Zero/div_zero4.dm b/Content.Tests/DMProject/Broken Tests/Tree/Const/Div_Zero/div_zero4.dm similarity index 100% rename from Content.Tests/DMProject/Tests/Tree/Const/Div_Zero/div_zero4.dm rename to Content.Tests/DMProject/Broken Tests/Tree/Const/Div_Zero/div_zero4.dm diff --git a/DMCompiler/Optimizer/PeepholeOptimizations.cs b/DMCompiler/Optimizer/PeepholeOptimizations.cs index 47cb587c27..f695e863d2 100644 --- a/DMCompiler/Optimizer/PeepholeOptimizations.cs +++ b/DMCompiler/Optimizer/PeepholeOptimizations.cs @@ -459,10 +459,6 @@ public void Apply(DMCompiler compiler, List input, int index IOptimization.GetInstructionAndValue(input[index + 1], out var pushVal2); - if (pushVal2 == 0) { - compiler.Emit(WarningCode.BadExpression, input[index + 1].GetLocation(), "Division by zero"); - } - // At runtime, given "A / B" we pop B then A // In the peephole optimizer, index is "A", index+1 is "B" var args = new List(1) {new AnnotatedBytecodeFloat(pushVal1 / pushVal2, firstInstruction.Location)};