Skip to content

Commit

Permalink
post merge-with-main bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Nagy committed Aug 14, 2024
1 parent d62dde7 commit 0a86a04
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1751,11 +1751,11 @@ void AddressSanitizer::instrumentMop(ObjectSizeOffsetVisitor &ObjSizeVis,
InstrumentationIRBuilder IRB(InsertPoint);
InsertPoint = SplitBlockAndInsertIfThen(
IRB.CreateNot(IRB.CreateLoad(IRB.getInt1Ty(), DormantAsanFlag)),
<<<<<<< HEAD
InsertPoint, false);
=======
InsertPoint, false, MDBuilder(*C).createUnlikelyBranchWeights());
}

unsigned Granularity = 1 << Mapping.Scale;
if (O.MaybeMask) {
instrumentMaskedLoadOrStore(this, DL, IntptrTy, O.MaybeMask, O.MaybeEVL,
O.MaybeStride, InsertPoint, Addr, O.Alignment,
Granularity, O.OpType, O.IsWrite, nullptr,
Expand Down
6 changes: 3 additions & 3 deletions llvm/test/Instrumentation/AddressSanitizer/dormant.ll
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ define dso_local i32 @test(ptr %a) sanitize_address {
; CHECK-NEXT: [[TMP0:%.*]] = load ptr, ptr [[A_ADDR]], align 8
; CHECK-NEXT: [[TMP1:%.*]] = load i1, ptr @__asan_is_dormant, align 1
; CHECK-NEXT: [[TMP2:%.*]] = xor i1 [[TMP1]], true
; CHECK-NEXT: br i1 [[TMP2]], label %[[BB3:.*]], label %[[BB17:.*]]
; CHECK-NEXT: br i1 [[TMP2]], label %[[BB3:.*]], label %[[BB17:.*]], !prof [[PROF7:![0-9]+]]
; CHECK: [[BB3]]:
; CHECK-NEXT: [[TMP4:%.*]] = ptrtoint ptr [[TMP0]] to i64
; CHECK-NEXT: [[TMP5:%.*]] = lshr i64 [[TMP4]], 3
; CHECK-NEXT: [[TMP6:%.*]] = add i64 [[TMP5]], 2147450880
; CHECK-NEXT: [[TMP7:%.*]] = inttoptr i64 [[TMP6]] to ptr
; CHECK-NEXT: [[TMP8:%.*]] = load i8, ptr [[TMP7]], align 1
; CHECK-NEXT: [[TMP9:%.*]] = icmp ne i8 [[TMP8]], 0
; CHECK-NEXT: br i1 [[TMP9]], label %[[BB10:.*]], label %[[BB16:.*]], !prof [[PROF7:![0-9]+]]
; CHECK-NEXT: br i1 [[TMP9]], label %[[BB10:.*]], label %[[BB16:.*]], !prof [[PROF7]]
; CHECK: [[BB10]]:
; CHECK-NEXT: [[TMP11:%.*]] = and i64 [[TMP4]], 7
; CHECK-NEXT: [[TMP12:%.*]] = add i64 [[TMP11]], 3
Expand All @@ -39,7 +39,7 @@ define dso_local i32 @test(ptr %a) sanitize_address {
; CHECK-NEXT: [[TMP18:%.*]] = load ptr, ptr [[A_ADDR]], align 8
; CHECK-NEXT: [[TMP19:%.*]] = load i1, ptr @__asan_is_dormant, align 1
; CHECK-NEXT: [[TMP20:%.*]] = xor i1 [[TMP19]], true
; CHECK-NEXT: br i1 [[TMP20]], label %[[BB21:.*]], label %[[BB35:.*]]
; CHECK-NEXT: br i1 [[TMP20]], label %[[BB21:.*]], label %[[BB35:.*]], !prof [[PROF7]]
; CHECK: [[BB21]]:
; CHECK-NEXT: [[TMP22:%.*]] = ptrtoint ptr [[TMP18]] to i64
; CHECK-NEXT: [[TMP23:%.*]] = lshr i64 [[TMP22]], 3
Expand Down

0 comments on commit 0a86a04

Please sign in to comment.