Skip to content
Commit 0a7ff096 authored by Chuanqi Xu's avatar Chuanqi Xu
Browse files

[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.
parent 19b1d3bd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment