mirror of
https://github.com/apple/swift.git
synced 2026-06-20 15:42:51 +02:00
bd1af9283f
This optimization replaces (the very inefficient) RawRepresentable comparison to a simple compare of enum tags. However if the raw type is a custom type we don't know how the comparison is implemented. A custom raw type can implement the case comparison in a way that comparing different cases will return `true`. Therefore only do the optimization for known stdlib raw value types. Fixes a mis-compile https://github.com/swiftlang/swift/issues/87906 rdar://172746003