Michael Kuperstein | 5842b20 | 2016-12-07 19:31:08 +0000 | [diff] [blame] | 1 | ; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s |
| 2 | |
| 3 | declare void @raf(i32, ...) |
| 4 | |
| 5 | ; CHECK-LABEL: test3 |
| 6 | ; CHECK-DAG: movl $7, %edi |
| 7 | ; CHECK-DAG: xorl %esi, %esi |
| 8 | ; CHECK-DAG: xorl %edx, %edx |
| 9 | ; CHECK-DAG: xorl %ecx, %ecx |
| 10 | ; CHECK-DAG: xorl %r8d, %r8d |
| 11 | ; CHECK-DAG: xorl %r9d, %r9d |
| 12 | ; CHECK-DAG: xorl %eax, %eax |
| 13 | ; CHECK: pushq %rbx |
| 14 | ; CHECK: pushq $0 |
| 15 | ; CHECK: callq raf |
| 16 | |
| 17 | |
| 18 | ; Function Attrs: nounwind uwtable |
| 19 | define void @test3() { |
| 20 | entry: |
| 21 | br label %for.body |
| 22 | |
| 23 | for.body: |
| 24 | %i.04 = phi i32 [ 0, %entry ], [ %inc, %for.body ] |
| 25 | tail call void @llvm.dbg.value(metadata i32 %i.04, i64 0, metadata !10, metadata !12), !dbg !6 |
| 26 | tail call void (i32, ...) @raf(i32 7, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 %i.04) |
| 27 | %inc = add nuw nsw i32 %i.04, 1 |
| 28 | %exitcond = icmp eq i32 %inc, 21 |
| 29 | br i1 %exitcond, label %for.cond.cleanup, label %for.body |
| 30 | |
| 31 | for.cond.cleanup: |
| 32 | ret void |
| 33 | } |
| 34 | |
| 35 | ; Function Attrs: nounwind readnone |
| 36 | declare void @llvm.dbg.value(metadata, i64, metadata, metadata) |
| 37 | attributes #3 = { nounwind } |
| 38 | |
| 39 | !llvm.dbg.cu = !{!0} |
| 40 | !llvm.module.flags = !{!3, !4} |
| 41 | !llvm.ident = !{!5} |
| 42 | |
| 43 | !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 4.0.0 (trunk 288844)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) |
| 44 | !1 = !DIFile(filename: "pr31242.c", directory: "") |
| 45 | !2 = !{} |
| 46 | !3 = !{i32 2, !"Dwarf Version", i32 4} |
| 47 | !4 = !{i32 2, !"Debug Info Version", i32 3} |
| 48 | !5 = !{!"clang version 4.0.0 (trunk 288844)"} |
| 49 | !6 = !DILocation(line: 2, column: 16, scope: !7) |
| 50 | !7 = distinct !DISubprogram(name: "test3", scope: !1, file: !1, line: 5, type: !8, isLocal: false, isDefinition: true, scopeLine: 5, isOptimized: true, unit: !0) |
| 51 | !8 = !DISubroutineType(types: !9) |
| 52 | !9 = !{null} |
| 53 | !10 = !DILocalVariable(name: "value", arg: 1, scope: !7, file: !1, line: 2, type: !11) |
| 54 | !11 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) |
| 55 | !12 = !DIExpression() |