mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Swift Optimizer: constant fold builtins in the simplification passes
This commit is contained in:
@@ -23,8 +23,9 @@ extension BuiltinInst : OnoneSimplifyable {
|
||||
case .IsSameMetatype:
|
||||
optimizeIsSameMetatype(context)
|
||||
default:
|
||||
// TODO: handle other builtin types
|
||||
break
|
||||
if let literal = constantFold(context) {
|
||||
uses.replaceAll(with: literal, context)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user