; 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{{$}}
; 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){{$}}
; 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
; 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]]{{$}}
; 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{{$}}
; 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{{$}}
}
; 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)