We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f6a231 commit 4db84e1Copy full SHA for 4db84e1
SwiftCompilerSources/Sources/Optimizer/InstructionSimplification/SimplifyAllocStack.swift
@@ -332,11 +332,10 @@ private extension AllocStackInst {
332
isLexical: isLexical,
333
isFromVarDecl: isFromVarDecl,
334
usesMoveableValueDebugInfo: usesMoveableValueDebugInfo)
335
- for use in uses {
336
- // FIXME: Are there any specific cases to handle?
337
- use.set(to: newAlloc, context)
338
- }
339
- context.erase(instruction: self)
+ let builderAfter = Builder(after: self, context)
+ let addrCast = builderAfter.createUncheckedAddrCast(from: newAlloc, to: self.type.addressType)
+ uses.replaceAll(with: addrCast, context)
+ self.replace(with: newAlloc, context)
340
return true
341
}
342
0 commit comments