Skip to content

Commit f1bb2e8

Browse files
committed
constant_evaluable_subset - update test to enable optimization
Constant evaluation actually requires optimization to kick in. At least in some of the tests. For example, alloc_box must be promoted.
1 parent 77deb0e commit f1bb2e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/SILOptimizer/constant_evaluable_subset_test.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Run the (mandatory) passes on which constant evaluator depends, and test the
55
// constant evaluator on the SIL produced after the dependent passes are run.
66
//
7-
// RUN: not %target-sil-opt -silgen-cleanup -raw-sil-inst-lowering -allocbox-to-stack -mandatory-inlining -constexpr-limit 3000 -test-constant-evaluable-subset %t/constant_evaluable_subset_test_silgen.sil > %t/constant_evaluable_subset_test.sil 2> %t/error-output
7+
// RUN: not %target-sil-opt -opt-mode=speed -silgen-cleanup -raw-sil-inst-lowering -allocbox-to-stack -mandatory-inlining -constexpr-limit 3000 -test-constant-evaluable-subset %t/constant_evaluable_subset_test_silgen.sil > %t/constant_evaluable_subset_test.sil 2> %t/error-output
88
//
99
// RUN: %FileCheck %S/Inputs/constant_evaluable.swift < %t/error-output
1010
//
@@ -14,6 +14,6 @@
1414
// especially performance inlining as it inlines functions such as String.+=
1515
// that the evaluator has special knowledge about.
1616
//
17-
// RUN: not %target-sil-opt -silgen-cleanup -diagnose-invalid-escaping-captures -diagnose-static-exclusivity -capture-promotion -access-enforcement-selection -allocbox-to-stack -noreturn-folding -definite-init -raw-sil-inst-lowering -closure-lifetime-fixup -semantic-arc-opts -destroy-hoisting -ownership-model-eliminator -mandatory-inlining -predictable-memaccess-opts -os-log-optimization -diagnostic-constant-propagation -predictable-deadalloc-elim -mandatory-arc-opts -diagnose-unreachable -diagnose-infinite-recursion -yield-once-check -dataflow-diagnostics -split-non-cond_br-critical-edges -constexpr-limit 3000 -test-constant-evaluable-subset %t/constant_evaluable_subset_test_silgen.sil > /dev/null 2> %t/error-output-mandatory
17+
// RUN: not %target-sil-opt -opt-mode=speed -silgen-cleanup -diagnose-invalid-escaping-captures -diagnose-static-exclusivity -capture-promotion -access-enforcement-selection -allocbox-to-stack -noreturn-folding -definite-init -raw-sil-inst-lowering -closure-lifetime-fixup -semantic-arc-opts -destroy-hoisting -ownership-model-eliminator -mandatory-inlining -predictable-memaccess-opts -os-log-optimization -diagnostic-constant-propagation -predictable-deadalloc-elim -mandatory-arc-opts -diagnose-unreachable -diagnose-infinite-recursion -yield-once-check -dataflow-diagnostics -split-non-cond_br-critical-edges -constexpr-limit 3000 -test-constant-evaluable-subset %t/constant_evaluable_subset_test_silgen.sil > /dev/null 2> %t/error-output-mandatory
1818
//
1919
// RUN: %FileCheck %S/Inputs/constant_evaluable.swift < %t/error-output-mandatory

0 commit comments

Comments
 (0)