After the merge of main, Gen.host_addr sign-extends every 48-bit effective
VA with a shift left and an arithmetic shift right by 16 (a 32-bit shift
amount). lower_addr64 knew only shifts by 32, so every address kept Int64
and the lowering did nothing. A shift by 1..31 of a (low, high) pair now
becomes the two words' shifts with the bits that cross between them; the
amount may be a 32-bit or a 64-bit constant.
test_addr64_lowering gains a negative 48-bit VA case (bit 47 set, read
below the heap base), compared with the Int64 form in spirv_mini_interp.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
lower_addr64 rewrites the assembled module's 64-bit address arithmetic (the zero-extend, shift-by-32, OR/AND, add and
subtract with carry, narrowing, sign-extension, 64-bit bitcasts and pair compares the address idiom uses) into uint
pairs and an OpBitcast of a 2x32 vector to the PhysicalStorageBuffer pointer, and drops OpCapability Int64 when
nothing else needs it, so translated shaders run on devices without shaderInt64. --int64-addresses keeps the 64-bit
form. Semantic tests for the lowering, the interpreters learn the pair pointer form, design.md row.
Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>