diff options
author | Gabor Greif <ggreif@gmail.com> | 2010-06-24 13:54:33 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2010-06-24 13:54:33 +0000 |
commit | bcda85c74304ffada586a9c58ce9bcff93b69a86 (patch) | |
tree | 3d065e010b82e7455f67074ab121f8dcb02f9e8b | |
parent | c310fcc909c21c94d1e5b05a97763911568a3ed8 (diff) |
use (even more) ArgOperand API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106744 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/InstCombine/InstCombineCalls.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineCalls.cpp b/lib/Transforms/InstCombine/InstCombineCalls.cpp index c9ab176d83..a8f803a561 100644 --- a/lib/Transforms/InstCombine/InstCombineCalls.cpp +++ b/lib/Transforms/InstCombine/InstCombineCalls.cpp @@ -112,8 +112,8 @@ unsigned InstCombiner::GetOrEnforceKnownAlignment(Value *V, } Instruction *InstCombiner::SimplifyMemTransfer(MemIntrinsic *MI) { - unsigned DstAlign = GetOrEnforceKnownAlignment(MI->getOperand(1)); - unsigned SrcAlign = GetOrEnforceKnownAlignment(MI->getOperand(2)); + unsigned DstAlign = GetOrEnforceKnownAlignment(MI->getArgOperand(0)); + unsigned SrcAlign = GetOrEnforceKnownAlignment(MI->getArgOperand(1)); unsigned MinAlign = std::min(DstAlign, SrcAlign); unsigned CopyAlign = MI->getAlignment(); @@ -125,7 +125,7 @@ Instruction *InstCombiner::SimplifyMemTransfer(MemIntrinsic *MI) { // If MemCpyInst length is 1/2/4/8 bytes then replace memcpy with // load/store. - ConstantInt *MemOpLength = dyn_cast<ConstantInt>(MI->getOperand(3)); + ConstantInt *MemOpLength = dyn_cast<ConstantInt>(MI->getArgOperand(2)); if (MemOpLength == 0) return 0; // Source and destination pointer types are always "i8*" for intrinsic. See @@ -140,9 +140,9 @@ Instruction *InstCombiner::SimplifyMemTransfer(MemIntrinsic *MI) { // Use an integer load+store unless we can find something better. unsigned SrcAddrSp = - cast<PointerType>(MI->getOperand(2)->getType())->getAddressSpace(); + cast<PointerType>(MI->getArgOperand(1)->getType())->getAddressSpace(); unsigned DstAddrSp = - cast<PointerType>(MI->getOperand(1)->getType())->getAddressSpace(); + cast<PointerType>(MI->getArgOperand(0)->getType())->getAddressSpace(); const IntegerType* IntType = IntegerType::get(MI->getContext(), Size<<3); Type *NewSrcPtrTy = PointerType::get(IntType, SrcAddrSp); |