Erik Eckstein
04ede105d6
Simplification: remove redundant array casts
Remove casts between arrays of the same type.
```
%1 = function_ref @_arrayConditionalCast : (@guaranteed Array<Int>) -> @owned Optional<Array<Int>>
%2 = apply %1(%0) : (@guaranteed Array<Int>) -> @owned Optional<Array<Int>>
```
->
```
%1 = copy_value %0
%2 = enum $Optional<Array<Int>>, #Optional.some!enumelt, %1
```
This can be a result of specialization, e.g.
```
func foo<T>(from: [T]) -> [Int]? {
return from as? [Int]
}
func bar(a: [Int]) -> [Int]? {
return foo(from: a)
}
```
rdar://139632757
2025-03-15 08:32:58 +01:00
..
2025-03-07 15:59:34 +01:00
2025-02-12 09:01:11 +01:00
2025-03-14 09:40:22 +01:00
2025-03-15 08:32:58 +01:00
2025-02-12 09:01:11 +01:00
2025-02-12 09:01:11 +01:00
2025-02-12 09:01:11 +01:00
2025-03-14 09:45:27 +01:00
2025-03-14 09:40:22 +01:00
2025-02-12 09:01:11 +01:00
2025-02-12 09:01:11 +01:00
2025-02-12 09:01:11 +01:00
2025-03-14 09:49:53 +01:00
2025-02-12 09:01:11 +01:00
2025-02-12 09:01:11 +01:00
2025-02-12 09:01:11 +01:00
2025-02-12 09:01:11 +01:00
2025-02-12 09:01:11 +01:00
2025-02-12 09:01:11 +01:00
2025-02-12 09:01:11 +01:00
2025-02-12 15:18:39 +01:00
2025-02-12 22:37:49 +01:00
2025-02-12 09:01:11 +01:00
2025-02-12 09:01:11 +01:00
2025-02-12 09:01:11 +01:00
2025-02-12 09:01:11 +01:00
2025-02-12 09:01:11 +01:00
2025-02-12 09:01:11 +01:00
2025-02-12 09:01:11 +01:00
2025-02-12 09:01:11 +01:00
2025-02-12 09:01:11 +01:00
2025-02-12 09:01:11 +01:00
2025-02-12 09:01:11 +01:00
2025-02-12 09:01:11 +01:00
2025-03-07 15:59:34 +01:00