On Tue Mar 21 22:24:19 2023 +0000, Zebediah Figura wrote:
Oh, hlsl_replace_node() deletes the old instruction. Hmm, maybe we could introduce a variant that doesn't do that instead?
In this case it is still better to create the copy though, because otherwise we would need a way to specify which uses must be transferred to the replacement and which ones must be kept pointing to the original instruction.