[all-commits] [llvm/llvm-project] 0a7ff0: [Coroutines] Don't transform cmpinst prematurely i...
Chuanqi Xu via All-commits
all-commits at lists.llvm.org
Thu Jun 29 23:29:04 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0a7ff0960e33b6b27961afa5cbb7dd9eb4f1a283
https://github.com/llvm/llvm-project/commit/0a7ff0960e33b6b27961afa5cbb7dd9eb4f1a283
Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
Date: 2023-06-30 (Fri, 30 Jun 2023)
Changed paths:
M llvm/lib/Transforms/Coroutines/CoroSplit.cpp
A llvm/test/Transforms/Coroutines/coro-split-musttail12.ll
Log Message:
-----------
[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.
More information about the All-commits
mailing list