On Fri Mar 17 21:28:04 2023 +0000, Nikolay Sivov wrote:
We do know when there is a conversion for a given expression. The reason this was no split further was because single integer division uses all of these.
Well, we don't know for sure for preshader expressions (I think, I might certainly have missed some test) and I wouldn't be surprised if it wasn't consistent with other ways of setting variables...
I understand that you need all those instructions for the signed integer division but one could introduce a test using some subset of the opcodes (e.g. unsigned division by itself, bitwise ops, ...) first and then the signed division test would only bring in what's left. Again, no big deal, it's not a huge patch anyway and there are minimal regressions concerns.