[jit] Arithmetic simplification for integers. (#61444)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/61444
Add a mini pass to merge arithmetic nodes like (((x - 1) + 2) * 1) - 1.
Issue #60913
Test Plan:
python test/test_jit.py TestPeephole.test_peephole_arith
Imported from OSS
Reviewed By: eellison
Differential Revision: D29630614
fbshipit-source-id: 08ac64cee39070401f9ff9163d309f20ff53c5ac