On Mon Jan 30 14:57:33 2023 +0000, Francisco Casas wrote:
This would need to be a lowering pass, because otherwise you would have to add a new temp in the bytecode. It can work but I am not sure if there will be discrepancies in precision, or if they would matter. I would go for creating the new `DP2ADD` op (maybe it should be called `HLSL_OP3_DP2ADD`?) and adding the lowering pass for SM1.
huh, I just realized that you could use the same temp for storing the result of both instructions, so it wouldn't require a new temp. I don't think we do that somewhere else though.