diff --git a/Src/ILGPU/IR/Transformations/Optimizer.cs b/Src/ILGPU/IR/Transformations/Optimizer.cs index bcbf61bcc..5e0a4b29f 100644 --- a/Src/ILGPU/IR/Transformations/Optimizer.cs +++ b/Src/ILGPU/IR/Transformations/Optimizer.cs @@ -119,10 +119,11 @@ public static void AddBackendOptimizations( // Lower structures if (level > OptimizationLevel.O1) - { builder.Add(new LowerStructures()); + + // Apply final DCE phase in release mode + if (level > OptimizationLevel.O0) builder.Add(new DeadCodeElimination()); - } } ///