diff options
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp b/llvm/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp index 14b05662c3e..26c4cbcb63f 100644 --- a/llvm/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp @@ -790,7 +790,7 @@ bool EfficiencySanitizer::insertCounterUpdate(Instruction *I, ConstantExpr::getGetElementPtr( ArrayType::get(IRB.getInt64Ty(), getStructCounterSize(StructTy)), CounterArray, Indices); - Value *Load = IRB.CreateLoad(Counter); + Value *Load = IRB.CreateLoad(IRB.getInt64Ty(), Counter); IRB.CreateStore(IRB.CreateAdd(Load, ConstantInt::get(IRB.getInt64Ty(), 1)), Counter); return true; @@ -875,7 +875,8 @@ bool EfficiencySanitizer::instrumentFastpathWorkingSet( // memory access, if they are not already set. Value *ValueMask = ConstantInt::get(ShadowTy, 0x81); // 10000001B - Value *OldValue = IRB.CreateLoad(IRB.CreateIntToPtr(ShadowPtr, ShadowPtrTy)); + Value *OldValue = + IRB.CreateLoad(ShadowTy, IRB.CreateIntToPtr(ShadowPtr, ShadowPtrTy)); // The AND and CMP will be turned into a TEST instruction by the compiler. Value *Cmp = IRB.CreateICmpNE(IRB.CreateAnd(OldValue, ValueMask), ValueMask); Instruction *CmpTerm = SplitBlockAndInsertIfThen(Cmp, I, false); |