llvm.org GIT mirror llvm / f3c0314
DataFlowSanitizer: correctly combine labels in the case where they are equal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189133 91177308-0d34-0410-b5e6-96231b3b80d8 Peter Collingbourne 7 years ago
2 changed file(s) with 6 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
774774 BasicBlock *Tail = BI->getSuccessor(0);
775775 PHINode *Phi = PHINode::Create(ShadowTy, 2, "", Tail->begin());
776776 Phi->addIncoming(Call, Call->getParent());
777 Phi->addIncoming(ZeroShadow, Head);
777 Phi->addIncoming(V1, Head);
778778 Pos = Phi;
779779 return Phi;
780780 } else {
22
33 define i8 @add(i8 %a, i8 %b) {
44 ; CHECK: @"dfs$add"
5 ; CHECK: load{{.*}}__dfsan_arg_tls
6 ; CHECK: load{{.*}}__dfsan_arg_tls
7 ; CHECK: call{{.*}}__dfsan_union
5 ; CHECK-DAG: %[[ALABEL:.*]] = load{{.*}}__dfsan_arg_tls, i64 0, i64 0
6 ; CHECK-DAG: %[[BLABEL:.*]] = load{{.*}}__dfsan_arg_tls, i64 0, i64 1
7 ; CHECK: %[[UNION:.*]] = call{{.*}}__dfsan_union(i16 zeroext %[[ALABEL]], i16 zeroext %[[BLABEL]])
8 ; CHECK: %[[ADDLABEL:.*]] = phi i16 [ %[[UNION]], {{.*}} ], [ %[[ALABEL]], {{.*}} ]
89 ; CHECK: add i8
9 ; CHECK: store{{.*}}__dfsan_retval_tls
10 ; CHECK: store i16 %[[ADDLABEL]], i16* @__dfsan_retval_tls
1011 ; CHECK: ret i8
1112 %c = add i8 %a, %b
1213 ret i8 %c