Superty wrote: I would suggest adding a unit test / static assert that explicitly checks that the layout of APInt is as expected (whichever solution you choose) https://github.com/llvm/llvm-project/pull/94953