From: weiyu Date: Fri, 12 Jul 2019 22:15:27 +0000 (-0700) Subject: Wrong parameter was passed in. Fixed now. X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11llvm.git;a=commitdiff_plain;h=a1ac4543bdbf783ddd1835b893ad367e0519e986;ds=sidebyside Wrong parameter was passed in. Fixed now. --- diff --git a/CDSPass.cpp b/CDSPass.cpp index 19b3a40..c0bd244 100644 --- a/CDSPass.cpp +++ b/CDSPass.cpp @@ -699,7 +699,7 @@ bool CDSPass::instrumentAtomicCall(CallInst *CI, const DataLayout &DL) { Value *ptr = IRB.CreatePointerCast(OrigPtr, PtrTy); Value *val = IRB.CreatePointerCast(OrigVal, Ty); - Value *order = IRB.CreateBitOrPointerCast(parameters[1], OrdTy); + Value *order = IRB.CreateBitOrPointerCast(parameters[2], OrdTy); Value *args[] = {ptr, val, order, position}; Instruction* funcInst = CallInst::Create(CDSAtomicStore[Idx], args);