After migrating from Xcode 16.1 to Xcode 26, we observed a behavior change that looks like a miscompile (as title said). Here is the compiler explorer repro: Compiler Explorer
From the disassembly of callFunc(), you can see the call to doSomething() is devirtualized in Swift 6.2 which was not back in 6.0, and the behavior change was introduced back in 6.1.
the impression i get is that the issue may be somewhere in SILCombine. if that's explicitly disabled with -Xllvm -sil-disable-pass='sil-combine', the expected behavior is restored (though i'd guess a lot of other optimizations may not work if you do that): Compiler Explorer. FYI @Erik_Eckstein.