Propagate TargetLibraryInfo throughout ConstantFolding.cpp and

InstructionSimplify.cpp.  Other fixups as needed.
Part of rdar://10500969

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145559 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chad Rosier
2011-12-01 03:08:23 +00:00
parent 66d004ef70
commit 618c1dbd29
17 changed files with 456 additions and 279 deletions

View File

@ -590,7 +590,7 @@ void PromoteMem2Reg::run() {
PHINode *PN = I->second;
// If this PHI node merges one value and/or undefs, get the value.
if (Value *V = SimplifyInstruction(PN, 0, &DT)) {
if (Value *V = SimplifyInstruction(PN, 0, 0, &DT)) {
if (AST && PN->getType()->isPointerTy())
AST->deleteValue(PN);
PN->replaceAllUsesWith(V);