Fix for two constant propagation problems in GVN with the assume intrinsic

instruction.

Patch by Yuanrui Zhang.

Differential Revision: http://reviews.llvm.org/D16100

llvm-svn: 258435
This commit is contained in:
David L Kreitzer
2016-01-21 21:32:35 +00:00
parent 1f472eace5
commit 4d7257dfa1
4 changed files with 46 additions and 5 deletions

View File

@@ -1569,7 +1569,7 @@ unsigned llvm::replaceDominatedUsesWith(Value *From, Value *To,
UI != UE;) {
Use &U = *UI++;
auto *I = cast<Instruction>(U.getUser());
if (DT.dominates(BB, I->getParent())) {
if (DT.properlyDominates(BB, I->getParent())) {
U.set(To);
DEBUG(dbgs() << "Replace dominated use of '" << From->getName() << "' as "
<< *To << " in " << *U << "\n");