Files
swift-mirror/test/SILOptimizer/simplify_debug_step.sil
Erik Eckstein 0a05124023 Swift Optimizer: add simplification of debug_step
When compiling with optimizations, unconditionally remove `debug_step`
2023-05-08 21:23:36 +02:00

20 lines
622 B
Plaintext

// RUN: %target-sil-opt -enable-sil-verify-all %s -onone-simplification -simplify-instruction=debug_step | %FileCheck %s --check-prefix=CHECK-ONONE --check-prefix=CHECK
// RUN: %target-sil-opt -enable-sil-verify-all %s -simplification -simplify-instruction=debug_step | %FileCheck %s --check-prefix=CHECK-O --check-prefix=CHECK
// REQUIRES: swift_in_compiler
import Swift
import Builtin
// CHECK-LABEL: sil @testit
// CHECK-O-NOT: debug_step
// CHECK-ONONE: debug_step
// CHECK: } // end sil function 'testit'
sil @testit : $@convention(thin) () -> () {
bb0:
debug_step
%r = tuple ()
return %r : $()
}