Optimization passes found a bug in the frontend regarding constants.
Specifically in the case of instructions that have a 32bit constant that
are sign extended to 64bit was being incorrectly set to have a size of
32bits (the size of the constant).
So an optimization pass would rematerialize constants of the expected
size, thus ~0ULL would turn in to ~0U and generate invalid code.
Now watch the destination size and set the constant to that size, which
matches what its size will be.