diff --git a/SwiftCompilerSources/Sources/Optimizer/FunctionPasses/DeadStoreElimination.swift b/SwiftCompilerSources/Sources/Optimizer/FunctionPasses/DeadStoreElimination.swift index 26d765f47907f..43c798f6879e5 100644 --- a/SwiftCompilerSources/Sources/Optimizer/FunctionPasses/DeadStoreElimination.swift +++ b/SwiftCompilerSources/Sources/Optimizer/FunctionPasses/DeadStoreElimination.swift @@ -256,7 +256,7 @@ private extension Deallocation { private extension DeallocStackInst { func isStackDeallocation(of base: AccessBase) -> Bool { - if case .stack(let allocStack) = base, allocstack == allocStack { + if case .stack(let allocStack) = base, operand.value == allocStack { return true } return false diff --git a/SwiftCompilerSources/Sources/SIL/Instruction.swift b/SwiftCompilerSources/Sources/SIL/Instruction.swift index 9b4ccbd8b0a4d..e0f8749af38db 100644 --- a/SwiftCompilerSources/Sources/SIL/Instruction.swift +++ b/SwiftCompilerSources/Sources/SIL/Instruction.swift @@ -647,11 +647,7 @@ extension Deallocation { } -final public class DeallocStackInst : Instruction, UnaryInstruction, Deallocation { - public var allocstack: AllocStackInst { - return operand.value as! AllocStackInst - } -} +final public class DeallocStackInst : Instruction, UnaryInstruction, Deallocation {} final public class DeallocStackRefInst : Instruction, UnaryInstruction, Deallocation { public var allocRef: AllocRefInstBase { operand.value as! AllocRefInstBase }