Skip to content

Commit fb7dd26

Browse files
committed
Add test
1 parent 1c7ada8 commit fb7dd26

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
; RUN: llc %s -o - -stop-after=livedebugvalues -opt-bisect-limit=1 | FileCheck %s
2+
; RUN: llc %s -o - -stop-after=livedebugvalues -opt-bisect-limit=10 | FileCheck %s
3+
; RUN: llc %s -o - -stop-after=livedebugvalues -opt-bisect-limit=100 | FileCheck %s
4+
5+
; RUN: llc %s -o - -stop-after=livedebugvalues -opt-bisect-limit=1 -fast-isel=true | FileCheck %s
6+
; RUN: llc %s -o - -stop-after=livedebugvalues -opt-bisect-limit=10 -fast-isel=true | FileCheck %s
7+
; RUN: llc %s -o - -stop-after=livedebugvalues -opt-bisect-limit=100 -fast-isel=true | FileCheck %s
8+
9+
; This test has the same purpose as the instr-ref-opt-bisect.ll, to check if
10+
; during opt-bisect's optimisation level change we won't run into an assert.
11+
; This is simply testing different IR.
12+
13+
; CHECK: DBG_VALUE
14+
15+
target triple = "x86_64-pc-windows-msvc"
16+
17+
define i1 @foo(i32 %arg) !dbg !3 {
18+
entry:
19+
#dbg_value(i32 %arg, !4, !DIExpression(), !5)
20+
switch i32 %arg, label %bb [
21+
i32 810, label %bb
22+
], !dbg !5
23+
bb:
24+
%a = load volatile i1, ptr null, align 1
25+
ret i1 false
26+
}
27+
28+
!llvm.dbg.cu = !{!0}
29+
!llvm.module.flags = !{!2}
30+
31+
!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, emissionKind: FullDebug)
32+
!1 = !DIFile(filename: "instr-ref-opt-bisect2.ll", directory: ".")
33+
!2 = !{i32 2, !"Debug Info Version", i32 3}
34+
!3 = distinct !DISubprogram(name: "instr-ref-opt-bisect2", file: !1, unit: !0)
35+
!4 = !DILocalVariable(name: "arg", arg: 2, scope: !3)
36+
!5 = !DILocation(line: 0, scope: !3)
37+

0 commit comments

Comments
 (0)