1 ; RUN: llc -march=hexagon -enable-misched=false < %s | FileCheck %s
2 ; This testcase causes the scheduler to crash for some reason. Disable
5 target datalayout = "e-m:e-p:32:32-i64:64-a:0-v32:32-n16:32"
6 target triple = "hexagon-unknown--elf"
8 ; Check that allocframe was packetized with the two adds.
11 ; CHECK-DAG: allocframe
15 ; CHECK: dealloc_return
18 ; Function Attrs: nounwind
19 define i32 @foo(i32 %x, i32 %y) #0 !dbg !4 {
21 tail call void @llvm.dbg.value(metadata i32 %x, i64 0, metadata !9, metadata !14), !dbg !15
22 tail call void @llvm.dbg.value(metadata i32 %y, i64 0, metadata !10, metadata !14), !dbg !16
23 %add = add nsw i32 %x, 1, !dbg !17
24 %add1 = add nsw i32 %y, 1, !dbg !18
25 %call = tail call i32 @bar(i32 %add, i32 %add1) #3, !dbg !19
26 %add2 = add nsw i32 %call, 1, !dbg !20
27 ret i32 %add2, !dbg !21
30 declare i32 @bar(i32, i32) #1
32 ; Function Attrs: nounwind readnone
33 declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #2
35 attributes #0 = { nounwind "target-cpu"="hexagonv5" }
36 attributes #1 = { "target-cpu"="hexagonv5" }
37 attributes #2 = { nounwind readnone }
38 attributes #3 = { nounwind }
41 !llvm.module.flags = !{!11, !12}
44 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
45 !1 = !DIFile(filename: "cfi-late.c", directory: "/test")
47 !4 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: true, unit: !0, retainedNodes: !8)
48 !5 = !DISubroutineType(types: !6)
50 !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
52 !9 = !DILocalVariable(name: "x", arg: 1, scope: !4, file: !1, line: 3, type: !7)
53 !10 = !DILocalVariable(name: "y", arg: 2, scope: !4, file: !1, line: 3, type: !7)
54 !11 = !{i32 2, !"Dwarf Version", i32 4}
55 !12 = !{i32 2, !"Debug Info Version", i32 3}
56 !13 = !{!"clang version 3.8.0"}
58 !15 = !DILocation(line: 3, column: 13, scope: !4)
59 !16 = !DILocation(line: 3, column: 20, scope: !4)
60 !17 = !DILocation(line: 4, column: 15, scope: !4)
61 !18 = !DILocation(line: 4, column: 20, scope: !4)
62 !19 = !DILocation(line: 4, column: 10, scope: !4)
63 !20 = !DILocation(line: 4, column: 24, scope: !4)
64 !21 = !DILocation(line: 4, column: 3, scope: !4)