mirror of
https://github.com/apple/swift.git
synced 2026-11-24 07:03:51 +01:00
`IRBuilder` now folds constant GEPs into canonical `ptradd` form, i.e. `getelementptr inbounds (i8, ptr @G, iN <byte offset>)`, even with the default `ConstantFolder`. IRGen creates struct element and value witness table field addresses on constant globals through the builder, so the emitted IR changes shape but not meaning. Update the affected tests to expect byte offsets, accounting for pointer width where a test runs on 32-bit targets as well. See https://github.com/llvm/llvm-project/commit/e65dba4fb29967ab597ca0acb4ec174c1016cd28 (https://github.com/llvm/llvm-project/pull/226425).