Two new tests were added in #66448, and they both fail for watchOS:
1. debug_fragment_merge.sil fails on 32 bit architectures because the offset
calculation is different for those (fragments of 32 bits, instead of 64).
2. debug_fragment_merge.swift is failing for unknown reasons at this point,
there is simply no SIL debug information generated for the variable "data".
Since the original patch didn't change SILGen, this is not a regression.
SIL variables can be split by SILSROA into separate allocations, each having
op_fragment expressions in debug_value (VarInfo.DIExpr). These allocations can
be further split by IRGen (multiple values in Storage argument).
These "nested" fragments refer to the same DI variable, so it is important to
merge them for the LLVM IR DI expression. The compiler used to ignore fragment
expressions from SIL when IRGen fragments were also present. This led to
incorrect DI info generation, and for some cases even triggered assertions in
LLVM X86 CodeGen:
DwarfExpression.cpp:679: void llvm::DwarfExpression::addFragmentOffset(const
llvm::DIExpression *): Assertion `FragmentOffset >= OffsetInBits &&
"overlapping or duplicate fragments"' failed.
The patch fixes issue #64642. The LIT test is a reduced reproducer from that issue.