From: Peter Collingbourne Date: Thu, 21 Nov 2013 23:20:54 +0000 (+0000) Subject: Introduce two command-line flags for the instrumentation pass to control whether... X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=934d1f83aecf8f01646f4b2a09167309a4c1bb8d Introduce two command-line flags for the instrumentation pass to control whether the labels of pointers should be ignored in load and store instructions The new command line flags are -dfsan-ignore-pointer-label-on-store and -dfsan-ignore-pointer-label-on-load. Their default value matches the current labelling scheme. Additionally, the function __dfsan_union_load is marked as readonly. Patch by Lorenzo Martignoni! Differential Revision: http://llvm-reviews.chandlerc.com/D2187 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195382 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp b/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp index 9b9e725cde8..c539be93a7a 100644 --- a/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp +++ b/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp @@ -96,6 +96,22 @@ static cl::opt ClArgsABI( cl::desc("Use the argument ABI rather than the TLS ABI"), cl::Hidden); +// Controls whether the pass includes or ignores the labels of pointers in load +// instructions. +static cl::opt ClCombinePointerLabelsOnLoad( + "dfsan-combine-pointer-labels-on-load", + cl::desc("Combine the label of the pointer with the label of the data when " + "loading from memory."), + cl::Hidden, cl::init(true)); + +// Controls whether the pass includes or ignores the labels of pointers in +// stores instructions. +static cl::opt ClCombinePointerLabelsOnStore( + "dfsan-combine-pointer-labels-on-store", + cl::desc("Combine the label of the pointer with the label of the data when " + "storing in memory."), + cl::Hidden, cl::init(false)); + static cl::opt ClDebugNonzeroLabels( "dfsan-debug-nonzero-labels", cl::desc("Insert calls to __dfsan_nonzero_label on observing a parameter, " @@ -505,6 +521,7 @@ bool DataFlowSanitizer::runOnModule(Module &M) { DFSanUnionLoadFn = Mod->getOrInsertFunction("__dfsan_union_load", DFSanUnionLoadFnTy); if (Function *F = dyn_cast(DFSanUnionLoadFn)) { + F->addAttribute(AttributeSet::FunctionIndex, Attribute::ReadOnly); F->addAttribute(AttributeSet::ReturnIndex, Attribute::ZExt); } DFSanUnimplementedFn = @@ -978,14 +995,15 @@ void DFSanVisitor::visitLoadInst(LoadInst &LI) { Align = 1; } IRBuilder<> IRB(&LI); - Value *LoadedShadow = - DFSF.loadShadow(LI.getPointerOperand(), Size, Align, &LI); - Value *PtrShadow = DFSF.getShadow(LI.getPointerOperand()); - Value *CombinedShadow = DFSF.DFS.combineShadows(LoadedShadow, PtrShadow, &LI); - if (CombinedShadow != DFSF.DFS.ZeroShadow) - DFSF.NonZeroChecks.insert(CombinedShadow); - - DFSF.setShadow(&LI, CombinedShadow); + Value *Shadow = DFSF.loadShadow(LI.getPointerOperand(), Size, Align, &LI); + if (ClCombinePointerLabelsOnLoad) { + Value *PtrShadow = DFSF.getShadow(LI.getPointerOperand()); + Shadow = DFSF.DFS.combineShadows(Shadow, PtrShadow, &LI); + } + if (Shadow != DFSF.DFS.ZeroShadow) + DFSF.NonZeroChecks.insert(Shadow); + + DFSF.setShadow(&LI, Shadow); } void DFSanFunction::storeShadow(Value *Addr, uint64_t Size, uint64_t Align, @@ -1050,8 +1068,13 @@ void DFSanVisitor::visitStoreInst(StoreInst &SI) { } else { Align = 1; } - DFSF.storeShadow(SI.getPointerOperand(), Size, Align, - DFSF.getShadow(SI.getValueOperand()), &SI); + + Value* Shadow = DFSF.getShadow(SI.getValueOperand()); + if (ClCombinePointerLabelsOnStore) { + Value *PtrShadow = DFSF.getShadow(SI.getPointerOperand()); + Shadow = DFSF.DFS.combineShadows(Shadow, PtrShadow, &SI); + } + DFSF.storeShadow(SI.getPointerOperand(), Size, Align, Shadow, &SI); } void DFSanVisitor::visitBinaryOperator(BinaryOperator &BO) { diff --git a/test/Instrumentation/DataFlowSanitizer/load.ll b/test/Instrumentation/DataFlowSanitizer/load.ll index 6431213f8be..6cd5151b126 100644 --- a/test/Instrumentation/DataFlowSanitizer/load.ll +++ b/test/Instrumentation/DataFlowSanitizer/load.ll @@ -1,81 +1,155 @@ -; RUN: opt < %s -dfsan -S | FileCheck %s +; RUN: opt < %s -dfsan -dfsan-combine-pointer-labels-on-load=1 -S | FileCheck %s --check-prefix=COMBINE_PTR_LABEL +; RUN: opt < %s -dfsan -dfsan-combine-pointer-labels-on-load=0 -S | FileCheck %s --check-prefix=NO_COMBINE_PTR_LABEL target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" define i8 @load8(i8* %p) { - ; CHECK: @"dfs$load8" - ; CHECK: ptrtoint - ; CHECK: and - ; CHECK: mul - ; CHECK: inttoptr - ; CHECK: load - ; CHECK: store{{.*}}__dfsan_retval_tls - ; CHECK: ret i8 + ; COMBINE_PTR_LABEL: @"dfs$load8" + ; COMBINE_PTR_LABEL: load i16* + ; COMBINE_PTR_LABEL: ptrtoint i8* {{.*}} to i64 + ; COMBINE_PTR_LABEL: and i64 + ; COMBINE_PTR_LABEL: mul i64 + ; COMBINE_PTR_LABEL: inttoptr i64 + ; COMBINE_PTR_LABEL: load i16* + ; COMBINE_PTR_LABEL: icmp ne i16 + ; COMBINE_PTR_LABEL: call zeroext i16 @__dfsan_union + ; COMBINE_PTR_LABEL: load i8* + ; COMBINE_PTR_LABEL: store i16 {{.*}} @__dfsan_retval_tls + ; COMBINE_PTR_LABEL: ret i8 + + ; NO_COMBINE_PTR_LABEL: @"dfs$load8" + ; NO_COMBINE_PTR_LABEL: ptrtoint i8* + ; NO_COMBINE_PTR_LABEL: and i64 + ; NO_COMBINE_PTR_LABEL: mul i64 + ; NO_COMBINE_PTR_LABEL: inttoptr i64 {{.*}} to i16* + ; NO_COMBINE_PTR_LABEL: load i16* + ; NO_COMBINE_PTR_LABEL: load i8* + ; NO_COMBINE_PTR_LABEL: store i16 {{.*}} @__dfsan_retval_tls + ; NO_COMBINE_PTR_LABEL: ret i8 + %a = load i8* %p ret i8 %a } define i16 @load16(i16* %p) { - ; CHECK: @"dfs$load16" - ; CHECK: ptrtoint - ; CHECK: and - ; CHECK: mul - ; CHECK: inttoptr - ; CHECK: load - ; CHECK: load - ; CHECK: icmp ne - ; CHECK: call{{.*}}__dfsan_union - ; CHECK: store{{.*}}__dfsan_retval_tls - ; CHECK: ret i16 + ; COMBINE_PTR_LABEL: @"dfs$load16" + ; COMBINE_PTR_LABEL: ptrtoint i16* + ; COMBINE_PTR_LABEL: and i64 + ; COMBINE_PTR_LABEL: mul i64 + ; COMBINE_PTR_LABEL: inttoptr i64 {{.*}} i16* + ; COMBINE_PTR_LABEL: getelementptr i16 + ; COMBINE_PTR_LABEL: load i16* + ; COMBINE_PTR_LABEL: load i16* + ; COMBINE_PTR_LABEL: icmp ne + ; COMBINE_PTR_LABEL: call {{.*}} @__dfsan_union + ; COMBINE_PTR_LABEL: icmp ne i16 + ; COMBINE_PTR_LABEL: call {{.*}} @__dfsan_union + ; COMBINE_PTR_LABEL: load i16* + ; COMBINE_PTR_LABEL: store {{.*}} @__dfsan_retval_tls + ; COMBINE_PTR_LABEL: ret i16 + + ; NO_COMBINE_PTR_LABEL: @"dfs$load16" + ; NO_COMBINE_PTR_LABEL: ptrtoint i16* + ; NO_COMBINE_PTR_LABEL: and i64 + ; NO_COMBINE_PTR_LABEL: mul i64 + ; NO_COMBINE_PTR_LABEL: inttoptr i64 {{.*}} i16* + ; NO_COMBINE_PTR_LABEL: getelementptr i16* + ; NO_COMBINE_PTR_LABEL: load i16* + ; NO_COMBINE_PTR_LABEL: load i16* + ; NO_COMBINE_PTR_LABEL: icmp ne i16 + ; NO_COMBINE_PTR_LABEL: call {{.*}} @__dfsan_union + ; NO_COMBINE_PTR_LABEL: load i16* + ; NO_COMBINE_PTR_LABEL: store i16 {{.*}} @__dfsan_retval_tls + ; NO_COMBINE_PTR_LABEL: ret i16 + %a = load i16* %p ret i16 %a } define i32 @load32(i32* %p) { - ; CHECK: @"dfs$load32" - ; CHECK: ptrtoint - ; CHECK: and - ; CHECK: mul - ; CHECK: inttoptr - ; CHECK: bitcast - ; CHECK: load - ; CHECK: trunc - ; CHECK: shl - ; CHECK: lshr - ; CHECK: or - ; CHECK: icmp eq + ; COMBINE_PTR_LABEL: @"dfs$load32" + ; COMBINE_PTR_LABEL: ptrtoint i32* + ; COMBINE_PTR_LABEL: and i64 + ; COMBINE_PTR_LABEL: mul i64 + ; COMBINE_PTR_LABEL: inttoptr i64 {{.*}} i16* + ; COMBINE_PTR_LABEL: bitcast i16* {{.*}} i64* + ; COMBINE_PTR_LABEL: load i64* + ; COMBINE_PTR_LABEL: trunc i64 {{.*}} i16 + ; COMBINE_PTR_LABEL: shl i64 + ; COMBINE_PTR_LABEL: lshr i64 + ; COMBINE_PTR_LABEL: or i64 + ; COMBINE_PTR_LABEL: icmp eq i64 + ; COMBINE_PTR_LABEL: icmp ne i16 + ; COMBINE_PTR_LABEL: call {{.*}} @__dfsan_union + ; COMBINE_PTR_LABEL: load i32* + ; COMBINE_PTR_LABEL: store i16 {{.*}} @__dfsan_retval_tls + ; COMBINE_PTR_LABEL: ret i32 + ; COMBINE_PTR_LABEL: call {{.*}} @__dfsan_union_load - ; CHECK: store{{.*}}__dfsan_retval_tls - ; CHECK: ret i32 - - ; CHECK: call{{.*}}__dfsan_union_load + ; NO_COMBINE_PTR_LABEL: @"dfs$load32" + ; NO_COMBINE_PTR_LABEL: ptrtoint i32* + ; NO_COMBINE_PTR_LABEL: and i64 + ; NO_COMBINE_PTR_LABEL: mul i64 + ; NO_COMBINE_PTR_LABEL: inttoptr i64 {{.*}} i16* + ; NO_COMBINE_PTR_LABEL: bitcast i16* {{.*}} i64* + ; NO_COMBINE_PTR_LABEL: load i64* + ; NO_COMBINE_PTR_LABEL: trunc i64 {{.*}} i16 + ; NO_COMBINE_PTR_LABEL: shl i64 + ; NO_COMBINE_PTR_LABEL: lshr i64 + ; NO_COMBINE_PTR_LABEL: or i64 + ; NO_COMBINE_PTR_LABEL: icmp eq i64 + ; NO_COMBINE_PTR_LABEL: load i32* + ; NO_COMBINE_PTR_LABEL: store i16 {{.*}} @__dfsan_retval_tls + ; NO_COMBINE_PTR_LABEL: ret i32 + ; NO_COMBINE_PTR_LABEL: call {{.*}} @__dfsan_union_load + %a = load i32* %p ret i32 %a } define i64 @load64(i64* %p) { - ; CHECK: @"dfs$load64" - ; CHECK: ptrtoint - ; CHECK: and - ; CHECK: mul - ; CHECK: inttoptr - ; CHECK: bitcast - ; CHECK: load - ; CHECK: trunc - ; CHECK: shl - ; CHECK: lshr - ; CHECK: or - ; CHECK: icmp eq - - ; CHECK: store{{.*}}__dfsan_retval_tls - ; CHECK: ret i64 + ; COMBINE_PTR_LABEL: @"dfs$load64" + ; COMBINE_PTR_LABEL: ptrtoint i64* + ; COMBINE_PTR_LABEL: and i64 + ; COMBINE_PTR_LABEL: mul i64 + ; COMBINE_PTR_LABEL: inttoptr i64 {{.*}} i16* + ; COMBINE_PTR_LABEL: bitcast i16* {{.*}} i64* + ; COMBINE_PTR_LABEL: load i64* + ; COMBINE_PTR_LABEL: trunc i64 {{.*}} i16 + ; COMBINE_PTR_LABEL: shl i64 + ; COMBINE_PTR_LABEL: lshr i64 + ; COMBINE_PTR_LABEL: or i64 + ; COMBINE_PTR_LABEL: icmp eq i64 + ; COMBINE_PTR_LABEL: icmp ne i16 + ; COMBINE_PTR_LABEL: call {{.*}} @__dfsan_union + ; COMBINE_PTR_LABEL: load i64* + ; COMBINE_PTR_LABEL: store i16 {{.*}} @__dfsan_retval_tls + ; COMBINE_PTR_LABEL: ret i64 + ; COMBINE_PTR_LABEL: call {{.*}} @__dfsan_union_load + ; COMBINE_PTR_LABEL: getelementptr i64* {{.*}} i64 + ; COMBINE_PTR_LABEL: load i64* + ; COMBINE_PTR_LABEL: icmp eq i64 - ; CHECK: call{{.*}}__dfsan_union_load - - ; CHECK: getelementptr - ; CHECK: load - ; CHECK: icmp eq + ; NO_COMBINE_PTR_LABEL: @"dfs$load64" + ; NO_COMBINE_PTR_LABEL: ptrtoint i64* + ; NO_COMBINE_PTR_LABEL: and i64 + ; NO_COMBINE_PTR_LABEL: mul i64 + ; NO_COMBINE_PTR_LABEL: inttoptr i64 {{.*}} i16* + ; NO_COMBINE_PTR_LABEL: bitcast i16* {{.*}} i64* + ; NO_COMBINE_PTR_LABEL: load i64* + ; NO_COMBINE_PTR_LABEL: trunc i64 {{.*}} i16 + ; NO_COMBINE_PTR_LABEL: shl i64 + ; NO_COMBINE_PTR_LABEL: lshr i64 + ; NO_COMBINE_PTR_LABEL: or i64 + ; NO_COMBINE_PTR_LABEL: icmp eq i64 + ; NO_COMBINE_PTR_LABEL: load i64* + ; NO_COMBINE_PTR_LABEL: store i16 {{.*}} @__dfsan_retval_tls + ; NO_COMBINE_PTR_LABEL: ret i64 + ; NO_COMBINE_PTR_LABEL: call {{.*}} @__dfsan_union_load + ; NO_COMBINE_PTR_LABEL: getelementptr i64* {{.*}} i64 + ; NO_COMBINE_PTR_LABEL: load i64* + ; NO_COMBINE_PTR_LABEL: icmp eq i64 %a = load i64* %p ret i64 %a -} +} \ No newline at end of file diff --git a/test/Instrumentation/DataFlowSanitizer/store.ll b/test/Instrumentation/DataFlowSanitizer/store.ll index 95091777a32..8060537f315 100644 --- a/test/Instrumentation/DataFlowSanitizer/store.ll +++ b/test/Instrumentation/DataFlowSanitizer/store.ll @@ -1,75 +1,146 @@ -; RUN: opt < %s -dfsan -S | FileCheck %s +; RUN: opt < %s -dfsan -dfsan-combine-pointer-labels-on-store=1 -S | FileCheck %s --check-prefix=COMBINE_PTR_LABEL +; RUN: opt < %s -dfsan -dfsan-combine-pointer-labels-on-store=0 -S | FileCheck %s --check-prefix=NO_COMBINE_PTR_LABEL target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" define void @store8(i8 %v, i8* %p) { - ; CHECK: @"dfs$store8" - ; CHECK: load{{.*}}__dfsan_arg_tls - ; CHECK: ptrtoint - ; CHECK: and - ; CHECK: mul - ; CHECK: inttoptr - ; CHECK: getelementptr - ; CHECK: store - ; CHECK: store + ; NO_COMBINE_PTR_LABEL: @"dfs$store8" + ; NO_COMBINE_PTR_LABEL: load i16* {{.*}} @__dfsan_arg_tls + ; NO_COMBINE_PTR_LABEL: ptrtoint i8* {{.*}} i64 + ; NO_COMBINE_PTR_LABEL: and i64 + ; NO_COMBINE_PTR_LABEL: mul i64 + ; NO_COMBINE_PTR_LABEL: inttoptr i64 {{.*}} i16* + ; NO_COMBINE_PTR_LABEL: getelementptr i16* + ; NO_COMBINE_PTR_LABEL: store i16 + ; NO_COMBINE_PTR_LABEL: store i8 + + ; COMBINE_PTR_LABEL: @"dfs$store8" + ; COMBINE_PTR_LABEL: load i16* + ; COMBINE_PTR_LABEL: load i16* + ; COMBINE_PTR_LABEL: icmp ne i16 + ; COMBINE_PTR_LABEL: call {{.*}} @__dfsan_union + ; COMBINE_PTR_LABEL: ptrtoint i8* {{.*}} i64 + ; COMBINE_PTR_LABEL: and i64 + ; COMBINE_PTR_LABEL: mul i64 + ; COMBINE_PTR_LABEL: inttoptr i64 {{.*}} i16* + ; COMBINE_PTR_LABEL: getelementptr i16* + ; COMBINE_PTR_LABEL: store i16 + ; COMBINE_PTR_LABEL: store i8 + store i8 %v, i8* %p ret void } define void @store16(i16 %v, i16* %p) { - ; CHECK: @"dfs$store16" - ; CHECK: load{{.*}}__dfsan_arg_tls - ; CHECK: ptrtoint - ; CHECK: and - ; CHECK: mul - ; CHECK: inttoptr - ; CHECK: getelementptr - ; CHECK: store - ; CHECK: getelementptr - ; CHECK: store - ; CHECK: store + ; NO_COMBINE_PTR_LABEL: @"dfs$store16" + ; NO_COMBINE_PTR_LABEL: load i16* {{.*}} @__dfsan_arg_tls + ; NO_COMBINE_PTR_LABEL: ptrtoint i16* {{.*}} i64 + ; NO_COMBINE_PTR_LABEL: and i64 + ; NO_COMBINE_PTR_LABEL: mul i64 + ; NO_COMBINE_PTR_LABEL: inttoptr i64 {{.*}} i16* + ; NO_COMBINE_PTR_LABEL: getelementptr i16* + ; NO_COMBINE_PTR_LABEL: store i16 + ; NO_COMBINE_PTR_LABEL: getelementptr i16* + ; NO_COMBINE_PTR_LABEL: store i16 + ; NO_COMBINE_PTR_LABEL: store i16 + + ; COMBINE_PTR_LABEL: @"dfs$store16" + ; COMBINE_PTR_LABEL: load i16* {{.*}} @__dfsan_arg_tls + ; COMBINE_PTR_LABEL: load i16* {{.*}} @__dfsan_arg_tls + ; COMBINE_PTR_LABEL: icmp ne i16 + ; COMBINE_PTR_LABEL: call {{.*}} @__dfsan_union + ; COMBINE_PTR_LABEL: ptrtoint i16* {{.*}} i64 + ; COMBINE_PTR_LABEL: and i64 + ; COMBINE_PTR_LABEL: mul i64 + ; COMBINE_PTR_LABEL: inttoptr i64 {{.*}} i16* + ; COMBINE_PTR_LABEL: getelementptr i16* + ; COMBINE_PTR_LABEL: store i16 + ; COMBINE_PTR_LABEL: getelementptr i16* + ; COMBINE_PTR_LABEL: store i16 + ; COMBINE_PTR_LABEL: store i16 + store i16 %v, i16* %p ret void } define void @store32(i32 %v, i32* %p) { - ; CHECK: @"dfs$store32" - ; CHECK: load{{.*}}__dfsan_arg_tls - ; CHECK: ptrtoint - ; CHECK: and - ; CHECK: mul - ; CHECK: inttoptr - ; CHECK: getelementptr - ; CHECK: store - ; CHECK: getelementptr - ; CHECK: store - ; CHECK: getelementptr - ; CHECK: store - ; CHECK: getelementptr - ; CHECK: store - ; CHECK: store + ; NO_COMBINE_PTR_LABEL: @"dfs$store32" + ; NO_COMBINE_PTR_LABEL: load i16* {{.*}} @__dfsan_arg_tls + ; NO_COMBINE_PTR_LABEL: ptrtoint i32* {{.*}} i64 + ; NO_COMBINE_PTR_LABEL: and i64 + ; NO_COMBINE_PTR_LABEL: mul i64 + ; NO_COMBINE_PTR_LABEL: inttoptr i64 {{.*}} i16* + ; NO_COMBINE_PTR_LABEL: getelementptr i16* + ; NO_COMBINE_PTR_LABEL: store i16 + ; NO_COMBINE_PTR_LABEL: getelementptr i16* + ; NO_COMBINE_PTR_LABEL: store i16 + ; NO_COMBINE_PTR_LABEL: getelementptr i16* + ; NO_COMBINE_PTR_LABEL: store i16 + ; NO_COMBINE_PTR_LABEL: getelementptr i16* + ; NO_COMBINE_PTR_LABEL: store i16 + ; NO_COMBINE_PTR_LABEL: store i32 + + ; COMBINE_PTR_LABEL: @"dfs$store32" + ; COMBINE_PTR_LABEL: load i16* {{.*}} @__dfsan_arg_tls + ; COMBINE_PTR_LABEL: load i16* {{.*}} @__dfsan_arg_tls + ; COMBINE_PTR_LABEL: icmp ne i16 + ; COMBINE_PTR_LABEL: call {{.*}} @__dfsan_union + ; COMBINE_PTR_LABEL: ptrtoint i32* {{.*}} i64 + ; COMBINE_PTR_LABEL: and i64 + ; COMBINE_PTR_LABEL: mul i64 + ; COMBINE_PTR_LABEL: inttoptr i64 {{.*}} i16* + ; COMBINE_PTR_LABEL: getelementptr i16* + ; COMBINE_PTR_LABEL: store i16 + ; COMBINE_PTR_LABEL: getelementptr i16* + ; COMBINE_PTR_LABEL: store i16 + ; COMBINE_PTR_LABEL: getelementptr i16* + ; COMBINE_PTR_LABEL: store i16 + ; COMBINE_PTR_LABEL: getelementptr i16* + ; COMBINE_PTR_LABEL: store i16 + ; COMBINE_PTR_LABEL: store i32 + store i32 %v, i32* %p ret void } define void @store64(i64 %v, i64* %p) { - ; CHECK: @"dfs$store64" - ; CHECK: load{{.*}}__dfsan_arg_tls - ; CHECK: ptrtoint - ; CHECK: and - ; CHECK: mul - ; CHECK: inttoptr - ; CHECK: insertelement - ; CHECK: insertelement - ; CHECK: insertelement - ; CHECK: insertelement - ; CHECK: insertelement - ; CHECK: insertelement - ; CHECK: insertelement - ; CHECK: insertelement - ; CHECK: bitcast - ; CHECK: getelementptr - ; CHECK: store - ; CHECK: store + ; NO_COMBINE_PTR_LABEL: @"dfs$store64" + ; NO_COMBINE_PTR_LABEL: load i16* {{.*}} @__dfsan_arg_tls + ; NO_COMBINE_PTR_LABEL: ptrtoint i64* {{.*}} i64 + ; NO_COMBINE_PTR_LABEL: and i64 + ; NO_COMBINE_PTR_LABEL: mul i64 + ; NO_COMBINE_PTR_LABEL: inttoptr i64 {{.*}} i16* + ; NO_COMBINE_PTR_LABEL: insertelement {{.*}} i16 + ; NO_COMBINE_PTR_LABEL: insertelement {{.*}} i16 + ; NO_COMBINE_PTR_LABEL: insertelement {{.*}} i16 + ; NO_COMBINE_PTR_LABEL: insertelement {{.*}} i16 + ; NO_COMBINE_PTR_LABEL: insertelement {{.*}} i16 + ; NO_COMBINE_PTR_LABEL: insertelement {{.*}} i16 + ; NO_COMBINE_PTR_LABEL: insertelement {{.*}} i16 + ; NO_COMBINE_PTR_LABEL: insertelement {{.*}} i16 + ; NO_COMBINE_PTR_LABEL: bitcast i16* {{.*}} <8 x i16>* + ; NO_COMBINE_PTR_LABEL: store i64 + + ; COMBINE_PTR_LABEL: @"dfs$store64" + ; COMBINE_PTR_LABEL: load i16* {{.*}} @__dfsan_arg_tls + ; COMBINE_PTR_LABEL: load i16* {{.*}} @__dfsan_arg_tls + ; COMBINE_PTR_LABEL: icmp ne i16 + ; COMBINE_PTR_LABEL: call {{.*}} @__dfsan_union + ; COMBINE_PTR_LABEL: ptrtoint i64* {{.*}} i64 + ; COMBINE_PTR_LABEL: and i64 + ; COMBINE_PTR_LABEL: mul i64 + ; COMBINE_PTR_LABEL: inttoptr i64 {{.*}} i16* + ; COMBINE_PTR_LABEL: insertelement {{.*}} i16 + ; COMBINE_PTR_LABEL: insertelement {{.*}} i16 + ; COMBINE_PTR_LABEL: insertelement {{.*}} i16 + ; COMBINE_PTR_LABEL: insertelement {{.*}} i16 + ; COMBINE_PTR_LABEL: insertelement {{.*}} i16 + ; COMBINE_PTR_LABEL: insertelement {{.*}} i16 + ; COMBINE_PTR_LABEL: insertelement {{.*}} i16 + ; COMBINE_PTR_LABEL: insertelement {{.*}} i16 + ; COMBINE_PTR_LABEL: bitcast i16* {{.*}} <8 x i16>* + ; COMBINE_PTR_LABEL: store <8 x i16> + ; COMBINE_PTR_LABEL: store i64 + store i64 %v, i64* %p ret void }