[llvm-commits] [llvm] r106743 - /llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
Gabor Greif
ggreif at gmail.com
Thu Jun 24 06:42:49 PDT 2010
Author: ggreif
Date: Thu Jun 24 08:42:49 2010
New Revision: 106743
URL: http://llvm.org/viewvc/llvm-project?rev=106743&view=rev
Log:
use ArgOperand API
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp?rev=106743&r1=106742&r2=106743&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp Thu Jun 24 08:42:49 2010
@@ -289,11 +289,10 @@
if (GVSrc->isConstant()) {
Module *M = CI.getParent()->getParent()->getParent();
Intrinsic::ID MemCpyID = Intrinsic::memcpy;
- const Type *Tys[3] = { CI.getOperand(1)->getType(),
- CI.getOperand(2)->getType(),
- CI.getOperand(3)->getType() };
- CI.setCalledFunction(
- Intrinsic::getDeclaration(M, MemCpyID, Tys, 3));
+ const Type *Tys[3] = { CI.getArgOperand(0)->getType(),
+ CI.getArgOperand(1)->getType(),
+ CI.getArgOperand(2)->getType() };
+ CI.setCalledFunction(Intrinsic::getDeclaration(M, MemCpyID, Tys, 3));
Changed = true;
}
}
@@ -313,7 +312,7 @@
if (Instruction *I = SimplifyMemSet(MSI))
return I;
}
-
+
if (Changed) return II;
}
More information about the llvm-commits
mailing list