diff --git a/lib/SIL/Utils/MemAccessUtils.cpp b/lib/SIL/Utils/MemAccessUtils.cpp index 4656fefa37c80..8df4197913248 100644 --- a/lib/SIL/Utils/MemAccessUtils.cpp +++ b/lib/SIL/Utils/MemAccessUtils.cpp @@ -2691,6 +2691,7 @@ void swift::visitAccessedAddress(SILInstruction *I, case SILInstructionKind::CopyBlockInst: case SILInstructionKind::CopyBlockWithoutEscapingInst: case SILInstructionKind::CopyValueInst: + case SILInstructionKind::DebugStepInst: case SILInstructionKind::DeinitExistentialAddrInst: case SILInstructionKind::DeinitExistentialValueInst: case SILInstructionKind::DestroyAddrInst: diff --git a/test/SILOptimizer/deinit_barrier.sil b/test/SILOptimizer/deinit_barrier.sil index 574a472142b6d..05f432ad9da83 100644 --- a/test/SILOptimizer/deinit_barrier.sil +++ b/test/SILOptimizer/deinit_barrier.sil @@ -103,3 +103,15 @@ sil [ossa] @test_hop_to_executor : $@convention(thin) () -> () { %retval = tuple () return %retval : $() } + +// CHECK-LABEL: begin running test 1 of 1 on test_instructions_1: is-deinit-barrier +// CHECK: debug_step +// CHECK: false +// CHECK-LABEL: end running test 1 of 1 on test_instructions_1: is-deinit-barrier +sil [ossa] @test_instructions_1 : $@convention(thin) () -> () { +entry: + test_specification "is-deinit-barrier @instruction" + debug_step + %retval = tuple () + return %retval : $() +}