File tree Expand file tree Collapse file tree 6 files changed +55
-0
lines changed Expand file tree Collapse file tree 6 files changed +55
-0
lines changed Original file line number Diff line number Diff line change @@ -5589,6 +5589,7 @@ void LLVMToSPIRVBase::transFunction(Function *I) {
5589
5589
// is used to ensure blocks are written in the right order.
5590
5590
const DominatorTree DT (*I);
5591
5591
for (BasicBlock &FI : stablePreDominatorTraversal (*I, DT)) {
5592
+ FI.convertFromNewDbgValues ();
5592
5593
transValue (&FI, nullptr );
5593
5594
}
5594
5595
for (auto &FI : *I) {
Original file line number Diff line number Diff line change 5
5
// RUN: llvm-spirv %t.spv -to-text -o - | FileCheck %s --check-prefix=CHECK-SPIRV
6
6
// RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o - | FileCheck %s --check-prefix=CHECK-LLVM
7
7
8
+ // RUN: %clang_cc1 %s -triple spir -disable-llvm-passes -debug-info-kind=standalone -emit-llvm-bc -o - | llvm-spirv -spirv-mem2reg -o %t.spv
9
+ // RUN: llvm-spirv --experimental-debuginfo-iterators=1 %t.spv -to-text -o - | FileCheck %s --check-prefix=CHECK-SPIRV
10
+ // RUN: llvm-spirv -r --experimental-debuginfo-iterators=1 %t.spv -o - | llvm-dis -o - | FileCheck %s --check-prefix=CHECK-LLVM
11
+
8
12
9
13
void foo () {
10
14
int a ;
Original file line number Diff line number Diff line change 15
15
; RUN: llvm-spirv -r %t.spv -o %t.rev.bc
16
16
; RUN: llvm-dis < %t.rev.bc | FileCheck %s --check-prefix=CHECK-LLVM-200
17
17
18
+ ; RUN: llvm-as %s -o %t.bc
19
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-allow-extra-diexpressions --experimental-debuginfo-iterators=1
20
+ ; RUN: llvm-spirv %t.spv -to-text -o %t.spt --experimental-debuginfo-iterators=1
21
+ ; RUN: FileCheck < %t.spt %s --check-prefixes=CHECK-SPIRV-OCL
22
+ ; RUN: llvm-spirv -r --experimental-debuginfo-iterators=1 %t.spv -o %t.rev.bc
23
+ ; RUN: llvm-dis < %t.rev.bc | FileCheck %s --check-prefix=CHECK-LLVM-OCL
24
+
25
+ ; RUN: llvm-as %s -o %t.bc
26
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200 --experimental-debuginfo-iterators=1
27
+ ; RUN: llvm-spirv %t.spv -to-text -o %t.spt --experimental-debuginfo-iterators=1
28
+ ; RUN: FileCheck < %t.spt %s --check-prefixes=CHECK-SPIRV-200
29
+ ; RUN: llvm-spirv -r --experimental-debuginfo-iterators=1 %t.spv -o %t.rev.bc
30
+ ; RUN: llvm-dis < %t.rev.bc | FileCheck %s --check-prefix=CHECK-LLVM-200
31
+
18
32
; CHECK-SPIRV-200-DAG: TypeInt [[#INT32:]] 32 0
19
33
; CHECK-SPIRV-200-DAG: Constant [[#INT32:]] [[#CONST1:]] 1 {{$}}
20
34
; CHECK-SPIRV-200-DAG: Constant [[#INT32]] [[#CONST0:]] 0
Original file line number Diff line number Diff line change 13
13
; RUN: llvm-dis %t.rev.bc -o %t.rev.ll
14
14
; RUN: FileCheck %s --input-file %t.rev.ll --check-prefix CHECK-LLVM
15
15
16
+ ; RUN: llvm-as %s -o %t.bc
17
+ ; RUN: llvm-spirv %t.bc -spirv-text -o %t.spt --experimental-debuginfo-iterators=1
18
+ ; RUN: FileCheck %s --input-file %t.spt --check-prefixes=CHECK-SPIRV,CHECK-SPIRV-OCL
19
+ ; RUN: llvm-spirv %t.bc -o %t.spv --experimental-debuginfo-iterators=1
20
+ ; RUN: llvm-spirv -r %t.spv -o %t.rev.bc --experimental-debuginfo-iterators=1
21
+ ; RUN: llvm-dis %t.rev.bc -o %t.rev.ll
22
+ ; RUN: FileCheck %s --input-file %t.rev.ll --check-prefix CHECK-LLVM
23
+
24
+ ; RUN: llvm-spirv %t.bc -spirv-text --spirv-debug-info-version=nonsemantic-shader-100 -o %t.spt --experimental-debuginfo-iterators=1
25
+ ; RUN: FileCheck %s --input-file %t.spt --check-prefixes=CHECK-SPIRV,CHECK-SPIRV-NONSEM
26
+ ; RUN: llvm-spirv %t.bc --spirv-debug-info-version=nonsemantic-shader-100 -o %t.spv --experimental-debuginfo-iterators=1
27
+ ; RUN: llvm-spirv -r %t.spv -o %t.rev.bc --experimental-debuginfo-iterators=1
28
+ ; RUN: llvm-dis %t.rev.bc -o %t.rev.ll
29
+ ; RUN: FileCheck %s --input-file %t.rev.ll --check-prefix CHECK-LLVM
30
+
16
31
; CHECK-SPIRV: String [[#Str_C:]] "C"
17
32
; CHECK-SPIRV: String [[#Str_B:]] "B"
18
33
; CHECK-SPIRV: String [[#Str_A:]] "A"
Original file line number Diff line number Diff line change 4
4
; RUN: llvm-dis %t.bc -o %t.ll
5
5
; RUN: FileCheck %s --input-file %t.ll -check-prefix=LLVM
6
6
7
+ ; RUN: llvm-as %s -o %t.bc
8
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-ext=+all --spirv-allow-unknown-intrinsics --experimental-debuginfo-iterators=1
9
+ ; RUN: llvm-spirv -r %t.spv -o %t.bc --experimental-debuginfo-iterators=1
10
+ ; RUN: llvm-dis %t.bc -o %t.ll
11
+ ; RUN: FileCheck %s --input-file %t.ll -check-prefix=LLVM
12
+
7
13
; ModuleID = 'test.bc'
8
14
source_filename = "test.cl"
9
15
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
Original file line number Diff line number Diff line change 13
13
; RUN: llc -mtriple=%triple -dwarf-version=5 -filetype=obj -O0 < %t.rev.ll
14
14
; RUN: llc -mtriple=%triple -dwarf-version=4 -filetype=obj -O0 < %t.rev.ll
15
15
16
+ ; RUN: llvm-as < %s -o %t.bc
17
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-allow-extra-diexpressions --experimental-debuginfo-iterators=1
18
+ ; RUN: llvm-spirv -r --experimental-debuginfo-iterators=1 %t.spv -o - | llvm-dis -o %t.rev.ll
19
+ ; RUN: FileCheck %s --input-file %t.rev.ll
20
+
21
+ ; RUN: llc -mtriple=%triple -dwarf-version=5 -filetype=obj -O0 < %t.rev.ll
22
+ ; RUN: llc -mtriple=%triple -dwarf-version=4 -filetype=obj -O0 < %t.rev.ll
23
+
24
+ ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-debug-info-version=nonsemantic-shader-200 --experimental-debuginfo-iterators=1
25
+ ; RUN: llvm-spirv -r --experimental-debuginfo-iterators=1 %t.spv -o - | llvm-dis -o %t.rev.ll
26
+ ; RUN: FileCheck %s --input-file %t.rev.ll
27
+
28
+ ; RUN: llc -mtriple=%triple -dwarf-version=5 -filetype=obj -O0 < %t.rev.ll
29
+ ; RUN: llc -mtriple=%triple -dwarf-version=4 -filetype=obj -O0 < %t.rev.ll
30
+
16
31
; CHECK: DW_OP_constu, 42
17
32
; CHECK: DW_OP_plus_uconst, 42
18
33
; CHECK: DW_OP_plus
You can’t perform that action at this time.
0 commit comments