Chris Lattner wrote:
fix PR4963: folding insertvalue would sometimes turn a packed struct into
an unpacked one.
About this bug -- it happened because ConstantStruct::get has a default parameter for whether the struct should be packed or not, which defaults to not packed.
This is strikingly error prone. We even list struct and packed struct as two different types in the LangRef. We don't need to go so far as to offer separate ConstantStruct and ConstantPackedStruct but maybe the isPacked parameter should at least be mandatory?