mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Reviewing the code with Arnold revealed a corner case where forward propagating a copy into multiple operands of the same instruction wasn't properly detected. I don't think this case was possible given the language rules, but nonetheless it is valid SIL and needs to be handled. This is confusing because in some cases we optimize that situation correctly, and in other cases we try to assert that it doesn't happen. So, I simplified the code to bailout anywhere that we see multiple operands of the same value. This isn't an expected situation that needs to be optimized.
59 KiB
59 KiB