Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[InstCombine] Fix a code-sinking bug after D73832/f1a9efabcb9b
- UserParent = PN->getIncomingBlock(*I->use_begin()); + UserParent = PN->getIncomingBlock(*SingleUse); The first use of I may be droppable (llvm.assume). When compiling llvm/lib/IR/AutoUpgrade.cpp with a bootstrapped clang with ThinLTO with minimized bitcode files, I see such a case in the function _ZN4llvm20UpgradeIntrinsicCallEPNS_8CallInstEPNS_8FunctionE clang -c -fthinlto-index=AutoUpgrade.o.thinlto.bc AutoUpgrade.bc -O3 Unfortunately it is really difficult to get a minimized reproduce.
- Loading branch information