From b861ec87348ec9ee0d5e346fa7dab889bc0ec32f Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Tue, 12 Apr 2016 20:12:05 +0000 Subject: [PATCH] [WebAssembly] Fix debug info in reg-stackify.ll test It lacked a CU and thus became invalid with r266102 llvm-svn: 266114 --- llvm/test/CodeGen/WebAssembly/reg-stackify.ll | 41 +++++++++++++++------------ 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/llvm/test/CodeGen/WebAssembly/reg-stackify.ll b/llvm/test/CodeGen/WebAssembly/reg-stackify.ll index cfc2c57..b171b63 100644 --- a/llvm/test/CodeGen/WebAssembly/reg-stackify.ll +++ b/llvm/test/CodeGen/WebAssembly/reg-stackify.ll @@ -50,7 +50,7 @@ define i32 @yes1(i32* %q) { ; rearranged to make the stack contiguous. ; CHECK-LABEL: stack_uses: -; CHECK-NEXT: .param i32, i32, i32, i32{{$}} +; CHECK: .param i32, i32, i32, i32{{$}} ; CHECK-NEXT: .result i32{{$}} ; CHECK-NEXT: block{{$}} ; CHECK-NEXT: i32.const $push13=, 1{{$}} @@ -93,7 +93,7 @@ false: ; be trivially stackified. However, it can be stackified with a tee_local. ; CHECK-LABEL: multiple_uses: -; CHECK-NEXT: .param i32, i32, i32{{$}} +; CHECK: .param i32, i32, i32{{$}} ; CHECK-NEXT: .local i32{{$}} ; CHECK-NEXT: block{{$}} ; CHECK-NEXT: i32.load $push[[NUM0:[0-9]+]]=, 0($2){{$}} @@ -151,7 +151,7 @@ entry: ; tree order. ; CHECK-LABEL: div_tree: -; CHECK-NEXT: .param i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32{{$}} +; CHECK: .param i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32{{$}} ; CHECK-NEXT: .result i32{{$}} ; CHECK-NEXT: i32.div_s $push0=, $0, $1 ; CHECK-NEXT: i32.div_s $push1=, $2, $3 @@ -192,7 +192,7 @@ entry: ; A simple multiple-use case. ; CHECK-LABEL: simple_multiple_use: -; CHECK-NEXT: .param i32, i32{{$}} +; CHECK: .param i32, i32{{$}} ; CHECK-NEXT: i32.mul $push[[NUM0:[0-9]+]]=, $1, $0{{$}} ; CHECK-NEXT: tee_local $push[[NUM1:[0-9]+]]=, $0=, $pop[[NUM0]]{{$}} ; CHECK-NEXT: call use_a@FUNCTION, $pop[[NUM1]]{{$}} @@ -210,7 +210,7 @@ define void @simple_multiple_use(i32 %x, i32 %y) { ; Multiple uses of the same value in one instruction. ; CHECK-LABEL: multiple_uses_in_same_insn: -; CHECK-NEXT: .param i32, i32{{$}} +; CHECK: .param i32, i32{{$}} ; CHECK-NEXT: i32.mul $push[[NUM0:[0-9]+]]=, $1, $0{{$}} ; CHECK-NEXT: tee_local $push[[NUM1:[0-9]+]]=, $0=, $pop[[NUM0]]{{$}} ; CHECK-NEXT: call use_2@FUNCTION, $pop[[NUM1]], $0{{$}} @@ -225,7 +225,8 @@ define void @multiple_uses_in_same_insn(i32 %x, i32 %y) { ; Commute operands to achieve better stackifying. ; CHECK-LABEL: commute: -; CHECK-NEXT: .result i32{{$}} +; CHECK-NOT: param +; CHECK: .result i32{{$}} ; CHECK-NEXT: i32.call $push0=, red@FUNCTION{{$}} ; CHECK-NEXT: i32.call $push1=, green@FUNCTION{{$}} ; CHECK-NEXT: i32.add $push2=, $pop0, $pop1{{$}} @@ -348,21 +349,25 @@ define i32 @store_past_invar_load(i32 %a, i32* %p1, i32* dereferenceable(4) %p2) } ; CHECK-LABEL: ignore_dbg_value: +; CHECK-NEXT: .Lfunc_begin ; CHECK-NEXT: unreachable declare void @llvm.dbg.value(metadata, i64, metadata, metadata) define void @ignore_dbg_value() { - call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !1, metadata !7), !dbg !8 + call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !7, metadata !9), !dbg !10 unreachable } -!llvm.module.flags = !{!9} - -!0 = !{} -!1 = !DILocalVariable(name: "nzcnt", scope: !2, file: !3, line: 15, type: !6) -!2 = distinct !DISubprogram(name: "test", scope: !3, file: !3, line: 10, type: !4, isLocal: false, isDefinition: true, scopeLine: 11, flags: DIFlagPrototyped, isOptimized: true, variables: !0) -!3 = !DIFile(filename: "test.c", directory: "/") -!4 = !DISubroutineType(types: !0) -!6 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) -!7 = !DIExpression() -!8 = !DILocation(line: 15, column: 6, scope: !2) -!9 = !{i32 2, !"Debug Info Version", i32 3} +!llvm.module.flags = !{!0} +!llvm.dbg.cu = !{!1} + +!0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 3.9.0 (trunk 266005) (llvm/trunk 266105)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !3, subprograms: !4) +!2 = !DIFile(filename: "test.c", directory: "/") +!3 = !{} +!4 = !{!5} +!5 = distinct !DISubprogram(name: "test", scope: !2, file: !2, line: 10, type: !6, isLocal: false, isDefinition: true, scopeLine: 11, flags: DIFlagPrototyped, isOptimized: true, variables: !3) +!6 = !DISubroutineType(types: !3) +!7 = !DILocalVariable(name: "nzcnt", scope: !5, file: !2, line: 15, type: !8) +!8 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) +!9 = !DIExpression() +!10 = !DILocation(line: 15, column: 6, scope: !5) -- 2.7.4