The pass would previously create invalid IR by always replacing a tensor value with the promoted tensor despite its insertion point being before a compute operation. If another operation before the compute operation would have a use of the tensor it'd get replaced despite being illegal.
The fix is to simply not replace the value of the tensor but rather the operand use. CSE should clean up any redundancy.
The pass would previously create invalid IR by always replacing a tensor value with the promoted tensor despite its insertion point being before a compute operation. If another operation before the compute operation would have a use of the tensor it'd get replaced despite being illegal.
The fix is to simply not replace the value of the tensor but rather the operand use. CSE should clean up any redundancy.