[Coroutines] Don't transform cmpinst prematurely in simplifyTerminatorLeadingToRet
Previously, we would try to transform cmpinst in
simplifyTerminatorLeadingToRet if we found it was a constant. However,
this is incorrect.
Since the resolved constants in simplifyTerminatorLeadingToRet are not
truely constants. They are basically constants along cerntain code
paths.
In this way, it is clearly incorrect to transform the compare
instruction to a constant.
It will cause confusing miscompilations. This patch tries to fix this.