This fixes bug52896: https://github.com/llvm/llvm-project/issues/52896.
Simply, some symmetric transfer optimization chances get invalided due to we delete some inlined optimization passes in https://github.com/llvm/llvm-project/commit/822b92aae439c4ba2946980c8a27bd2c8a62d90c#diff-8cf21bda84c593733aa099f89fe7d197fd83203c6bc4f6fbdcd94f8bb4256d23L1138-L1147 . This would cause stack-overflow in some situations which should be avoided by the design of coroutine: https://godbolt.org/z/E55h9Pv9f
This patch tries to fix this by transforming the constant CmpInst instruction which was done in the deleted passes.
Instead simplify each instructions at pieces,would you use SimplifyInstructionsInBlock to handle each basic block at once?