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 d061b93 commit 51792d8Copy full SHA for 51792d8
SwiftCompilerSources/Sources/Optimizer/InstructionSimplification/SimplifyBuiltin.swift
@@ -179,15 +179,10 @@ private extension BuiltinInst {
179
return
180
}
181
182
- // Must be single use so that we can use replaceAll
183
- guard metatypeInst.uses.isSingleUse else {
184
- return
185
- }
186
-
187
let instanceType = metatypeInst.type.instanceTypeOfMetatype(in: parentFunction)
188
let builder = Builder(before: self, context)
189
let metatype = builder.createMetatype(of: instanceType, representation: .Thin)
190
- metatypeInst.uses.replaceAll(with: metatype, context)
+ operands[0].set(to: metatype, context)
191
192
193
0 commit comments