1*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=hexagon -enable-misched=false < %s | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker; This testcase causes the scheduler to crash for some reason. Disable 3*9880d681SAndroid Build Coastguard Worker; it for now. 4*9880d681SAndroid Build Coastguard Worker 5*9880d681SAndroid Build Coastguard Workertarget datalayout = "e-m:e-p:32:32-i64:64-a:0-v32:32-n16:32" 6*9880d681SAndroid Build Coastguard Workertarget triple = "hexagon-unknown--elf" 7*9880d681SAndroid Build Coastguard Worker 8*9880d681SAndroid Build Coastguard Worker; Check that allocframe was packetized with the two adds. 9*9880d681SAndroid Build Coastguard Worker; CHECK: foo: 10*9880d681SAndroid Build Coastguard Worker; CHECK: { 11*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: allocframe 12*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: add 13*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: add 14*9880d681SAndroid Build Coastguard Worker; CHECK: } 15*9880d681SAndroid Build Coastguard Worker; CHECK: dealloc_return 16*9880d681SAndroid Build Coastguard Worker; CHECK: } 17*9880d681SAndroid Build Coastguard Worker 18*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind 19*9880d681SAndroid Build Coastguard Workerdefine i32 @foo(i32 %x, i32 %y) #0 !dbg !4 { 20*9880d681SAndroid Build Coastguard Workerentry: 21*9880d681SAndroid Build Coastguard Worker tail call void @llvm.dbg.value(metadata i32 %x, i64 0, metadata !9, metadata !14), !dbg !15 22*9880d681SAndroid Build Coastguard Worker tail call void @llvm.dbg.value(metadata i32 %y, i64 0, metadata !10, metadata !14), !dbg !16 23*9880d681SAndroid Build Coastguard Worker %add = add nsw i32 %x, 1, !dbg !17 24*9880d681SAndroid Build Coastguard Worker %add1 = add nsw i32 %y, 1, !dbg !18 25*9880d681SAndroid Build Coastguard Worker %call = tail call i32 @bar(i32 %add, i32 %add1) #3, !dbg !19 26*9880d681SAndroid Build Coastguard Worker %add2 = add nsw i32 %call, 1, !dbg !20 27*9880d681SAndroid Build Coastguard Worker ret i32 %add2, !dbg !21 28*9880d681SAndroid Build Coastguard Worker} 29*9880d681SAndroid Build Coastguard Worker 30*9880d681SAndroid Build Coastguard Workerdeclare i32 @bar(i32, i32) #1 31*9880d681SAndroid Build Coastguard Worker 32*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind readnone 33*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.dbg.value(metadata, i64, metadata, metadata) #2 34*9880d681SAndroid Build Coastguard Worker 35*9880d681SAndroid Build Coastguard Workerattributes #0 = { nounwind "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="hexagonv4" "unsafe-fp-math"="false" "use-soft-float"="false" } 36*9880d681SAndroid Build Coastguard Workerattributes #1 = { "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="hexagonv4" "unsafe-fp-math"="false" "use-soft-float"="false" } 37*9880d681SAndroid Build Coastguard Workerattributes #2 = { nounwind readnone } 38*9880d681SAndroid Build Coastguard Workerattributes #3 = { nounwind } 39*9880d681SAndroid Build Coastguard Worker 40*9880d681SAndroid Build Coastguard Worker!llvm.dbg.cu = !{!0} 41*9880d681SAndroid Build Coastguard Worker!llvm.module.flags = !{!11, !12} 42*9880d681SAndroid Build Coastguard Worker!llvm.ident = !{!13} 43*9880d681SAndroid Build Coastguard Worker 44*9880d681SAndroid Build Coastguard Worker!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (http://llvm.org/git/clang.git 15506a21305e212c406f980ed9b6b1bac785df56)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) 45*9880d681SAndroid Build Coastguard Worker!1 = !DIFile(filename: "cfi-late.c", directory: "/test") 46*9880d681SAndroid Build Coastguard Worker!2 = !{} 47*9880d681SAndroid Build Coastguard Worker!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, variables: !8) 48*9880d681SAndroid Build Coastguard Worker!5 = !DISubroutineType(types: !6) 49*9880d681SAndroid Build Coastguard Worker!6 = !{!7, !7, !7} 50*9880d681SAndroid Build Coastguard Worker!7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) 51*9880d681SAndroid Build Coastguard Worker!8 = !{!9, !10} 52*9880d681SAndroid Build Coastguard Worker!9 = !DILocalVariable(name: "x", arg: 1, scope: !4, file: !1, line: 3, type: !7) 53*9880d681SAndroid Build Coastguard Worker!10 = !DILocalVariable(name: "y", arg: 2, scope: !4, file: !1, line: 3, type: !7) 54*9880d681SAndroid Build Coastguard Worker!11 = !{i32 2, !"Dwarf Version", i32 4} 55*9880d681SAndroid Build Coastguard Worker!12 = !{i32 2, !"Debug Info Version", i32 3} 56*9880d681SAndroid Build Coastguard Worker!13 = !{!"clang version 3.8.0 (http://llvm.org/git/clang.git 15506a21305e212c406f980ed9b6b1bac785df56)"} 57*9880d681SAndroid Build Coastguard Worker!14 = !DIExpression() 58*9880d681SAndroid Build Coastguard Worker!15 = !DILocation(line: 3, column: 13, scope: !4) 59*9880d681SAndroid Build Coastguard Worker!16 = !DILocation(line: 3, column: 20, scope: !4) 60*9880d681SAndroid Build Coastguard Worker!17 = !DILocation(line: 4, column: 15, scope: !4) 61*9880d681SAndroid Build Coastguard Worker!18 = !DILocation(line: 4, column: 20, scope: !4) 62*9880d681SAndroid Build Coastguard Worker!19 = !DILocation(line: 4, column: 10, scope: !4) 63*9880d681SAndroid Build Coastguard Worker!20 = !DILocation(line: 4, column: 24, scope: !4) 64*9880d681SAndroid Build Coastguard Worker!21 = !DILocation(line: 4, column: 3, scope: !4) 65