And with some more attempts to work around the issue I can now sometimes get an error:
ILScanILBinary: Fatal Error: Non constant buffer constant detected.
Out of curiosity, what is ILScanILBinary for?
Also of interest is what is a Non constant buffer constant?
Perhaps it's worth a try without "_coordtype(unnormalized)".
The coordinate type can be declared:
Are you really using a 3D texture? My snippet above is assuming you're using 2D.
I've managed to work around this issue somehow, although I am not altogether clear how I did it...
I believe that the IL compiler doesn't always accept a uniform syntax for all instructions. For instance I was intending only to use a 2D texture, and changing to 'r66.xy' for all these instances helped reduce the issue, but didn't completely remove the issue. Note that according to the IL docs, the swizzle on the address register should be meaningless beyond the first two args (checking the ASM generated, it usually is).
I also had issues using the Evergreen instruction bit_insert, and I have removed all references to this instruction as well. Together, both these changes (and a few more tweaks besides) seem to have worked around this issue. However, I am not convinced that I will not hit it again in the future.
PS. The _coordtype(unnormalized) is the same syntax used by ATI OpenCL compiler, so I figure it should be reasonably well supported going forwards.