From 28b43ab1379c9be9ea80abda160d1582a4cdb348 Mon Sep 17 00:00:00 2001 From: van Hauser Date: Mon, 24 Feb 2020 03:03:53 +0100 Subject: important InsTrim bugfix! --- llvm_mode/LLVMInsTrim.so.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm_mode') diff --git a/llvm_mode/LLVMInsTrim.so.cc b/llvm_mode/LLVMInsTrim.so.cc index afe89ec7..390e0697 100644 --- a/llvm_mode/LLVMInsTrim.so.cc +++ b/llvm_mode/LLVMInsTrim.so.cc @@ -169,6 +169,7 @@ struct InsTrim : public ModulePass { ConstantInt *Zero = ConstantInt::get(Int8Ty, 0); ConstantInt *One = ConstantInt::get(Int8Ty, 1); + ConstantInt *One32 = ConstantInt::get(Int32Ty, 1); u64 total_rs = 0; u64 total_hs = 0; @@ -512,7 +513,7 @@ struct InsTrim : public ModulePass { ->setMetadata(M.getMDKindID("nosanitize"), MDNode::get(C, None)); // Bugfix #3: save the actually location ID to OldPrev - Value *Shr = IRB.CreateLShr(L, One); + Value *Shr = IRB.CreateLShr(L, One32); IRB.CreateStore(Shr, OldPrev) ->setMetadata(M.getMDKindID("nosanitize"), MDNode::get(C, None)); -- cgit 1.4.1