Fixed the handle of trunc instruction as a leaf for expression pattern dominated by another trunc instruction.
In this case we need to update the work list of trunc instructions as follows:
- Replace old-trunc instruction node with the new-trunc instruction, if we reduced trunc instruction to different trunc instruction.
- Remove old-trunc instruction node from work-list, if we reduced trunc instruction to non-trunc instruction (e.g., to a constant expression).
- Add new-trunc instruction node to work-list, if we reduced a non-trunc instruction (e.g., zext/sext) into trunc instruction.
This should solve PR36121.