1
1
; Check that MC/DC intrinsics are properly lowered
2
- ; RUN: opt < %s -passes=instrprof -S | FileCheck %s
2
+ ; RUN: opt < %s -passes=instrprof -S | FileCheck %s --check-prefixes=CHECK,BASIC
3
3
; RUN: opt < %s -passes=instrprof -runtime-counter-relocation -S 2>&1 | FileCheck %s --check-prefix RELOC
4
4
5
5
; RELOC: Runtime counter relocation is presently not supported for MC/DC bitmaps
@@ -8,14 +8,14 @@ target triple = "x86_64-unknown-linux-gnu"
8
8
9
9
@__profn_test = private constant [4 x i8 ] c "test"
10
10
11
- ; CHECK: @__profbm_test = private global [1 x i8] zeroinitializer, section "__llvm_prf_bits", comdat, align 1
11
+ ; BASIC: [[PROFBM_ADDR: @__profbm_test]] = private global [1 x i8] zeroinitializer, section "__llvm_prf_bits", comdat, align 1
12
12
13
13
define dso_local void @test (i32 noundef %A ) {
14
14
entry:
15
15
%A.addr = alloca i32 , align 4
16
16
%mcdc.addr = alloca i32 , align 4
17
17
call void @llvm.instrprof.cover (ptr @__profn_test , i64 99278 , i32 5 , i32 0 )
18
- ; CHECK : store i8 0, ptr @__profc_test, align 1
18
+ ; BASIC : store i8 0, ptr @__profc_test, align 1
19
19
20
20
call void @llvm.instrprof.mcdc.parameters (ptr @__profn_test , i64 99278 , i32 1 )
21
21
store i32 0 , ptr %mcdc.addr , align 4
@@ -26,13 +26,13 @@ entry:
26
26
; CHECK: %[[TEMP0:mcdc.*]] = load i32, ptr %mcdc.addr, align 4
27
27
; CHECK-NEXT: %[[TEMP:[0-9]+]] = add i32 %[[TEMP0]], 0
28
28
; CHECK-NEXT: %[[LAB4:[0-9]+]] = lshr i32 %[[TEMP]], 3
29
- ; CHECK-NEXT: %[[LAB7:[0-9]+]] = getelementptr inbounds i8, ptr @__profbm_test , i32 %[[LAB4]]
29
+ ; CHECK-NEXT: %[[LAB7:[0-9]+]] = getelementptr inbounds i8, ptr [[PROFBM_ADDR]] , i32 %[[LAB4]]
30
30
; CHECK-NEXT: %[[LAB8:[0-9]+]] = and i32 %[[TEMP]], 7
31
31
; CHECK-NEXT: %[[LAB9:[0-9]+]] = trunc i32 %[[LAB8]] to i8
32
32
; CHECK-NEXT: %[[LAB10:[0-9]+]] = shl i8 1, %[[LAB9]]
33
33
; CHECK-NEXT: %[[BITS:mcdc.*]] = load i8, ptr %[[LAB7]], align 1
34
- ; CHECK -NEXT: %[[LAB11:[0-9]+]] = or i8 %[[BITS]], %[[LAB10]]
35
- ; CHECK -NEXT: store i8 %[[LAB11]], ptr %[[LAB7]], align 1
34
+ ; BASIC -NEXT: %[[LAB11:[0-9]+]] = or i8 %[[BITS]], %[[LAB10]]
35
+ ; BASIC -NEXT: store i8 %[[LAB11]], ptr %[[LAB7]], align 1
36
36
ret void
37
37
}
38
38
0 commit comments