diff --git a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp index 69e5835bee8a5e..a7e7f9a570dac7 100644 --- a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp @@ -598,6 +598,41 @@ void HWAddressSanitizer::initializeModule() { LLVM_DEBUG(dbgs() << "Init " << M.getName() << "\n"); TargetTriple = Triple(M.getTargetTriple()); + for (auto &F : M.functions()) { + // Remove memory attributes that are invalid with HWASan. + // HWASan checks read from shadow, which invalidates memory(argmem: *) + // Short granule checks on function arguments read from the argument memory + // (last byte of the granule), which invalidates writeonly. + // + // This is not only true for sanitized functions, because AttrInfer can + // infer those attributes on libc functions, which is not true if those + // are instrumented (Android) or intercepted. + + // The API is weird. `onlyReadsMemory` actually means "does not write", and + // `onlyWritesMemory` actually means "does not read". So we reconstruct + // "accesses memory" && "does not read" <=> "writes". + bool Changed = false; + if (!F.doesNotAccessMemory()) { + bool WritesMemory = !F.onlyReadsMemory(); + bool ReadsMemory = !F.onlyWritesMemory(); + if ((WritesMemory && !ReadsMemory) || F.onlyAccessesArgMemory()) { + F.removeFnAttr(Attribute::Memory); + Changed = true; + } + } + for (Argument &A : F.args()) { + if (A.hasAttribute(Attribute::WriteOnly)) { + Changed = true; + A.removeAttr(Attribute::WriteOnly); + } + } + if (Changed) { + // nobuiltin makes sure later passes don't restore assumptions about + // the function. + F.addFnAttr(Attribute::NoBuiltin); + } + } + // x86_64 currently has two modes: // - Intel LAM (default) // - pointer aliasing (heap only) @@ -1622,14 +1657,6 @@ void HWAddressSanitizer::sanitizeFunction(Function &F, assert(!ShadowBase); - // Remove memory attributes that are about to become invalid. - // HWASan checks read from shadow, which invalidates memory(argmem: *) - // Short granule checks on function arguments read from the argument memory - // (last byte of the granule), which invalidates writeonly. - F.removeFnAttr(llvm::Attribute::Memory); - for (auto &A : F.args()) - A.removeAttr(llvm::Attribute::WriteOnly); - BasicBlock::iterator InsertPt = F.getEntryBlock().begin(); IRBuilder<> EntryIRB(&F.getEntryBlock(), InsertPt); emitPrologue(EntryIRB, diff --git a/llvm/test/Instrumentation/HWAddressSanitizer/RISCV/alloca.ll b/llvm/test/Instrumentation/HWAddressSanitizer/RISCV/alloca.ll index 23b1043c700165..5fd9dc6eede211 100644 --- a/llvm/test/Instrumentation/HWAddressSanitizer/RISCV/alloca.ll +++ b/llvm/test/Instrumentation/HWAddressSanitizer/RISCV/alloca.ll @@ -33,7 +33,7 @@ declare void @use32(ptr) ;. define void @test_alloca() sanitize_hwaddress !dbg !15 { ; DYNAMIC-SHADOW-LABEL: define void @test_alloca -; DYNAMIC-SHADOW-SAME: () #[[ATTR0:[0-9]+]] personality ptr @__hwasan_personality_thunk !dbg [[DBG7:![0-9]+]] { +; DYNAMIC-SHADOW-SAME: () #[[ATTR0:[0-9]+]] personality ptr @__hwasan_personality_thunk !dbg [[DBG8:![0-9]+]] { ; DYNAMIC-SHADOW-NEXT: entry: ; DYNAMIC-SHADOW-NEXT: [[DOTHWASAN_SHADOW:%.*]] = call ptr asm "", "=r,0"(ptr @__hwasan_shadow) ; DYNAMIC-SHADOW-NEXT: [[TMP0:%.*]] = call ptr @llvm.frameaddress.p0(i32 0) @@ -42,33 +42,33 @@ define void @test_alloca() sanitize_hwaddress !dbg !15 { ; DYNAMIC-SHADOW-NEXT: [[HWASAN_STACK_BASE_TAG:%.*]] = xor i64 [[TMP1]], [[TMP2]] ; DYNAMIC-SHADOW-NEXT: [[HWASAN_UAR_TAG:%.*]] = lshr i64 [[TMP1]], 56 ; DYNAMIC-SHADOW-NEXT: [[X:%.*]] = alloca { i32, [12 x i8] }, align 16 -; DYNAMIC-SHADOW-NEXT: #dbg_value(!DIArgList(ptr [[X]], ptr [[X]]), [[META10:![0-9]+]], !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_tag_offset, 0, DW_OP_LLVM_arg, 1, DW_OP_LLVM_tag_offset, 0, DW_OP_plus, DW_OP_deref), [[META12:![0-9]+]]) -; DYNAMIC-SHADOW-NEXT: [[TMP3:%.*]] = xor i64 [[HWASAN_STACK_BASE_TAG]], 0, !dbg [[DBG13:![0-9]+]] -; DYNAMIC-SHADOW-NEXT: [[TMP4:%.*]] = ptrtoint ptr [[X]] to i64, !dbg [[DBG13]] -; DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = and i64 [[TMP4]], 72057594037927935, !dbg [[DBG13]] -; DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = shl i64 [[TMP3]], 56, !dbg [[DBG13]] -; DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = or i64 [[TMP5]], [[TMP6]], !dbg [[DBG13]] -; DYNAMIC-SHADOW-NEXT: [[X_HWASAN:%.*]] = inttoptr i64 [[TMP7]] to ptr, !dbg [[DBG13]] -; DYNAMIC-SHADOW-NEXT: [[TMP8:%.*]] = trunc i64 [[TMP3]] to i8, !dbg [[DBG13]] -; DYNAMIC-SHADOW-NEXT: [[TMP9:%.*]] = ptrtoint ptr [[X]] to i64, !dbg [[DBG13]] -; DYNAMIC-SHADOW-NEXT: [[TMP10:%.*]] = and i64 [[TMP9]], 72057594037927935, !dbg [[DBG13]] -; DYNAMIC-SHADOW-NEXT: [[TMP11:%.*]] = lshr i64 [[TMP10]], 4, !dbg [[DBG13]] -; DYNAMIC-SHADOW-NEXT: [[TMP12:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP11]], !dbg [[DBG13]] -; DYNAMIC-SHADOW-NEXT: [[TMP13:%.*]] = getelementptr i8, ptr [[TMP12]], i32 0, !dbg [[DBG13]] -; DYNAMIC-SHADOW-NEXT: store i8 4, ptr [[TMP13]], align 1, !dbg [[DBG13]] -; DYNAMIC-SHADOW-NEXT: [[TMP14:%.*]] = getelementptr i8, ptr [[X]], i32 15, !dbg [[DBG13]] -; DYNAMIC-SHADOW-NEXT: store i8 [[TMP8]], ptr [[TMP14]], align 1, !dbg [[DBG13]] -; DYNAMIC-SHADOW-NEXT: call void @use32(ptr nonnull [[X_HWASAN]]), !dbg [[DBG13]] -; DYNAMIC-SHADOW-NEXT: [[TMP15:%.*]] = trunc i64 [[HWASAN_UAR_TAG]] to i8, !dbg [[DBG14:![0-9]+]] -; DYNAMIC-SHADOW-NEXT: [[TMP16:%.*]] = ptrtoint ptr [[X]] to i64, !dbg [[DBG14]] -; DYNAMIC-SHADOW-NEXT: [[TMP17:%.*]] = and i64 [[TMP16]], 72057594037927935, !dbg [[DBG14]] -; DYNAMIC-SHADOW-NEXT: [[TMP18:%.*]] = lshr i64 [[TMP17]], 4, !dbg [[DBG14]] -; DYNAMIC-SHADOW-NEXT: [[TMP19:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP18]], !dbg [[DBG14]] -; DYNAMIC-SHADOW-NEXT: call void @llvm.memset.p0.i64(ptr align 1 [[TMP19]], i8 [[TMP15]], i64 1, i1 false), !dbg [[DBG14]] -; DYNAMIC-SHADOW-NEXT: ret void, !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: #dbg_value(!DIArgList(ptr [[X]], ptr [[X]]), [[META11:![0-9]+]], !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_tag_offset, 0, DW_OP_LLVM_arg, 1, DW_OP_LLVM_tag_offset, 0, DW_OP_plus, DW_OP_deref), [[META13:![0-9]+]]) +; DYNAMIC-SHADOW-NEXT: [[TMP3:%.*]] = xor i64 [[HWASAN_STACK_BASE_TAG]], 0, !dbg [[DBG14:![0-9]+]] +; DYNAMIC-SHADOW-NEXT: [[TMP4:%.*]] = ptrtoint ptr [[X]] to i64, !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = and i64 [[TMP4]], 72057594037927935, !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = shl i64 [[TMP3]], 56, !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = or i64 [[TMP5]], [[TMP6]], !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: [[X_HWASAN:%.*]] = inttoptr i64 [[TMP7]] to ptr, !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: [[TMP8:%.*]] = trunc i64 [[TMP3]] to i8, !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: [[TMP9:%.*]] = ptrtoint ptr [[X]] to i64, !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: [[TMP10:%.*]] = and i64 [[TMP9]], 72057594037927935, !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: [[TMP11:%.*]] = lshr i64 [[TMP10]], 4, !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: [[TMP12:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP11]], !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: [[TMP13:%.*]] = getelementptr i8, ptr [[TMP12]], i32 0, !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: store i8 4, ptr [[TMP13]], align 1, !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: [[TMP14:%.*]] = getelementptr i8, ptr [[X]], i32 15, !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: store i8 [[TMP8]], ptr [[TMP14]], align 1, !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: call void @use32(ptr nonnull [[X_HWASAN]]), !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: [[TMP15:%.*]] = trunc i64 [[HWASAN_UAR_TAG]] to i8, !dbg [[DBG15:![0-9]+]] +; DYNAMIC-SHADOW-NEXT: [[TMP16:%.*]] = ptrtoint ptr [[X]] to i64, !dbg [[DBG15]] +; DYNAMIC-SHADOW-NEXT: [[TMP17:%.*]] = and i64 [[TMP16]], 72057594037927935, !dbg [[DBG15]] +; DYNAMIC-SHADOW-NEXT: [[TMP18:%.*]] = lshr i64 [[TMP17]], 4, !dbg [[DBG15]] +; DYNAMIC-SHADOW-NEXT: [[TMP19:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP18]], !dbg [[DBG15]] +; DYNAMIC-SHADOW-NEXT: call void @llvm.memset.p0.i64(ptr align 1 [[TMP19]], i8 [[TMP15]], i64 1, i1 false), !dbg [[DBG15]] +; DYNAMIC-SHADOW-NEXT: ret void, !dbg [[DBG15]] ; ; ZERO-BASED-SHADOW-LABEL: define void @test_alloca -; ZERO-BASED-SHADOW-SAME: () #[[ATTR0:[0-9]+]] personality ptr @__hwasan_personality_thunk !dbg [[DBG7:![0-9]+]] { +; ZERO-BASED-SHADOW-SAME: () #[[ATTR0:[0-9]+]] personality ptr @__hwasan_personality_thunk !dbg [[DBG8:![0-9]+]] { ; ZERO-BASED-SHADOW-NEXT: entry: ; ZERO-BASED-SHADOW-NEXT: [[DOTHWASAN_SHADOW:%.*]] = call ptr asm "", "=r,0"(ptr null) ; ZERO-BASED-SHADOW-NEXT: [[TMP0:%.*]] = call ptr @llvm.frameaddress.p0(i32 0) @@ -77,30 +77,30 @@ define void @test_alloca() sanitize_hwaddress !dbg !15 { ; ZERO-BASED-SHADOW-NEXT: [[HWASAN_STACK_BASE_TAG:%.*]] = xor i64 [[TMP1]], [[TMP2]] ; ZERO-BASED-SHADOW-NEXT: [[HWASAN_UAR_TAG:%.*]] = lshr i64 [[TMP1]], 56 ; ZERO-BASED-SHADOW-NEXT: [[X:%.*]] = alloca { i32, [12 x i8] }, align 16 -; ZERO-BASED-SHADOW-NEXT: #dbg_value(!DIArgList(ptr [[X]], ptr [[X]]), [[META10:![0-9]+]], !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_tag_offset, 0, DW_OP_LLVM_arg, 1, DW_OP_LLVM_tag_offset, 0, DW_OP_plus, DW_OP_deref), [[META12:![0-9]+]]) -; ZERO-BASED-SHADOW-NEXT: [[TMP3:%.*]] = xor i64 [[HWASAN_STACK_BASE_TAG]], 0, !dbg [[DBG13:![0-9]+]] -; ZERO-BASED-SHADOW-NEXT: [[TMP4:%.*]] = ptrtoint ptr [[X]] to i64, !dbg [[DBG13]] -; ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = and i64 [[TMP4]], 72057594037927935, !dbg [[DBG13]] -; ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = shl i64 [[TMP3]], 56, !dbg [[DBG13]] -; ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = or i64 [[TMP5]], [[TMP6]], !dbg [[DBG13]] -; ZERO-BASED-SHADOW-NEXT: [[X_HWASAN:%.*]] = inttoptr i64 [[TMP7]] to ptr, !dbg [[DBG13]] -; ZERO-BASED-SHADOW-NEXT: [[TMP8:%.*]] = trunc i64 [[TMP3]] to i8, !dbg [[DBG13]] -; ZERO-BASED-SHADOW-NEXT: [[TMP9:%.*]] = ptrtoint ptr [[X]] to i64, !dbg [[DBG13]] -; ZERO-BASED-SHADOW-NEXT: [[TMP10:%.*]] = and i64 [[TMP9]], 72057594037927935, !dbg [[DBG13]] -; ZERO-BASED-SHADOW-NEXT: [[TMP11:%.*]] = lshr i64 [[TMP10]], 4, !dbg [[DBG13]] -; ZERO-BASED-SHADOW-NEXT: [[TMP12:%.*]] = inttoptr i64 [[TMP11]] to ptr, !dbg [[DBG13]] -; ZERO-BASED-SHADOW-NEXT: [[TMP13:%.*]] = getelementptr i8, ptr [[TMP12]], i32 0, !dbg [[DBG13]] -; ZERO-BASED-SHADOW-NEXT: store i8 4, ptr [[TMP13]], align 1, !dbg [[DBG13]] -; ZERO-BASED-SHADOW-NEXT: [[TMP14:%.*]] = getelementptr i8, ptr [[X]], i32 15, !dbg [[DBG13]] -; ZERO-BASED-SHADOW-NEXT: store i8 [[TMP8]], ptr [[TMP14]], align 1, !dbg [[DBG13]] -; ZERO-BASED-SHADOW-NEXT: call void @use32(ptr nonnull [[X_HWASAN]]), !dbg [[DBG13]] -; ZERO-BASED-SHADOW-NEXT: [[TMP15:%.*]] = trunc i64 [[HWASAN_UAR_TAG]] to i8, !dbg [[DBG14:![0-9]+]] -; ZERO-BASED-SHADOW-NEXT: [[TMP16:%.*]] = ptrtoint ptr [[X]] to i64, !dbg [[DBG14]] -; ZERO-BASED-SHADOW-NEXT: [[TMP17:%.*]] = and i64 [[TMP16]], 72057594037927935, !dbg [[DBG14]] -; ZERO-BASED-SHADOW-NEXT: [[TMP18:%.*]] = lshr i64 [[TMP17]], 4, !dbg [[DBG14]] -; ZERO-BASED-SHADOW-NEXT: [[TMP19:%.*]] = inttoptr i64 [[TMP18]] to ptr, !dbg [[DBG14]] -; ZERO-BASED-SHADOW-NEXT: call void @llvm.memset.p0.i64(ptr align 1 [[TMP19]], i8 [[TMP15]], i64 1, i1 false), !dbg [[DBG14]] -; ZERO-BASED-SHADOW-NEXT: ret void, !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: #dbg_value(!DIArgList(ptr [[X]], ptr [[X]]), [[META11:![0-9]+]], !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_tag_offset, 0, DW_OP_LLVM_arg, 1, DW_OP_LLVM_tag_offset, 0, DW_OP_plus, DW_OP_deref), [[META13:![0-9]+]]) +; ZERO-BASED-SHADOW-NEXT: [[TMP3:%.*]] = xor i64 [[HWASAN_STACK_BASE_TAG]], 0, !dbg [[DBG14:![0-9]+]] +; ZERO-BASED-SHADOW-NEXT: [[TMP4:%.*]] = ptrtoint ptr [[X]] to i64, !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = and i64 [[TMP4]], 72057594037927935, !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = shl i64 [[TMP3]], 56, !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = or i64 [[TMP5]], [[TMP6]], !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: [[X_HWASAN:%.*]] = inttoptr i64 [[TMP7]] to ptr, !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: [[TMP8:%.*]] = trunc i64 [[TMP3]] to i8, !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: [[TMP9:%.*]] = ptrtoint ptr [[X]] to i64, !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: [[TMP10:%.*]] = and i64 [[TMP9]], 72057594037927935, !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: [[TMP11:%.*]] = lshr i64 [[TMP10]], 4, !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: [[TMP12:%.*]] = inttoptr i64 [[TMP11]] to ptr, !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: [[TMP13:%.*]] = getelementptr i8, ptr [[TMP12]], i32 0, !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: store i8 4, ptr [[TMP13]], align 1, !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: [[TMP14:%.*]] = getelementptr i8, ptr [[X]], i32 15, !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: store i8 [[TMP8]], ptr [[TMP14]], align 1, !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: call void @use32(ptr nonnull [[X_HWASAN]]), !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: [[TMP15:%.*]] = trunc i64 [[HWASAN_UAR_TAG]] to i8, !dbg [[DBG15:![0-9]+]] +; ZERO-BASED-SHADOW-NEXT: [[TMP16:%.*]] = ptrtoint ptr [[X]] to i64, !dbg [[DBG15]] +; ZERO-BASED-SHADOW-NEXT: [[TMP17:%.*]] = and i64 [[TMP16]], 72057594037927935, !dbg [[DBG15]] +; ZERO-BASED-SHADOW-NEXT: [[TMP18:%.*]] = lshr i64 [[TMP17]], 4, !dbg [[DBG15]] +; ZERO-BASED-SHADOW-NEXT: [[TMP19:%.*]] = inttoptr i64 [[TMP18]] to ptr, !dbg [[DBG15]] +; ZERO-BASED-SHADOW-NEXT: call void @llvm.memset.p0.i64(ptr align 1 [[TMP19]], i8 [[TMP15]], i64 1, i1 false), !dbg [[DBG15]] +; ZERO-BASED-SHADOW-NEXT: ret void, !dbg [[DBG15]] ; entry: %x = alloca i32, align 4 @@ -147,15 +147,16 @@ declare void @llvm.dbg.value(metadata, metadata, metadata) ; DYNAMIC-SHADOW: [[META3]] = !{} ; DYNAMIC-SHADOW: [[META4:![0-9]+]] = !{i32 7, !"Dwarf Version", i32 4} ; DYNAMIC-SHADOW: [[META5:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3} -; DYNAMIC-SHADOW: [[META6:![0-9]+]] = !{!"{{.*}}clang version {{.*}}"} -; DYNAMIC-SHADOW: [[DBG7]] = distinct !DISubprogram(name: "test_alloca", linkageName: "_Z11test_allocav", scope: [[META2]], file: [[META2]], line: 4, type: [[META8:![0-9]+]], scopeLine: 4, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: [[META1]], retainedNodes: [[META3]]) -; DYNAMIC-SHADOW: [[META8]] = !DISubroutineType(types: [[META9:![0-9]+]]) -; DYNAMIC-SHADOW: [[META9]] = !{null} -; DYNAMIC-SHADOW: [[META10]] = !DILocalVariable(name: "x", scope: [[DBG7]], file: [[META2]], line: 5, type: [[META11:![0-9]+]]) -; DYNAMIC-SHADOW: [[META11]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -; DYNAMIC-SHADOW: [[META12]] = !DILocation(line: 0, scope: [[DBG7]]) -; DYNAMIC-SHADOW: [[DBG13]] = !DILocation(line: 7, column: 5, scope: [[DBG7]]) -; DYNAMIC-SHADOW: [[DBG14]] = !DILocation(line: 8, column: 1, scope: [[DBG7]]) +; DYNAMIC-SHADOW: [[META6:![0-9]+]] = !{i32 4, !"nosanitize_hwaddress", i32 1} +; DYNAMIC-SHADOW: [[META7:![0-9]+]] = !{!"{{.*}}clang version {{.*}}"} +; DYNAMIC-SHADOW: [[DBG8]] = distinct !DISubprogram(name: "test_alloca", linkageName: "_Z11test_allocav", scope: [[META2]], file: [[META2]], line: 4, type: [[META9:![0-9]+]], scopeLine: 4, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: [[META1]], retainedNodes: [[META3]]) +; DYNAMIC-SHADOW: [[META9]] = !DISubroutineType(types: [[META10:![0-9]+]]) +; DYNAMIC-SHADOW: [[META10]] = !{null} +; DYNAMIC-SHADOW: [[META11]] = !DILocalVariable(name: "x", scope: [[DBG8]], file: [[META2]], line: 5, type: [[META12:![0-9]+]]) +; DYNAMIC-SHADOW: [[META12]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +; DYNAMIC-SHADOW: [[META13]] = !DILocation(line: 0, scope: [[DBG8]]) +; DYNAMIC-SHADOW: [[DBG14]] = !DILocation(line: 7, column: 5, scope: [[DBG8]]) +; DYNAMIC-SHADOW: [[DBG15]] = !DILocation(line: 8, column: 1, scope: [[DBG8]]) ;. ; ZERO-BASED-SHADOW: [[META0]] = !{ptr @hwasan.note} ; ZERO-BASED-SHADOW: [[META1:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: [[META2:![0-9]+]], producer: "{{.*}}clang version {{.*}}", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: [[META3:![0-9]+]], splitDebugInlining: false, nameTableKind: None) @@ -163,13 +164,14 @@ declare void @llvm.dbg.value(metadata, metadata, metadata) ; ZERO-BASED-SHADOW: [[META3]] = !{} ; ZERO-BASED-SHADOW: [[META4:![0-9]+]] = !{i32 7, !"Dwarf Version", i32 4} ; ZERO-BASED-SHADOW: [[META5:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3} -; ZERO-BASED-SHADOW: [[META6:![0-9]+]] = !{!"{{.*}}clang version {{.*}}"} -; ZERO-BASED-SHADOW: [[DBG7]] = distinct !DISubprogram(name: "test_alloca", linkageName: "_Z11test_allocav", scope: [[META2]], file: [[META2]], line: 4, type: [[META8:![0-9]+]], scopeLine: 4, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: [[META1]], retainedNodes: [[META3]]) -; ZERO-BASED-SHADOW: [[META8]] = !DISubroutineType(types: [[META9:![0-9]+]]) -; ZERO-BASED-SHADOW: [[META9]] = !{null} -; ZERO-BASED-SHADOW: [[META10]] = !DILocalVariable(name: "x", scope: [[DBG7]], file: [[META2]], line: 5, type: [[META11:![0-9]+]]) -; ZERO-BASED-SHADOW: [[META11]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -; ZERO-BASED-SHADOW: [[META12]] = !DILocation(line: 0, scope: [[DBG7]]) -; ZERO-BASED-SHADOW: [[DBG13]] = !DILocation(line: 7, column: 5, scope: [[DBG7]]) -; ZERO-BASED-SHADOW: [[DBG14]] = !DILocation(line: 8, column: 1, scope: [[DBG7]]) +; ZERO-BASED-SHADOW: [[META6:![0-9]+]] = !{i32 4, !"nosanitize_hwaddress", i32 1} +; ZERO-BASED-SHADOW: [[META7:![0-9]+]] = !{!"{{.*}}clang version {{.*}}"} +; ZERO-BASED-SHADOW: [[DBG8]] = distinct !DISubprogram(name: "test_alloca", linkageName: "_Z11test_allocav", scope: [[META2]], file: [[META2]], line: 4, type: [[META9:![0-9]+]], scopeLine: 4, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: [[META1]], retainedNodes: [[META3]]) +; ZERO-BASED-SHADOW: [[META9]] = !DISubroutineType(types: [[META10:![0-9]+]]) +; ZERO-BASED-SHADOW: [[META10]] = !{null} +; ZERO-BASED-SHADOW: [[META11]] = !DILocalVariable(name: "x", scope: [[DBG8]], file: [[META2]], line: 5, type: [[META12:![0-9]+]]) +; ZERO-BASED-SHADOW: [[META12]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +; ZERO-BASED-SHADOW: [[META13]] = !DILocation(line: 0, scope: [[DBG8]]) +; ZERO-BASED-SHADOW: [[DBG14]] = !DILocation(line: 7, column: 5, scope: [[DBG8]]) +; ZERO-BASED-SHADOW: [[DBG15]] = !DILocation(line: 8, column: 1, scope: [[DBG8]]) ;. diff --git a/llvm/test/Instrumentation/HWAddressSanitizer/RISCV/basic.ll b/llvm/test/Instrumentation/HWAddressSanitizer/RISCV/basic.ll index 9cebe2e845f772..5415b081286631 100644 --- a/llvm/test/Instrumentation/HWAddressSanitizer/RISCV/basic.ll +++ b/llvm/test/Instrumentation/HWAddressSanitizer/RISCV/basic.ll @@ -9,8 +9,6 @@ ; RUN: opt < %s -passes=hwasan -hwasan-recover=0 -hwasan-mapping-offset=0 -S | FileCheck %s --check-prefixes=ABORT-ZERO-BASED-SHADOW ; RUN: opt < %s -passes=hwasan -hwasan-recover=1 -hwasan-mapping-offset=0 -S | FileCheck %s --check-prefixes=RECOVER-ZERO-BASED-SHADOW -; CHECK: @llvm.used = appending global [1 x ptr] [ptr @hwasan.module_ctor] -; CHECK: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 0, ptr @hwasan.module_ctor, ptr @hwasan.module_ctor }] target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" target triple = "riscv64-unknown-linux" @@ -32,7 +30,7 @@ define i8 @test_load8(ptr %a) sanitize_hwaddress { ; CHECK-NEXT: [[TMP9:%.*]] = getelementptr i8, ptr [[TMP3]], i64 [[TMP8]] ; CHECK-NEXT: [[TMP10:%.*]] = load i8, ptr [[TMP9]], align 1 ; CHECK-NEXT: [[TMP11:%.*]] = icmp ne i8 [[TMP6]], [[TMP10]] -; CHECK-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF1:![0-9]+]] +; CHECK-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF2:![0-9]+]] ; CHECK: 12: ; CHECK-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[TMP3]], ptr [[A]], i32 0) ; CHECK-NEXT: br label [[TMP13]] @@ -68,7 +66,7 @@ define i8 @test_load8(ptr %a) sanitize_hwaddress { ; FASTPATH-NEXT: [[TMP9:%.*]] = getelementptr i8, ptr [[TMP3]], i64 [[TMP8]] ; FASTPATH-NEXT: [[TMP10:%.*]] = load i8, ptr [[TMP9]], align 1 ; FASTPATH-NEXT: [[TMP11:%.*]] = icmp ne i8 [[TMP6]], [[TMP10]] -; FASTPATH-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF1:![0-9]+]] +; FASTPATH-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF2:![0-9]+]] ; FASTPATH: 12: ; FASTPATH-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[TMP3]], ptr [[A]], i32 0) ; FASTPATH-NEXT: br label [[TMP13]] @@ -88,7 +86,7 @@ define i8 @test_load8(ptr %a) sanitize_hwaddress { ; ABORT-DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; ABORT-DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; ABORT-DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; ABORT-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF1:![0-9]+]] +; ABORT-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF2:![0-9]+]] ; ABORT-DYNAMIC-SHADOW: 8: ; ABORT-DYNAMIC-SHADOW-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 0) ; ABORT-DYNAMIC-SHADOW-NEXT: br label [[TMP9]] @@ -108,10 +106,10 @@ define i8 @test_load8(ptr %a) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1:![0-9]+]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2:![0-9]+]] ; RECOVER-DYNAMIC-SHADOW: 8: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 10: ; RECOVER-DYNAMIC-SHADOW-NEXT: call void asm sideeffect "ebreak\0Aaddiw x0, x11, 96", "{x10}"(i64 [[TMP0]]) ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -120,13 +118,13 @@ define i8 @test_load8(ptr %a) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 0 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 16: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 21: ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-DYNAMIC-SHADOW: 22: @@ -145,7 +143,7 @@ define i8 @test_load8(ptr %a) sanitize_hwaddress { ; ABORT-ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = inttoptr i64 [[TMP4]] to ptr ; ABORT-ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; ABORT-ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; ABORT-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF1:![0-9]+]] +; ABORT-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF2:![0-9]+]] ; ABORT-ZERO-BASED-SHADOW: 8: ; ABORT-ZERO-BASED-SHADOW-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 0) ; ABORT-ZERO-BASED-SHADOW-NEXT: br label [[TMP9]] @@ -165,10 +163,10 @@ define i8 @test_load8(ptr %a) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = inttoptr i64 [[TMP4]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1:![0-9]+]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2:![0-9]+]] ; RECOVER-ZERO-BASED-SHADOW: 8: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 10: ; RECOVER-ZERO-BASED-SHADOW-NEXT: call void asm sideeffect "ebreak\0Aaddiw x0, x11, 96", "{x10}"(i64 [[TMP0]]) ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -177,13 +175,13 @@ define i8 @test_load8(ptr %a) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 0 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 16: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 21: ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-ZERO-BASED-SHADOW: 22: @@ -212,7 +210,7 @@ define i16 @test_load16(ptr %a) sanitize_hwaddress { ; CHECK-NEXT: [[TMP9:%.*]] = getelementptr i8, ptr [[TMP3]], i64 [[TMP8]] ; CHECK-NEXT: [[TMP10:%.*]] = load i8, ptr [[TMP9]], align 1 ; CHECK-NEXT: [[TMP11:%.*]] = icmp ne i8 [[TMP6]], [[TMP10]] -; CHECK-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF1]] +; CHECK-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF2]] ; CHECK: 12: ; CHECK-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[TMP3]], ptr [[A]], i32 1) ; CHECK-NEXT: br label [[TMP13]] @@ -248,7 +246,7 @@ define i16 @test_load16(ptr %a) sanitize_hwaddress { ; FASTPATH-NEXT: [[TMP9:%.*]] = getelementptr i8, ptr [[TMP3]], i64 [[TMP8]] ; FASTPATH-NEXT: [[TMP10:%.*]] = load i8, ptr [[TMP9]], align 1 ; FASTPATH-NEXT: [[TMP11:%.*]] = icmp ne i8 [[TMP6]], [[TMP10]] -; FASTPATH-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF1]] +; FASTPATH-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF2]] ; FASTPATH: 12: ; FASTPATH-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[TMP3]], ptr [[A]], i32 1) ; FASTPATH-NEXT: br label [[TMP13]] @@ -268,7 +266,7 @@ define i16 @test_load16(ptr %a) sanitize_hwaddress { ; ABORT-DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; ABORT-DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; ABORT-DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; ABORT-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF1]] +; ABORT-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF2]] ; ABORT-DYNAMIC-SHADOW: 8: ; ABORT-DYNAMIC-SHADOW-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 1) ; ABORT-DYNAMIC-SHADOW-NEXT: br label [[TMP9]] @@ -288,10 +286,10 @@ define i16 @test_load16(ptr %a) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 8: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 10: ; RECOVER-DYNAMIC-SHADOW-NEXT: call void asm sideeffect "ebreak\0Aaddiw x0, x11, 97", "{x10}"(i64 [[TMP0]]) ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -300,13 +298,13 @@ define i16 @test_load16(ptr %a) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 16: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 21: ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-DYNAMIC-SHADOW: 22: @@ -325,7 +323,7 @@ define i16 @test_load16(ptr %a) sanitize_hwaddress { ; ABORT-ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = inttoptr i64 [[TMP4]] to ptr ; ABORT-ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; ABORT-ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; ABORT-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF1]] +; ABORT-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF2]] ; ABORT-ZERO-BASED-SHADOW: 8: ; ABORT-ZERO-BASED-SHADOW-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 1) ; ABORT-ZERO-BASED-SHADOW-NEXT: br label [[TMP9]] @@ -345,10 +343,10 @@ define i16 @test_load16(ptr %a) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = inttoptr i64 [[TMP4]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 8: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 10: ; RECOVER-ZERO-BASED-SHADOW-NEXT: call void asm sideeffect "ebreak\0Aaddiw x0, x11, 97", "{x10}"(i64 [[TMP0]]) ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -357,13 +355,13 @@ define i16 @test_load16(ptr %a) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 16: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 21: ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-ZERO-BASED-SHADOW: 22: @@ -392,7 +390,7 @@ define i32 @test_load32(ptr %a) sanitize_hwaddress { ; CHECK-NEXT: [[TMP9:%.*]] = getelementptr i8, ptr [[TMP3]], i64 [[TMP8]] ; CHECK-NEXT: [[TMP10:%.*]] = load i8, ptr [[TMP9]], align 1 ; CHECK-NEXT: [[TMP11:%.*]] = icmp ne i8 [[TMP6]], [[TMP10]] -; CHECK-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF1]] +; CHECK-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF2]] ; CHECK: 12: ; CHECK-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[TMP3]], ptr [[A]], i32 2) ; CHECK-NEXT: br label [[TMP13]] @@ -428,7 +426,7 @@ define i32 @test_load32(ptr %a) sanitize_hwaddress { ; FASTPATH-NEXT: [[TMP9:%.*]] = getelementptr i8, ptr [[TMP3]], i64 [[TMP8]] ; FASTPATH-NEXT: [[TMP10:%.*]] = load i8, ptr [[TMP9]], align 1 ; FASTPATH-NEXT: [[TMP11:%.*]] = icmp ne i8 [[TMP6]], [[TMP10]] -; FASTPATH-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF1]] +; FASTPATH-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF2]] ; FASTPATH: 12: ; FASTPATH-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[TMP3]], ptr [[A]], i32 2) ; FASTPATH-NEXT: br label [[TMP13]] @@ -448,7 +446,7 @@ define i32 @test_load32(ptr %a) sanitize_hwaddress { ; ABORT-DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; ABORT-DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; ABORT-DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; ABORT-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF1]] +; ABORT-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF2]] ; ABORT-DYNAMIC-SHADOW: 8: ; ABORT-DYNAMIC-SHADOW-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 2) ; ABORT-DYNAMIC-SHADOW-NEXT: br label [[TMP9]] @@ -468,10 +466,10 @@ define i32 @test_load32(ptr %a) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 8: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 10: ; RECOVER-DYNAMIC-SHADOW-NEXT: call void asm sideeffect "ebreak\0Aaddiw x0, x11, 98", "{x10}"(i64 [[TMP0]]) ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -480,13 +478,13 @@ define i32 @test_load32(ptr %a) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 3 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 16: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 21: ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-DYNAMIC-SHADOW: 22: @@ -505,7 +503,7 @@ define i32 @test_load32(ptr %a) sanitize_hwaddress { ; ABORT-ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = inttoptr i64 [[TMP4]] to ptr ; ABORT-ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; ABORT-ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; ABORT-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF1]] +; ABORT-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF2]] ; ABORT-ZERO-BASED-SHADOW: 8: ; ABORT-ZERO-BASED-SHADOW-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 2) ; ABORT-ZERO-BASED-SHADOW-NEXT: br label [[TMP9]] @@ -525,10 +523,10 @@ define i32 @test_load32(ptr %a) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = inttoptr i64 [[TMP4]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 8: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 10: ; RECOVER-ZERO-BASED-SHADOW-NEXT: call void asm sideeffect "ebreak\0Aaddiw x0, x11, 98", "{x10}"(i64 [[TMP0]]) ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -537,13 +535,13 @@ define i32 @test_load32(ptr %a) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 3 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 16: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 21: ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-ZERO-BASED-SHADOW: 22: @@ -572,7 +570,7 @@ define i64 @test_load64(ptr %a) sanitize_hwaddress { ; CHECK-NEXT: [[TMP9:%.*]] = getelementptr i8, ptr [[TMP3]], i64 [[TMP8]] ; CHECK-NEXT: [[TMP10:%.*]] = load i8, ptr [[TMP9]], align 1 ; CHECK-NEXT: [[TMP11:%.*]] = icmp ne i8 [[TMP6]], [[TMP10]] -; CHECK-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF1]] +; CHECK-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF2]] ; CHECK: 12: ; CHECK-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[TMP3]], ptr [[A]], i32 3) ; CHECK-NEXT: br label [[TMP13]] @@ -608,7 +606,7 @@ define i64 @test_load64(ptr %a) sanitize_hwaddress { ; FASTPATH-NEXT: [[TMP9:%.*]] = getelementptr i8, ptr [[TMP3]], i64 [[TMP8]] ; FASTPATH-NEXT: [[TMP10:%.*]] = load i8, ptr [[TMP9]], align 1 ; FASTPATH-NEXT: [[TMP11:%.*]] = icmp ne i8 [[TMP6]], [[TMP10]] -; FASTPATH-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF1]] +; FASTPATH-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF2]] ; FASTPATH: 12: ; FASTPATH-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[TMP3]], ptr [[A]], i32 3) ; FASTPATH-NEXT: br label [[TMP13]] @@ -628,7 +626,7 @@ define i64 @test_load64(ptr %a) sanitize_hwaddress { ; ABORT-DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; ABORT-DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; ABORT-DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; ABORT-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF1]] +; ABORT-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF2]] ; ABORT-DYNAMIC-SHADOW: 8: ; ABORT-DYNAMIC-SHADOW-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 3) ; ABORT-DYNAMIC-SHADOW-NEXT: br label [[TMP9]] @@ -648,10 +646,10 @@ define i64 @test_load64(ptr %a) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 8: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 10: ; RECOVER-DYNAMIC-SHADOW-NEXT: call void asm sideeffect "ebreak\0Aaddiw x0, x11, 99", "{x10}"(i64 [[TMP0]]) ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -660,13 +658,13 @@ define i64 @test_load64(ptr %a) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 7 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 16: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 21: ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-DYNAMIC-SHADOW: 22: @@ -685,7 +683,7 @@ define i64 @test_load64(ptr %a) sanitize_hwaddress { ; ABORT-ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = inttoptr i64 [[TMP4]] to ptr ; ABORT-ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; ABORT-ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; ABORT-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF1]] +; ABORT-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF2]] ; ABORT-ZERO-BASED-SHADOW: 8: ; ABORT-ZERO-BASED-SHADOW-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 3) ; ABORT-ZERO-BASED-SHADOW-NEXT: br label [[TMP9]] @@ -705,10 +703,10 @@ define i64 @test_load64(ptr %a) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = inttoptr i64 [[TMP4]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 8: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 10: ; RECOVER-ZERO-BASED-SHADOW-NEXT: call void asm sideeffect "ebreak\0Aaddiw x0, x11, 99", "{x10}"(i64 [[TMP0]]) ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -717,13 +715,13 @@ define i64 @test_load64(ptr %a) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 7 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 16: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 21: ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-ZERO-BASED-SHADOW: 22: @@ -752,7 +750,7 @@ define i128 @test_load128(ptr %a) sanitize_hwaddress { ; CHECK-NEXT: [[TMP9:%.*]] = getelementptr i8, ptr [[TMP3]], i64 [[TMP8]] ; CHECK-NEXT: [[TMP10:%.*]] = load i8, ptr [[TMP9]], align 1 ; CHECK-NEXT: [[TMP11:%.*]] = icmp ne i8 [[TMP6]], [[TMP10]] -; CHECK-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF1]] +; CHECK-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF2]] ; CHECK: 12: ; CHECK-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[TMP3]], ptr [[A]], i32 4) ; CHECK-NEXT: br label [[TMP13]] @@ -788,7 +786,7 @@ define i128 @test_load128(ptr %a) sanitize_hwaddress { ; FASTPATH-NEXT: [[TMP9:%.*]] = getelementptr i8, ptr [[TMP3]], i64 [[TMP8]] ; FASTPATH-NEXT: [[TMP10:%.*]] = load i8, ptr [[TMP9]], align 1 ; FASTPATH-NEXT: [[TMP11:%.*]] = icmp ne i8 [[TMP6]], [[TMP10]] -; FASTPATH-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF1]] +; FASTPATH-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF2]] ; FASTPATH: 12: ; FASTPATH-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[TMP3]], ptr [[A]], i32 4) ; FASTPATH-NEXT: br label [[TMP13]] @@ -808,7 +806,7 @@ define i128 @test_load128(ptr %a) sanitize_hwaddress { ; ABORT-DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; ABORT-DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; ABORT-DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; ABORT-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF1]] +; ABORT-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF2]] ; ABORT-DYNAMIC-SHADOW: 8: ; ABORT-DYNAMIC-SHADOW-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 4) ; ABORT-DYNAMIC-SHADOW-NEXT: br label [[TMP9]] @@ -828,10 +826,10 @@ define i128 @test_load128(ptr %a) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 8: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 10: ; RECOVER-DYNAMIC-SHADOW-NEXT: call void asm sideeffect "ebreak\0Aaddiw x0, x11, 100", "{x10}"(i64 [[TMP0]]) ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -840,13 +838,13 @@ define i128 @test_load128(ptr %a) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 15 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 16: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 21: ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-DYNAMIC-SHADOW: 22: @@ -865,7 +863,7 @@ define i128 @test_load128(ptr %a) sanitize_hwaddress { ; ABORT-ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = inttoptr i64 [[TMP4]] to ptr ; ABORT-ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; ABORT-ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; ABORT-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF1]] +; ABORT-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF2]] ; ABORT-ZERO-BASED-SHADOW: 8: ; ABORT-ZERO-BASED-SHADOW-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 4) ; ABORT-ZERO-BASED-SHADOW-NEXT: br label [[TMP9]] @@ -885,10 +883,10 @@ define i128 @test_load128(ptr %a) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = inttoptr i64 [[TMP4]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 8: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 10: ; RECOVER-ZERO-BASED-SHADOW-NEXT: call void asm sideeffect "ebreak\0Aaddiw x0, x11, 100", "{x10}"(i64 [[TMP0]]) ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -897,13 +895,13 @@ define i128 @test_load128(ptr %a) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 15 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 16: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 21: ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-ZERO-BASED-SHADOW: 22: @@ -1013,7 +1011,7 @@ define void @test_store8(ptr %a, i8 %b) sanitize_hwaddress { ; CHECK-NEXT: [[TMP9:%.*]] = getelementptr i8, ptr [[TMP3]], i64 [[TMP8]] ; CHECK-NEXT: [[TMP10:%.*]] = load i8, ptr [[TMP9]], align 1 ; CHECK-NEXT: [[TMP11:%.*]] = icmp ne i8 [[TMP6]], [[TMP10]] -; CHECK-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF1]] +; CHECK-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF2]] ; CHECK: 12: ; CHECK-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[TMP3]], ptr [[A]], i32 16) ; CHECK-NEXT: br label [[TMP13]] @@ -1049,7 +1047,7 @@ define void @test_store8(ptr %a, i8 %b) sanitize_hwaddress { ; FASTPATH-NEXT: [[TMP9:%.*]] = getelementptr i8, ptr [[TMP3]], i64 [[TMP8]] ; FASTPATH-NEXT: [[TMP10:%.*]] = load i8, ptr [[TMP9]], align 1 ; FASTPATH-NEXT: [[TMP11:%.*]] = icmp ne i8 [[TMP6]], [[TMP10]] -; FASTPATH-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF1]] +; FASTPATH-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF2]] ; FASTPATH: 12: ; FASTPATH-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[TMP3]], ptr [[A]], i32 16) ; FASTPATH-NEXT: br label [[TMP13]] @@ -1069,7 +1067,7 @@ define void @test_store8(ptr %a, i8 %b) sanitize_hwaddress { ; ABORT-DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; ABORT-DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; ABORT-DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; ABORT-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF1]] +; ABORT-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF2]] ; ABORT-DYNAMIC-SHADOW: 8: ; ABORT-DYNAMIC-SHADOW-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 16) ; ABORT-DYNAMIC-SHADOW-NEXT: br label [[TMP9]] @@ -1089,10 +1087,10 @@ define void @test_store8(ptr %a, i8 %b) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 8: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 10: ; RECOVER-DYNAMIC-SHADOW-NEXT: call void asm sideeffect "ebreak\0Aaddiw x0, x11, 112", "{x10}"(i64 [[TMP0]]) ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -1101,13 +1099,13 @@ define void @test_store8(ptr %a, i8 %b) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 0 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 16: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 21: ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-DYNAMIC-SHADOW: 22: @@ -1126,7 +1124,7 @@ define void @test_store8(ptr %a, i8 %b) sanitize_hwaddress { ; ABORT-ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = inttoptr i64 [[TMP4]] to ptr ; ABORT-ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; ABORT-ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; ABORT-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF1]] +; ABORT-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF2]] ; ABORT-ZERO-BASED-SHADOW: 8: ; ABORT-ZERO-BASED-SHADOW-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 16) ; ABORT-ZERO-BASED-SHADOW-NEXT: br label [[TMP9]] @@ -1146,10 +1144,10 @@ define void @test_store8(ptr %a, i8 %b) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = inttoptr i64 [[TMP4]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 8: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 10: ; RECOVER-ZERO-BASED-SHADOW-NEXT: call void asm sideeffect "ebreak\0Aaddiw x0, x11, 112", "{x10}"(i64 [[TMP0]]) ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -1158,13 +1156,13 @@ define void @test_store8(ptr %a, i8 %b) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 0 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 16: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 21: ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-ZERO-BASED-SHADOW: 22: @@ -1193,7 +1191,7 @@ define void @test_store16(ptr %a, i16 %b) sanitize_hwaddress { ; CHECK-NEXT: [[TMP9:%.*]] = getelementptr i8, ptr [[TMP3]], i64 [[TMP8]] ; CHECK-NEXT: [[TMP10:%.*]] = load i8, ptr [[TMP9]], align 1 ; CHECK-NEXT: [[TMP11:%.*]] = icmp ne i8 [[TMP6]], [[TMP10]] -; CHECK-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF1]] +; CHECK-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF2]] ; CHECK: 12: ; CHECK-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[TMP3]], ptr [[A]], i32 17) ; CHECK-NEXT: br label [[TMP13]] @@ -1229,7 +1227,7 @@ define void @test_store16(ptr %a, i16 %b) sanitize_hwaddress { ; FASTPATH-NEXT: [[TMP9:%.*]] = getelementptr i8, ptr [[TMP3]], i64 [[TMP8]] ; FASTPATH-NEXT: [[TMP10:%.*]] = load i8, ptr [[TMP9]], align 1 ; FASTPATH-NEXT: [[TMP11:%.*]] = icmp ne i8 [[TMP6]], [[TMP10]] -; FASTPATH-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF1]] +; FASTPATH-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF2]] ; FASTPATH: 12: ; FASTPATH-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[TMP3]], ptr [[A]], i32 17) ; FASTPATH-NEXT: br label [[TMP13]] @@ -1249,7 +1247,7 @@ define void @test_store16(ptr %a, i16 %b) sanitize_hwaddress { ; ABORT-DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; ABORT-DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; ABORT-DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; ABORT-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF1]] +; ABORT-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF2]] ; ABORT-DYNAMIC-SHADOW: 8: ; ABORT-DYNAMIC-SHADOW-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 17) ; ABORT-DYNAMIC-SHADOW-NEXT: br label [[TMP9]] @@ -1269,10 +1267,10 @@ define void @test_store16(ptr %a, i16 %b) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 8: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 10: ; RECOVER-DYNAMIC-SHADOW-NEXT: call void asm sideeffect "ebreak\0Aaddiw x0, x11, 113", "{x10}"(i64 [[TMP0]]) ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -1281,13 +1279,13 @@ define void @test_store16(ptr %a, i16 %b) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 16: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 21: ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-DYNAMIC-SHADOW: 22: @@ -1306,7 +1304,7 @@ define void @test_store16(ptr %a, i16 %b) sanitize_hwaddress { ; ABORT-ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = inttoptr i64 [[TMP4]] to ptr ; ABORT-ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; ABORT-ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; ABORT-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF1]] +; ABORT-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF2]] ; ABORT-ZERO-BASED-SHADOW: 8: ; ABORT-ZERO-BASED-SHADOW-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 17) ; ABORT-ZERO-BASED-SHADOW-NEXT: br label [[TMP9]] @@ -1326,10 +1324,10 @@ define void @test_store16(ptr %a, i16 %b) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = inttoptr i64 [[TMP4]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 8: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 10: ; RECOVER-ZERO-BASED-SHADOW-NEXT: call void asm sideeffect "ebreak\0Aaddiw x0, x11, 113", "{x10}"(i64 [[TMP0]]) ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -1338,13 +1336,13 @@ define void @test_store16(ptr %a, i16 %b) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 16: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 21: ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-ZERO-BASED-SHADOW: 22: @@ -1373,7 +1371,7 @@ define void @test_store32(ptr %a, i32 %b) sanitize_hwaddress { ; CHECK-NEXT: [[TMP9:%.*]] = getelementptr i8, ptr [[TMP3]], i64 [[TMP8]] ; CHECK-NEXT: [[TMP10:%.*]] = load i8, ptr [[TMP9]], align 1 ; CHECK-NEXT: [[TMP11:%.*]] = icmp ne i8 [[TMP6]], [[TMP10]] -; CHECK-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF1]] +; CHECK-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF2]] ; CHECK: 12: ; CHECK-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[TMP3]], ptr [[A]], i32 18) ; CHECK-NEXT: br label [[TMP13]] @@ -1409,7 +1407,7 @@ define void @test_store32(ptr %a, i32 %b) sanitize_hwaddress { ; FASTPATH-NEXT: [[TMP9:%.*]] = getelementptr i8, ptr [[TMP3]], i64 [[TMP8]] ; FASTPATH-NEXT: [[TMP10:%.*]] = load i8, ptr [[TMP9]], align 1 ; FASTPATH-NEXT: [[TMP11:%.*]] = icmp ne i8 [[TMP6]], [[TMP10]] -; FASTPATH-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF1]] +; FASTPATH-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF2]] ; FASTPATH: 12: ; FASTPATH-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[TMP3]], ptr [[A]], i32 18) ; FASTPATH-NEXT: br label [[TMP13]] @@ -1429,7 +1427,7 @@ define void @test_store32(ptr %a, i32 %b) sanitize_hwaddress { ; ABORT-DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; ABORT-DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; ABORT-DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; ABORT-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF1]] +; ABORT-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF2]] ; ABORT-DYNAMIC-SHADOW: 8: ; ABORT-DYNAMIC-SHADOW-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 18) ; ABORT-DYNAMIC-SHADOW-NEXT: br label [[TMP9]] @@ -1449,10 +1447,10 @@ define void @test_store32(ptr %a, i32 %b) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 8: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 10: ; RECOVER-DYNAMIC-SHADOW-NEXT: call void asm sideeffect "ebreak\0Aaddiw x0, x11, 114", "{x10}"(i64 [[TMP0]]) ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -1461,13 +1459,13 @@ define void @test_store32(ptr %a, i32 %b) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 3 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 16: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 21: ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-DYNAMIC-SHADOW: 22: @@ -1486,7 +1484,7 @@ define void @test_store32(ptr %a, i32 %b) sanitize_hwaddress { ; ABORT-ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = inttoptr i64 [[TMP4]] to ptr ; ABORT-ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; ABORT-ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; ABORT-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF1]] +; ABORT-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF2]] ; ABORT-ZERO-BASED-SHADOW: 8: ; ABORT-ZERO-BASED-SHADOW-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 18) ; ABORT-ZERO-BASED-SHADOW-NEXT: br label [[TMP9]] @@ -1506,10 +1504,10 @@ define void @test_store32(ptr %a, i32 %b) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = inttoptr i64 [[TMP4]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 8: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 10: ; RECOVER-ZERO-BASED-SHADOW-NEXT: call void asm sideeffect "ebreak\0Aaddiw x0, x11, 114", "{x10}"(i64 [[TMP0]]) ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -1518,13 +1516,13 @@ define void @test_store32(ptr %a, i32 %b) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 3 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 16: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 21: ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-ZERO-BASED-SHADOW: 22: @@ -1553,7 +1551,7 @@ define void @test_store64(ptr %a, i64 %b) sanitize_hwaddress { ; CHECK-NEXT: [[TMP9:%.*]] = getelementptr i8, ptr [[TMP3]], i64 [[TMP8]] ; CHECK-NEXT: [[TMP10:%.*]] = load i8, ptr [[TMP9]], align 1 ; CHECK-NEXT: [[TMP11:%.*]] = icmp ne i8 [[TMP6]], [[TMP10]] -; CHECK-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF1]] +; CHECK-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF2]] ; CHECK: 12: ; CHECK-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[TMP3]], ptr [[A]], i32 19) ; CHECK-NEXT: br label [[TMP13]] @@ -1589,7 +1587,7 @@ define void @test_store64(ptr %a, i64 %b) sanitize_hwaddress { ; FASTPATH-NEXT: [[TMP9:%.*]] = getelementptr i8, ptr [[TMP3]], i64 [[TMP8]] ; FASTPATH-NEXT: [[TMP10:%.*]] = load i8, ptr [[TMP9]], align 1 ; FASTPATH-NEXT: [[TMP11:%.*]] = icmp ne i8 [[TMP6]], [[TMP10]] -; FASTPATH-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF1]] +; FASTPATH-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF2]] ; FASTPATH: 12: ; FASTPATH-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[TMP3]], ptr [[A]], i32 19) ; FASTPATH-NEXT: br label [[TMP13]] @@ -1609,7 +1607,7 @@ define void @test_store64(ptr %a, i64 %b) sanitize_hwaddress { ; ABORT-DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; ABORT-DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; ABORT-DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; ABORT-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF1]] +; ABORT-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF2]] ; ABORT-DYNAMIC-SHADOW: 8: ; ABORT-DYNAMIC-SHADOW-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 19) ; ABORT-DYNAMIC-SHADOW-NEXT: br label [[TMP9]] @@ -1629,10 +1627,10 @@ define void @test_store64(ptr %a, i64 %b) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 8: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 10: ; RECOVER-DYNAMIC-SHADOW-NEXT: call void asm sideeffect "ebreak\0Aaddiw x0, x11, 115", "{x10}"(i64 [[TMP0]]) ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -1641,13 +1639,13 @@ define void @test_store64(ptr %a, i64 %b) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 7 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 16: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 21: ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-DYNAMIC-SHADOW: 22: @@ -1666,7 +1664,7 @@ define void @test_store64(ptr %a, i64 %b) sanitize_hwaddress { ; ABORT-ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = inttoptr i64 [[TMP4]] to ptr ; ABORT-ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; ABORT-ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; ABORT-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF1]] +; ABORT-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF2]] ; ABORT-ZERO-BASED-SHADOW: 8: ; ABORT-ZERO-BASED-SHADOW-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 19) ; ABORT-ZERO-BASED-SHADOW-NEXT: br label [[TMP9]] @@ -1686,10 +1684,10 @@ define void @test_store64(ptr %a, i64 %b) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = inttoptr i64 [[TMP4]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 8: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 10: ; RECOVER-ZERO-BASED-SHADOW-NEXT: call void asm sideeffect "ebreak\0Aaddiw x0, x11, 115", "{x10}"(i64 [[TMP0]]) ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -1698,13 +1696,13 @@ define void @test_store64(ptr %a, i64 %b) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 7 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 16: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 21: ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-ZERO-BASED-SHADOW: 22: @@ -1733,7 +1731,7 @@ define void @test_store128(ptr %a, i128 %b) sanitize_hwaddress { ; CHECK-NEXT: [[TMP9:%.*]] = getelementptr i8, ptr [[TMP3]], i64 [[TMP8]] ; CHECK-NEXT: [[TMP10:%.*]] = load i8, ptr [[TMP9]], align 1 ; CHECK-NEXT: [[TMP11:%.*]] = icmp ne i8 [[TMP6]], [[TMP10]] -; CHECK-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF1]] +; CHECK-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF2]] ; CHECK: 12: ; CHECK-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[TMP3]], ptr [[A]], i32 20) ; CHECK-NEXT: br label [[TMP13]] @@ -1769,7 +1767,7 @@ define void @test_store128(ptr %a, i128 %b) sanitize_hwaddress { ; FASTPATH-NEXT: [[TMP9:%.*]] = getelementptr i8, ptr [[TMP3]], i64 [[TMP8]] ; FASTPATH-NEXT: [[TMP10:%.*]] = load i8, ptr [[TMP9]], align 1 ; FASTPATH-NEXT: [[TMP11:%.*]] = icmp ne i8 [[TMP6]], [[TMP10]] -; FASTPATH-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF1]] +; FASTPATH-NEXT: br i1 [[TMP11]], label [[TMP12:%.*]], label [[TMP13:%.*]], !prof [[PROF2]] ; FASTPATH: 12: ; FASTPATH-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[TMP3]], ptr [[A]], i32 20) ; FASTPATH-NEXT: br label [[TMP13]] @@ -1789,7 +1787,7 @@ define void @test_store128(ptr %a, i128 %b) sanitize_hwaddress { ; ABORT-DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; ABORT-DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; ABORT-DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; ABORT-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF1]] +; ABORT-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF2]] ; ABORT-DYNAMIC-SHADOW: 8: ; ABORT-DYNAMIC-SHADOW-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 20) ; ABORT-DYNAMIC-SHADOW-NEXT: br label [[TMP9]] @@ -1809,10 +1807,10 @@ define void @test_store128(ptr %a, i128 %b) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 8: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 10: ; RECOVER-DYNAMIC-SHADOW-NEXT: call void asm sideeffect "ebreak\0Aaddiw x0, x11, 116", "{x10}"(i64 [[TMP0]]) ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -1821,13 +1819,13 @@ define void @test_store128(ptr %a, i128 %b) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 15 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 16: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 21: ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-DYNAMIC-SHADOW: 22: @@ -1846,7 +1844,7 @@ define void @test_store128(ptr %a, i128 %b) sanitize_hwaddress { ; ABORT-ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = inttoptr i64 [[TMP4]] to ptr ; ABORT-ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; ABORT-ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; ABORT-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF1]] +; ABORT-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF2]] ; ABORT-ZERO-BASED-SHADOW: 8: ; ABORT-ZERO-BASED-SHADOW-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 20) ; ABORT-ZERO-BASED-SHADOW-NEXT: br label [[TMP9]] @@ -1866,10 +1864,10 @@ define void @test_store128(ptr %a, i128 %b) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = inttoptr i64 [[TMP4]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 8: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 10: ; RECOVER-ZERO-BASED-SHADOW-NEXT: call void asm sideeffect "ebreak\0Aaddiw x0, x11, 116", "{x10}"(i64 [[TMP0]]) ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -1878,13 +1876,13 @@ define void @test_store128(ptr %a, i128 %b) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 15 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 16: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 21: ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-ZERO-BASED-SHADOW: 22: diff --git a/llvm/test/Instrumentation/HWAddressSanitizer/alloca.ll b/llvm/test/Instrumentation/HWAddressSanitizer/alloca.ll index 4bd23ea76c159b..73f56de707b216 100644 --- a/llvm/test/Instrumentation/HWAddressSanitizer/alloca.ll +++ b/llvm/test/Instrumentation/HWAddressSanitizer/alloca.ll @@ -34,7 +34,7 @@ declare void @use32(ptr) ;. define void @test_alloca() sanitize_hwaddress !dbg !15 { ; DYNAMIC-SHADOW-LABEL: define void @test_alloca( -; DYNAMIC-SHADOW-SAME: ) #[[ATTR0:[0-9]+]] personality ptr @__hwasan_personality_thunk !dbg [[DBG7:![0-9]+]] { +; DYNAMIC-SHADOW-SAME: ) #[[ATTR0:[0-9]+]] personality ptr @__hwasan_personality_thunk !dbg [[DBG8:![0-9]+]] { ; DYNAMIC-SHADOW-NEXT: entry: ; DYNAMIC-SHADOW-NEXT: [[DOTHWASAN_SHADOW:%.*]] = call ptr asm "", "=r,0"(ptr @__hwasan_shadow) ; DYNAMIC-SHADOW-NEXT: [[TMP0:%.*]] = call ptr @llvm.frameaddress.p0(i32 0) @@ -43,33 +43,33 @@ define void @test_alloca() sanitize_hwaddress !dbg !15 { ; DYNAMIC-SHADOW-NEXT: [[HWASAN_STACK_BASE_TAG:%.*]] = xor i64 [[TMP1]], [[TMP2]] ; DYNAMIC-SHADOW-NEXT: [[HWASAN_UAR_TAG:%.*]] = lshr i64 [[TMP1]], 56 ; DYNAMIC-SHADOW-NEXT: [[X:%.*]] = alloca { i32, [12 x i8] }, align 16 -; DYNAMIC-SHADOW-NEXT: #dbg_value(!DIArgList(ptr [[X]], ptr [[X]]), [[META10:![0-9]+]], !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_tag_offset, 0, DW_OP_LLVM_arg, 1, DW_OP_LLVM_tag_offset, 0, DW_OP_plus, DW_OP_deref), [[META12:![0-9]+]]) -; DYNAMIC-SHADOW-NEXT: [[TMP3:%.*]] = xor i64 [[HWASAN_STACK_BASE_TAG]], 0, !dbg [[DBG13:![0-9]+]] -; DYNAMIC-SHADOW-NEXT: [[TMP4:%.*]] = ptrtoint ptr [[X]] to i64, !dbg [[DBG13]] -; DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = and i64 [[TMP4]], 72057594037927935, !dbg [[DBG13]] -; DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = shl i64 [[TMP3]], 56, !dbg [[DBG13]] -; DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = or i64 [[TMP5]], [[TMP6]], !dbg [[DBG13]] -; DYNAMIC-SHADOW-NEXT: [[X_HWASAN:%.*]] = inttoptr i64 [[TMP7]] to ptr, !dbg [[DBG13]] -; DYNAMIC-SHADOW-NEXT: [[TMP8:%.*]] = trunc i64 [[TMP3]] to i8, !dbg [[DBG13]] -; DYNAMIC-SHADOW-NEXT: [[TMP9:%.*]] = ptrtoint ptr [[X]] to i64, !dbg [[DBG13]] -; DYNAMIC-SHADOW-NEXT: [[TMP10:%.*]] = and i64 [[TMP9]], 72057594037927935, !dbg [[DBG13]] -; DYNAMIC-SHADOW-NEXT: [[TMP11:%.*]] = lshr i64 [[TMP10]], 4, !dbg [[DBG13]] -; DYNAMIC-SHADOW-NEXT: [[TMP12:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP11]], !dbg [[DBG13]] -; DYNAMIC-SHADOW-NEXT: [[TMP13:%.*]] = getelementptr i8, ptr [[TMP12]], i32 0, !dbg [[DBG13]] -; DYNAMIC-SHADOW-NEXT: store i8 4, ptr [[TMP13]], align 1, !dbg [[DBG13]] -; DYNAMIC-SHADOW-NEXT: [[TMP14:%.*]] = getelementptr i8, ptr [[X]], i32 15, !dbg [[DBG13]] -; DYNAMIC-SHADOW-NEXT: store i8 [[TMP8]], ptr [[TMP14]], align 1, !dbg [[DBG13]] -; DYNAMIC-SHADOW-NEXT: call void @use32(ptr nonnull [[X_HWASAN]]), !dbg [[DBG13]] -; DYNAMIC-SHADOW-NEXT: [[TMP15:%.*]] = trunc i64 [[HWASAN_UAR_TAG]] to i8, !dbg [[DBG14:![0-9]+]] -; DYNAMIC-SHADOW-NEXT: [[TMP16:%.*]] = ptrtoint ptr [[X]] to i64, !dbg [[DBG14]] -; DYNAMIC-SHADOW-NEXT: [[TMP17:%.*]] = and i64 [[TMP16]], 72057594037927935, !dbg [[DBG14]] -; DYNAMIC-SHADOW-NEXT: [[TMP18:%.*]] = lshr i64 [[TMP17]], 4, !dbg [[DBG14]] -; DYNAMIC-SHADOW-NEXT: [[TMP19:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP18]], !dbg [[DBG14]] -; DYNAMIC-SHADOW-NEXT: call void @llvm.memset.p0.i64(ptr align 1 [[TMP19]], i8 [[TMP15]], i64 1, i1 false), !dbg [[DBG14]] -; DYNAMIC-SHADOW-NEXT: ret void, !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: #dbg_value(!DIArgList(ptr [[X]], ptr [[X]]), [[META11:![0-9]+]], !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_tag_offset, 0, DW_OP_LLVM_arg, 1, DW_OP_LLVM_tag_offset, 0, DW_OP_plus, DW_OP_deref), [[META13:![0-9]+]]) +; DYNAMIC-SHADOW-NEXT: [[TMP3:%.*]] = xor i64 [[HWASAN_STACK_BASE_TAG]], 0, !dbg [[DBG14:![0-9]+]] +; DYNAMIC-SHADOW-NEXT: [[TMP4:%.*]] = ptrtoint ptr [[X]] to i64, !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = and i64 [[TMP4]], 72057594037927935, !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = shl i64 [[TMP3]], 56, !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = or i64 [[TMP5]], [[TMP6]], !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: [[X_HWASAN:%.*]] = inttoptr i64 [[TMP7]] to ptr, !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: [[TMP8:%.*]] = trunc i64 [[TMP3]] to i8, !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: [[TMP9:%.*]] = ptrtoint ptr [[X]] to i64, !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: [[TMP10:%.*]] = and i64 [[TMP9]], 72057594037927935, !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: [[TMP11:%.*]] = lshr i64 [[TMP10]], 4, !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: [[TMP12:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP11]], !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: [[TMP13:%.*]] = getelementptr i8, ptr [[TMP12]], i32 0, !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: store i8 4, ptr [[TMP13]], align 1, !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: [[TMP14:%.*]] = getelementptr i8, ptr [[X]], i32 15, !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: store i8 [[TMP8]], ptr [[TMP14]], align 1, !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: call void @use32(ptr nonnull [[X_HWASAN]]), !dbg [[DBG14]] +; DYNAMIC-SHADOW-NEXT: [[TMP15:%.*]] = trunc i64 [[HWASAN_UAR_TAG]] to i8, !dbg [[DBG15:![0-9]+]] +; DYNAMIC-SHADOW-NEXT: [[TMP16:%.*]] = ptrtoint ptr [[X]] to i64, !dbg [[DBG15]] +; DYNAMIC-SHADOW-NEXT: [[TMP17:%.*]] = and i64 [[TMP16]], 72057594037927935, !dbg [[DBG15]] +; DYNAMIC-SHADOW-NEXT: [[TMP18:%.*]] = lshr i64 [[TMP17]], 4, !dbg [[DBG15]] +; DYNAMIC-SHADOW-NEXT: [[TMP19:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP18]], !dbg [[DBG15]] +; DYNAMIC-SHADOW-NEXT: call void @llvm.memset.p0.i64(ptr align 1 [[TMP19]], i8 [[TMP15]], i64 1, i1 false), !dbg [[DBG15]] +; DYNAMIC-SHADOW-NEXT: ret void, !dbg [[DBG15]] ; ; ZERO-BASED-SHADOW-LABEL: define void @test_alloca( -; ZERO-BASED-SHADOW-SAME: ) #[[ATTR0:[0-9]+]] personality ptr @__hwasan_personality_thunk !dbg [[DBG7:![0-9]+]] { +; ZERO-BASED-SHADOW-SAME: ) #[[ATTR0:[0-9]+]] personality ptr @__hwasan_personality_thunk !dbg [[DBG8:![0-9]+]] { ; ZERO-BASED-SHADOW-NEXT: entry: ; ZERO-BASED-SHADOW-NEXT: [[DOTHWASAN_SHADOW:%.*]] = call ptr asm "", "=r,0"(ptr null) ; ZERO-BASED-SHADOW-NEXT: [[TMP0:%.*]] = call ptr @llvm.frameaddress.p0(i32 0) @@ -78,30 +78,30 @@ define void @test_alloca() sanitize_hwaddress !dbg !15 { ; ZERO-BASED-SHADOW-NEXT: [[HWASAN_STACK_BASE_TAG:%.*]] = xor i64 [[TMP1]], [[TMP2]] ; ZERO-BASED-SHADOW-NEXT: [[HWASAN_UAR_TAG:%.*]] = lshr i64 [[TMP1]], 56 ; ZERO-BASED-SHADOW-NEXT: [[X:%.*]] = alloca { i32, [12 x i8] }, align 16 -; ZERO-BASED-SHADOW-NEXT: #dbg_value(!DIArgList(ptr [[X]], ptr [[X]]), [[META10:![0-9]+]], !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_tag_offset, 0, DW_OP_LLVM_arg, 1, DW_OP_LLVM_tag_offset, 0, DW_OP_plus, DW_OP_deref), [[META12:![0-9]+]]) -; ZERO-BASED-SHADOW-NEXT: [[TMP3:%.*]] = xor i64 [[HWASAN_STACK_BASE_TAG]], 0, !dbg [[DBG13:![0-9]+]] -; ZERO-BASED-SHADOW-NEXT: [[TMP4:%.*]] = ptrtoint ptr [[X]] to i64, !dbg [[DBG13]] -; ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = and i64 [[TMP4]], 72057594037927935, !dbg [[DBG13]] -; ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = shl i64 [[TMP3]], 56, !dbg [[DBG13]] -; ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = or i64 [[TMP5]], [[TMP6]], !dbg [[DBG13]] -; ZERO-BASED-SHADOW-NEXT: [[X_HWASAN:%.*]] = inttoptr i64 [[TMP7]] to ptr, !dbg [[DBG13]] -; ZERO-BASED-SHADOW-NEXT: [[TMP8:%.*]] = trunc i64 [[TMP3]] to i8, !dbg [[DBG13]] -; ZERO-BASED-SHADOW-NEXT: [[TMP9:%.*]] = ptrtoint ptr [[X]] to i64, !dbg [[DBG13]] -; ZERO-BASED-SHADOW-NEXT: [[TMP10:%.*]] = and i64 [[TMP9]], 72057594037927935, !dbg [[DBG13]] -; ZERO-BASED-SHADOW-NEXT: [[TMP11:%.*]] = lshr i64 [[TMP10]], 4, !dbg [[DBG13]] -; ZERO-BASED-SHADOW-NEXT: [[TMP12:%.*]] = inttoptr i64 [[TMP11]] to ptr, !dbg [[DBG13]] -; ZERO-BASED-SHADOW-NEXT: [[TMP13:%.*]] = getelementptr i8, ptr [[TMP12]], i32 0, !dbg [[DBG13]] -; ZERO-BASED-SHADOW-NEXT: store i8 4, ptr [[TMP13]], align 1, !dbg [[DBG13]] -; ZERO-BASED-SHADOW-NEXT: [[TMP14:%.*]] = getelementptr i8, ptr [[X]], i32 15, !dbg [[DBG13]] -; ZERO-BASED-SHADOW-NEXT: store i8 [[TMP8]], ptr [[TMP14]], align 1, !dbg [[DBG13]] -; ZERO-BASED-SHADOW-NEXT: call void @use32(ptr nonnull [[X_HWASAN]]), !dbg [[DBG13]] -; ZERO-BASED-SHADOW-NEXT: [[TMP15:%.*]] = trunc i64 [[HWASAN_UAR_TAG]] to i8, !dbg [[DBG14:![0-9]+]] -; ZERO-BASED-SHADOW-NEXT: [[TMP16:%.*]] = ptrtoint ptr [[X]] to i64, !dbg [[DBG14]] -; ZERO-BASED-SHADOW-NEXT: [[TMP17:%.*]] = and i64 [[TMP16]], 72057594037927935, !dbg [[DBG14]] -; ZERO-BASED-SHADOW-NEXT: [[TMP18:%.*]] = lshr i64 [[TMP17]], 4, !dbg [[DBG14]] -; ZERO-BASED-SHADOW-NEXT: [[TMP19:%.*]] = inttoptr i64 [[TMP18]] to ptr, !dbg [[DBG14]] -; ZERO-BASED-SHADOW-NEXT: call void @llvm.memset.p0.i64(ptr align 1 [[TMP19]], i8 [[TMP15]], i64 1, i1 false), !dbg [[DBG14]] -; ZERO-BASED-SHADOW-NEXT: ret void, !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: #dbg_value(!DIArgList(ptr [[X]], ptr [[X]]), [[META11:![0-9]+]], !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_tag_offset, 0, DW_OP_LLVM_arg, 1, DW_OP_LLVM_tag_offset, 0, DW_OP_plus, DW_OP_deref), [[META13:![0-9]+]]) +; ZERO-BASED-SHADOW-NEXT: [[TMP3:%.*]] = xor i64 [[HWASAN_STACK_BASE_TAG]], 0, !dbg [[DBG14:![0-9]+]] +; ZERO-BASED-SHADOW-NEXT: [[TMP4:%.*]] = ptrtoint ptr [[X]] to i64, !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = and i64 [[TMP4]], 72057594037927935, !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = shl i64 [[TMP3]], 56, !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = or i64 [[TMP5]], [[TMP6]], !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: [[X_HWASAN:%.*]] = inttoptr i64 [[TMP7]] to ptr, !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: [[TMP8:%.*]] = trunc i64 [[TMP3]] to i8, !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: [[TMP9:%.*]] = ptrtoint ptr [[X]] to i64, !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: [[TMP10:%.*]] = and i64 [[TMP9]], 72057594037927935, !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: [[TMP11:%.*]] = lshr i64 [[TMP10]], 4, !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: [[TMP12:%.*]] = inttoptr i64 [[TMP11]] to ptr, !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: [[TMP13:%.*]] = getelementptr i8, ptr [[TMP12]], i32 0, !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: store i8 4, ptr [[TMP13]], align 1, !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: [[TMP14:%.*]] = getelementptr i8, ptr [[X]], i32 15, !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: store i8 [[TMP8]], ptr [[TMP14]], align 1, !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: call void @use32(ptr nonnull [[X_HWASAN]]), !dbg [[DBG14]] +; ZERO-BASED-SHADOW-NEXT: [[TMP15:%.*]] = trunc i64 [[HWASAN_UAR_TAG]] to i8, !dbg [[DBG15:![0-9]+]] +; ZERO-BASED-SHADOW-NEXT: [[TMP16:%.*]] = ptrtoint ptr [[X]] to i64, !dbg [[DBG15]] +; ZERO-BASED-SHADOW-NEXT: [[TMP17:%.*]] = and i64 [[TMP16]], 72057594037927935, !dbg [[DBG15]] +; ZERO-BASED-SHADOW-NEXT: [[TMP18:%.*]] = lshr i64 [[TMP17]], 4, !dbg [[DBG15]] +; ZERO-BASED-SHADOW-NEXT: [[TMP19:%.*]] = inttoptr i64 [[TMP18]] to ptr, !dbg [[DBG15]] +; ZERO-BASED-SHADOW-NEXT: call void @llvm.memset.p0.i64(ptr align 1 [[TMP19]], i8 [[TMP15]], i64 1, i1 false), !dbg [[DBG15]] +; ZERO-BASED-SHADOW-NEXT: ret void, !dbg [[DBG15]] ; entry: %x = alloca i32, align 4 @@ -166,15 +166,16 @@ declare void @llvm.dbg.value(metadata, metadata, metadata) ; DYNAMIC-SHADOW: [[META3]] = !{} ; DYNAMIC-SHADOW: [[META4:![0-9]+]] = !{i32 7, !"Dwarf Version", i32 4} ; DYNAMIC-SHADOW: [[META5:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3} -; DYNAMIC-SHADOW: [[META6:![0-9]+]] = !{!"{{.*}}clang version {{.*}}"} -; DYNAMIC-SHADOW: [[DBG7]] = distinct !DISubprogram(name: "test_alloca", linkageName: "_Z11test_allocav", scope: [[META2]], file: [[META2]], line: 4, type: [[META8:![0-9]+]], scopeLine: 4, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: [[META1]], retainedNodes: [[META3]]) -; DYNAMIC-SHADOW: [[META8]] = !DISubroutineType(types: [[META9:![0-9]+]]) -; DYNAMIC-SHADOW: [[META9]] = !{null} -; DYNAMIC-SHADOW: [[META10]] = !DILocalVariable(name: "x", scope: [[DBG7]], file: [[META2]], line: 5, type: [[META11:![0-9]+]]) -; DYNAMIC-SHADOW: [[META11]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -; DYNAMIC-SHADOW: [[META12]] = !DILocation(line: 0, scope: [[DBG7]]) -; DYNAMIC-SHADOW: [[DBG13]] = !DILocation(line: 7, column: 5, scope: [[DBG7]]) -; DYNAMIC-SHADOW: [[DBG14]] = !DILocation(line: 8, column: 1, scope: [[DBG7]]) +; DYNAMIC-SHADOW: [[META6:![0-9]+]] = !{i32 4, !"nosanitize_hwaddress", i32 1} +; DYNAMIC-SHADOW: [[META7:![0-9]+]] = !{!"{{.*}}clang version {{.*}}"} +; DYNAMIC-SHADOW: [[DBG8]] = distinct !DISubprogram(name: "test_alloca", linkageName: "_Z11test_allocav", scope: [[META2]], file: [[META2]], line: 4, type: [[META9:![0-9]+]], scopeLine: 4, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: [[META1]], retainedNodes: [[META3]]) +; DYNAMIC-SHADOW: [[META9]] = !DISubroutineType(types: [[META10:![0-9]+]]) +; DYNAMIC-SHADOW: [[META10]] = !{null} +; DYNAMIC-SHADOW: [[META11]] = !DILocalVariable(name: "x", scope: [[DBG8]], file: [[META2]], line: 5, type: [[META12:![0-9]+]]) +; DYNAMIC-SHADOW: [[META12]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +; DYNAMIC-SHADOW: [[META13]] = !DILocation(line: 0, scope: [[DBG8]]) +; DYNAMIC-SHADOW: [[DBG14]] = !DILocation(line: 7, column: 5, scope: [[DBG8]]) +; DYNAMIC-SHADOW: [[DBG15]] = !DILocation(line: 8, column: 1, scope: [[DBG8]]) ;. ; ZERO-BASED-SHADOW: [[META0]] = !{ptr @hwasan.note} ; ZERO-BASED-SHADOW: [[META1:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: [[META2:![0-9]+]], producer: "{{.*}}clang version {{.*}}", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: [[META3:![0-9]+]], splitDebugInlining: false, nameTableKind: None) @@ -182,13 +183,14 @@ declare void @llvm.dbg.value(metadata, metadata, metadata) ; ZERO-BASED-SHADOW: [[META3]] = !{} ; ZERO-BASED-SHADOW: [[META4:![0-9]+]] = !{i32 7, !"Dwarf Version", i32 4} ; ZERO-BASED-SHADOW: [[META5:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3} -; ZERO-BASED-SHADOW: [[META6:![0-9]+]] = !{!"{{.*}}clang version {{.*}}"} -; ZERO-BASED-SHADOW: [[DBG7]] = distinct !DISubprogram(name: "test_alloca", linkageName: "_Z11test_allocav", scope: [[META2]], file: [[META2]], line: 4, type: [[META8:![0-9]+]], scopeLine: 4, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: [[META1]], retainedNodes: [[META3]]) -; ZERO-BASED-SHADOW: [[META8]] = !DISubroutineType(types: [[META9:![0-9]+]]) -; ZERO-BASED-SHADOW: [[META9]] = !{null} -; ZERO-BASED-SHADOW: [[META10]] = !DILocalVariable(name: "x", scope: [[DBG7]], file: [[META2]], line: 5, type: [[META11:![0-9]+]]) -; ZERO-BASED-SHADOW: [[META11]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -; ZERO-BASED-SHADOW: [[META12]] = !DILocation(line: 0, scope: [[DBG7]]) -; ZERO-BASED-SHADOW: [[DBG13]] = !DILocation(line: 7, column: 5, scope: [[DBG7]]) -; ZERO-BASED-SHADOW: [[DBG14]] = !DILocation(line: 8, column: 1, scope: [[DBG7]]) +; ZERO-BASED-SHADOW: [[META6:![0-9]+]] = !{i32 4, !"nosanitize_hwaddress", i32 1} +; ZERO-BASED-SHADOW: [[META7:![0-9]+]] = !{!"{{.*}}clang version {{.*}}"} +; ZERO-BASED-SHADOW: [[DBG8]] = distinct !DISubprogram(name: "test_alloca", linkageName: "_Z11test_allocav", scope: [[META2]], file: [[META2]], line: 4, type: [[META9:![0-9]+]], scopeLine: 4, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: [[META1]], retainedNodes: [[META3]]) +; ZERO-BASED-SHADOW: [[META9]] = !DISubroutineType(types: [[META10:![0-9]+]]) +; ZERO-BASED-SHADOW: [[META10]] = !{null} +; ZERO-BASED-SHADOW: [[META11]] = !DILocalVariable(name: "x", scope: [[DBG8]], file: [[META2]], line: 5, type: [[META12:![0-9]+]]) +; ZERO-BASED-SHADOW: [[META12]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +; ZERO-BASED-SHADOW: [[META13]] = !DILocation(line: 0, scope: [[DBG8]]) +; ZERO-BASED-SHADOW: [[DBG14]] = !DILocation(line: 7, column: 5, scope: [[DBG8]]) +; ZERO-BASED-SHADOW: [[DBG15]] = !DILocation(line: 8, column: 1, scope: [[DBG8]]) ;. diff --git a/llvm/test/Instrumentation/HWAddressSanitizer/basic.ll b/llvm/test/Instrumentation/HWAddressSanitizer/basic.ll index 4212293f42545e..afbb8f50011141 100644 --- a/llvm/test/Instrumentation/HWAddressSanitizer/basic.ll +++ b/llvm/test/Instrumentation/HWAddressSanitizer/basic.ll @@ -42,7 +42,7 @@ define i8 @test_load8(ptr %a) sanitize_hwaddress { ; FASTPATH-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; FASTPATH-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; FASTPATH-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; FASTPATH-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF1:![0-9]+]] +; FASTPATH-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF2:![0-9]+]] ; FASTPATH: 8: ; FASTPATH-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 0) ; FASTPATH-NEXT: br label [[TMP9]] @@ -70,10 +70,10 @@ define i8 @test_load8(ptr %a) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1:![0-9]+]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2:![0-9]+]] ; RECOVER-DYNAMIC-SHADOW: 8: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 10: ; RECOVER-DYNAMIC-SHADOW-NEXT: call void asm sideeffect "brk #2336", "{x0}"(i64 [[TMP0]]) ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -82,13 +82,13 @@ define i8 @test_load8(ptr %a) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 0 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 16: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 21: ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-DYNAMIC-SHADOW: 22: @@ -115,10 +115,10 @@ define i8 @test_load8(ptr %a) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = inttoptr i64 [[TMP4]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1:![0-9]+]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2:![0-9]+]] ; RECOVER-ZERO-BASED-SHADOW: 8: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 10: ; RECOVER-ZERO-BASED-SHADOW-NEXT: call void asm sideeffect "brk #2336", "{x0}"(i64 [[TMP0]]) ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -127,13 +127,13 @@ define i8 @test_load8(ptr %a) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 0 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 16: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 21: ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-ZERO-BASED-SHADOW: 22: @@ -174,7 +174,7 @@ define i16 @test_load16(ptr %a) sanitize_hwaddress { ; FASTPATH-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; FASTPATH-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; FASTPATH-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; FASTPATH-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF1]] +; FASTPATH-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF2]] ; FASTPATH: 8: ; FASTPATH-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 1) ; FASTPATH-NEXT: br label [[TMP9]] @@ -202,10 +202,10 @@ define i16 @test_load16(ptr %a) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 8: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 10: ; RECOVER-DYNAMIC-SHADOW-NEXT: call void asm sideeffect "brk #2337", "{x0}"(i64 [[TMP0]]) ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -214,13 +214,13 @@ define i16 @test_load16(ptr %a) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 16: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 21: ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-DYNAMIC-SHADOW: 22: @@ -247,10 +247,10 @@ define i16 @test_load16(ptr %a) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = inttoptr i64 [[TMP4]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 8: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 10: ; RECOVER-ZERO-BASED-SHADOW-NEXT: call void asm sideeffect "brk #2337", "{x0}"(i64 [[TMP0]]) ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -259,13 +259,13 @@ define i16 @test_load16(ptr %a) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 16: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 21: ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-ZERO-BASED-SHADOW: 22: @@ -306,7 +306,7 @@ define i32 @test_load32(ptr %a) sanitize_hwaddress { ; FASTPATH-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; FASTPATH-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; FASTPATH-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; FASTPATH-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF1]] +; FASTPATH-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF2]] ; FASTPATH: 8: ; FASTPATH-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 2) ; FASTPATH-NEXT: br label [[TMP9]] @@ -334,10 +334,10 @@ define i32 @test_load32(ptr %a) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 8: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 10: ; RECOVER-DYNAMIC-SHADOW-NEXT: call void asm sideeffect "brk #2338", "{x0}"(i64 [[TMP0]]) ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -346,13 +346,13 @@ define i32 @test_load32(ptr %a) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 3 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 16: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 21: ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-DYNAMIC-SHADOW: 22: @@ -379,10 +379,10 @@ define i32 @test_load32(ptr %a) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = inttoptr i64 [[TMP4]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 8: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 10: ; RECOVER-ZERO-BASED-SHADOW-NEXT: call void asm sideeffect "brk #2338", "{x0}"(i64 [[TMP0]]) ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -391,13 +391,13 @@ define i32 @test_load32(ptr %a) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 3 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 16: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 21: ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-ZERO-BASED-SHADOW: 22: @@ -438,7 +438,7 @@ define i64 @test_load64(ptr %a) sanitize_hwaddress { ; FASTPATH-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; FASTPATH-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; FASTPATH-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; FASTPATH-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF1]] +; FASTPATH-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF2]] ; FASTPATH: 8: ; FASTPATH-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 3) ; FASTPATH-NEXT: br label [[TMP9]] @@ -466,10 +466,10 @@ define i64 @test_load64(ptr %a) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 8: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 10: ; RECOVER-DYNAMIC-SHADOW-NEXT: call void asm sideeffect "brk #2339", "{x0}"(i64 [[TMP0]]) ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -478,13 +478,13 @@ define i64 @test_load64(ptr %a) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 7 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 16: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 21: ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-DYNAMIC-SHADOW: 22: @@ -511,10 +511,10 @@ define i64 @test_load64(ptr %a) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = inttoptr i64 [[TMP4]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 8: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 10: ; RECOVER-ZERO-BASED-SHADOW-NEXT: call void asm sideeffect "brk #2339", "{x0}"(i64 [[TMP0]]) ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -523,13 +523,13 @@ define i64 @test_load64(ptr %a) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 7 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 16: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 21: ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-ZERO-BASED-SHADOW: 22: @@ -570,7 +570,7 @@ define i128 @test_load128(ptr %a) sanitize_hwaddress { ; FASTPATH-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; FASTPATH-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; FASTPATH-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; FASTPATH-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF1]] +; FASTPATH-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF2]] ; FASTPATH: 8: ; FASTPATH-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 4) ; FASTPATH-NEXT: br label [[TMP9]] @@ -598,10 +598,10 @@ define i128 @test_load128(ptr %a) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 8: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 10: ; RECOVER-DYNAMIC-SHADOW-NEXT: call void asm sideeffect "brk #2340", "{x0}"(i64 [[TMP0]]) ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -610,13 +610,13 @@ define i128 @test_load128(ptr %a) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 15 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 16: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 21: ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-DYNAMIC-SHADOW: 22: @@ -643,10 +643,10 @@ define i128 @test_load128(ptr %a) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = inttoptr i64 [[TMP4]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 8: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 10: ; RECOVER-ZERO-BASED-SHADOW-NEXT: call void asm sideeffect "brk #2340", "{x0}"(i64 [[TMP0]]) ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -655,13 +655,13 @@ define i128 @test_load128(ptr %a) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 15 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 16: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 21: ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-ZERO-BASED-SHADOW: 22: @@ -771,7 +771,7 @@ define void @test_store8(ptr %a, i8 %b) sanitize_hwaddress { ; FASTPATH-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; FASTPATH-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; FASTPATH-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; FASTPATH-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF1]] +; FASTPATH-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF2]] ; FASTPATH: 8: ; FASTPATH-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 16) ; FASTPATH-NEXT: br label [[TMP9]] @@ -799,10 +799,10 @@ define void @test_store8(ptr %a, i8 %b) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 8: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 10: ; RECOVER-DYNAMIC-SHADOW-NEXT: call void asm sideeffect "brk #2352", "{x0}"(i64 [[TMP0]]) ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -811,13 +811,13 @@ define void @test_store8(ptr %a, i8 %b) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 0 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 16: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 21: ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-DYNAMIC-SHADOW: 22: @@ -844,10 +844,10 @@ define void @test_store8(ptr %a, i8 %b) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = inttoptr i64 [[TMP4]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 8: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 10: ; RECOVER-ZERO-BASED-SHADOW-NEXT: call void asm sideeffect "brk #2352", "{x0}"(i64 [[TMP0]]) ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -856,13 +856,13 @@ define void @test_store8(ptr %a, i8 %b) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 0 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 16: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 21: ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-ZERO-BASED-SHADOW: 22: @@ -903,7 +903,7 @@ define void @test_store16(ptr %a, i16 %b) sanitize_hwaddress { ; FASTPATH-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; FASTPATH-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; FASTPATH-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; FASTPATH-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF1]] +; FASTPATH-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF2]] ; FASTPATH: 8: ; FASTPATH-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 17) ; FASTPATH-NEXT: br label [[TMP9]] @@ -931,10 +931,10 @@ define void @test_store16(ptr %a, i16 %b) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 8: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 10: ; RECOVER-DYNAMIC-SHADOW-NEXT: call void asm sideeffect "brk #2353", "{x0}"(i64 [[TMP0]]) ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -943,13 +943,13 @@ define void @test_store16(ptr %a, i16 %b) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 16: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 21: ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-DYNAMIC-SHADOW: 22: @@ -976,10 +976,10 @@ define void @test_store16(ptr %a, i16 %b) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = inttoptr i64 [[TMP4]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 8: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 10: ; RECOVER-ZERO-BASED-SHADOW-NEXT: call void asm sideeffect "brk #2353", "{x0}"(i64 [[TMP0]]) ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -988,13 +988,13 @@ define void @test_store16(ptr %a, i16 %b) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 16: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 21: ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-ZERO-BASED-SHADOW: 22: @@ -1035,7 +1035,7 @@ define void @test_store32(ptr %a, i32 %b) sanitize_hwaddress { ; FASTPATH-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; FASTPATH-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; FASTPATH-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; FASTPATH-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF1]] +; FASTPATH-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF2]] ; FASTPATH: 8: ; FASTPATH-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 18) ; FASTPATH-NEXT: br label [[TMP9]] @@ -1063,10 +1063,10 @@ define void @test_store32(ptr %a, i32 %b) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 8: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 10: ; RECOVER-DYNAMIC-SHADOW-NEXT: call void asm sideeffect "brk #2354", "{x0}"(i64 [[TMP0]]) ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -1075,13 +1075,13 @@ define void @test_store32(ptr %a, i32 %b) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 3 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 16: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 21: ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-DYNAMIC-SHADOW: 22: @@ -1108,10 +1108,10 @@ define void @test_store32(ptr %a, i32 %b) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = inttoptr i64 [[TMP4]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 8: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 10: ; RECOVER-ZERO-BASED-SHADOW-NEXT: call void asm sideeffect "brk #2354", "{x0}"(i64 [[TMP0]]) ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -1120,13 +1120,13 @@ define void @test_store32(ptr %a, i32 %b) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 3 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 16: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 21: ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-ZERO-BASED-SHADOW: 22: @@ -1167,7 +1167,7 @@ define void @test_store64(ptr %a, i64 %b) sanitize_hwaddress { ; FASTPATH-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; FASTPATH-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; FASTPATH-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; FASTPATH-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF1]] +; FASTPATH-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF2]] ; FASTPATH: 8: ; FASTPATH-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 19) ; FASTPATH-NEXT: br label [[TMP9]] @@ -1195,10 +1195,10 @@ define void @test_store64(ptr %a, i64 %b) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 8: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 10: ; RECOVER-DYNAMIC-SHADOW-NEXT: call void asm sideeffect "brk #2355", "{x0}"(i64 [[TMP0]]) ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -1207,13 +1207,13 @@ define void @test_store64(ptr %a, i64 %b) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 7 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 16: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 21: ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-DYNAMIC-SHADOW: 22: @@ -1240,10 +1240,10 @@ define void @test_store64(ptr %a, i64 %b) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = inttoptr i64 [[TMP4]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 8: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 10: ; RECOVER-ZERO-BASED-SHADOW-NEXT: call void asm sideeffect "brk #2355", "{x0}"(i64 [[TMP0]]) ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -1252,13 +1252,13 @@ define void @test_store64(ptr %a, i64 %b) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 7 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 16: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 21: ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-ZERO-BASED-SHADOW: 22: @@ -1299,7 +1299,7 @@ define void @test_store128(ptr %a, i128 %b) sanitize_hwaddress { ; FASTPATH-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; FASTPATH-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; FASTPATH-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; FASTPATH-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF1]] +; FASTPATH-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP9:%.*]], !prof [[PROF2]] ; FASTPATH: 8: ; FASTPATH-NEXT: call void @llvm.hwasan.check.memaccess.shortgranules(ptr [[DOTHWASAN_SHADOW]], ptr [[A]], i32 20) ; FASTPATH-NEXT: br label [[TMP9]] @@ -1327,10 +1327,10 @@ define void @test_store128(ptr %a, i128 %b) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP5:%.*]] = getelementptr i8, ptr [[DOTHWASAN_SHADOW]], i64 [[TMP4]] ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 8: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 10: ; RECOVER-DYNAMIC-SHADOW-NEXT: call void asm sideeffect "brk #2356", "{x0}"(i64 [[TMP0]]) ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -1339,13 +1339,13 @@ define void @test_store128(ptr %a, i128 %b) sanitize_hwaddress { ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 15 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 16: ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-DYNAMIC-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-DYNAMIC-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-DYNAMIC-SHADOW: 21: ; RECOVER-DYNAMIC-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-DYNAMIC-SHADOW: 22: @@ -1372,10 +1372,10 @@ define void @test_store128(ptr %a, i128 %b) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP5:%.*]] = inttoptr i64 [[TMP4]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP6:%.*]] = load i8, ptr [[TMP5]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP7:%.*]] = icmp ne i8 [[TMP2]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP7]], label [[TMP8:%.*]], label [[TMP22:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 8: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP9:%.*]] = icmp ugt i8 [[TMP6]], 15 -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP9]], label [[TMP10:%.*]], label [[TMP11:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 10: ; RECOVER-ZERO-BASED-SHADOW-NEXT: call void asm sideeffect "brk #2356", "{x0}"(i64 [[TMP0]]) ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP21:%.*]] @@ -1384,13 +1384,13 @@ define void @test_store128(ptr %a, i128 %b) sanitize_hwaddress { ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i8 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP14:%.*]] = add i8 [[TMP13]], 15 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP15:%.*]] = icmp uge i8 [[TMP14]], [[TMP6]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP15]], label [[TMP10]], label [[TMP16:%.*]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 16: ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP17:%.*]] = or i64 [[TMP3]], 15 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP18:%.*]] = inttoptr i64 [[TMP17]] to ptr ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP19:%.*]] = load i8, ptr [[TMP18]], align 1 ; RECOVER-ZERO-BASED-SHADOW-NEXT: [[TMP20:%.*]] = icmp ne i8 [[TMP2]], [[TMP19]] -; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF1]] +; RECOVER-ZERO-BASED-SHADOW-NEXT: br i1 [[TMP20]], label [[TMP10]], label [[TMP21]], !prof [[PROF2]] ; RECOVER-ZERO-BASED-SHADOW: 21: ; RECOVER-ZERO-BASED-SHADOW-NEXT: br label [[TMP22]] ; RECOVER-ZERO-BASED-SHADOW: 22: diff --git a/llvm/test/Instrumentation/HWAddressSanitizer/mem-attr.ll b/llvm/test/Instrumentation/HWAddressSanitizer/mem-attr.ll index c0e370f20213aa..724e6c5a0bdec9 100644 --- a/llvm/test/Instrumentation/HWAddressSanitizer/mem-attr.ll +++ b/llvm/test/Instrumentation/HWAddressSanitizer/mem-attr.ll @@ -11,5 +11,13 @@ entry: ret void } -; CHECK: attributes #0 = { sanitize_hwaddress uwtable } +; CHECK: define dso_local void @test_readonly(ptr nocapture noundef readonly %p) local_unnamed_addr #0 +define dso_local void @test_readonly(ptr nocapture noundef readonly %p) local_unnamed_addr #1 { +entry: + store i32 42, ptr %p, align 4 + ret void +} + +; CHECK: attributes #0 = { nobuiltin sanitize_hwaddress uwtable } attributes #0 = { sanitize_hwaddress memory(argmem: write) uwtable } +attributes #1 = { sanitize_hwaddress memory(argmem: read) uwtable }