The pass tried to fold in reverse-post-order, but it cause an issue when a parent is folded before the chilren as they will still be present in the worklist. Use reverse-preorder instead here. Fixes #64089
The pass tried to fold in reverse-post-order, but it cause an issue when a parent is folded before the chilren as they will still be present in the worklist. Use reverse-preorder instead here. Fixes #64089