[llvm-branch-commits] [llvm-branch] r100460 - /llvm/branches/ggreif/CallInst-operands/lib/Analysis/BasicAliasAnalysis.cpp
Gabor Greif
ggreif at gmail.com
Mon Apr 5 13:27:58 PDT 2010
Author: ggreif
Date: Mon Apr 5 15:27:58 2010
New Revision: 100460
URL: http://llvm.org/viewvc/llvm-project?rev=100460&view=rev
Log:
shift operands
Modified:
llvm/branches/ggreif/CallInst-operands/lib/Analysis/BasicAliasAnalysis.cpp
Modified: llvm/branches/ggreif/CallInst-operands/lib/Analysis/BasicAliasAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/CallInst-operands/lib/Analysis/BasicAliasAnalysis.cpp?rev=100460&r1=100459&r2=100460&view=diff
==============================================================================
--- llvm/branches/ggreif/CallInst-operands/lib/Analysis/BasicAliasAnalysis.cpp (original)
+++ llvm/branches/ggreif/CallInst-operands/lib/Analysis/BasicAliasAnalysis.cpp Mon Apr 5 15:27:58 2010
@@ -318,10 +318,10 @@
case Intrinsic::memcpy:
case Intrinsic::memmove: {
unsigned Len = ~0U;
- if (ConstantInt *LenCI = dyn_cast<ConstantInt>(II->getOperand(3)))
+ if (ConstantInt *LenCI = dyn_cast<ConstantInt>(II->getOperand(2)))
Len = LenCI->getZExtValue();
- Value *Dest = II->getOperand(1);
- Value *Src = II->getOperand(2);
+ Value *Dest = II->getOperand(0);
+ Value *Src = II->getOperand(1);
if (isNoAlias(Dest, Len, P, Size)) {
if (isNoAlias(Src, Len, P, Size))
return NoModRef;
@@ -332,9 +332,9 @@
case Intrinsic::memset:
// Since memset is 'accesses arguments' only, the AliasAnalysis base class
// will handle it for the variable length case.
- if (ConstantInt *LenCI = dyn_cast<ConstantInt>(II->getOperand(3))) {
+ if (ConstantInt *LenCI = dyn_cast<ConstantInt>(II->getOperand(2))) {
unsigned Len = LenCI->getZExtValue();
- Value *Dest = II->getOperand(1);
+ Value *Dest = II->getOperand(0);
if (isNoAlias(Dest, Len, P, Size))
return NoModRef;
}
@@ -352,7 +352,7 @@
case Intrinsic::atomic_load_umax:
case Intrinsic::atomic_load_umin:
if (TD) {
- Value *Op1 = II->getOperand(1);
+ Value *Op1 = II->getOperand(0);
unsigned Op1Size = TD->getTypeStoreSize(Op1->getType());
if (isNoAlias(Op1, Op1Size, P, Size))
return NoModRef;
@@ -361,14 +361,14 @@
case Intrinsic::lifetime_start:
case Intrinsic::lifetime_end:
case Intrinsic::invariant_start: {
- unsigned PtrSize = cast<ConstantInt>(II->getOperand(1))->getZExtValue();
- if (isNoAlias(II->getOperand(2), PtrSize, P, Size))
+ unsigned PtrSize = cast<ConstantInt>(II->getOperand(0))->getZExtValue();
+ if (isNoAlias(II->getOperand(1), PtrSize, P, Size))
return NoModRef;
break;
}
case Intrinsic::invariant_end: {
- unsigned PtrSize = cast<ConstantInt>(II->getOperand(2))->getZExtValue();
- if (isNoAlias(II->getOperand(3), PtrSize, P, Size))
+ unsigned PtrSize = cast<ConstantInt>(II->getOperand(1))->getZExtValue();
+ if (isNoAlias(II->getOperand(2), PtrSize, P, Size))
return NoModRef;
break;
}
More information about the llvm-branch-commits
mailing list