| Rafael Espindola | b8e08be | 2011-05-27 22:15:01 +0000 | [diff] [blame] | 1 | ; RUN: llc %s -mtriple=x86_64-pc-linux-gnu -O0 -o - | FileCheck %s |
| 2 | |
| 3 | ; We are testing that a value in a 16 bit register gets reported as |
| 4 | ; being in its superregister. |
| Rafael Espindola | b8e08be | 2011-05-27 22:15:01 +0000 | [diff] [blame] | 5 | |
| Adrian Prantl | b16d9eb | 2015-01-12 22:19:22 +0000 | [diff] [blame] | 6 | ; CHECK: .byte 80 # super-register DW_OP_reg0 |
| Adrian Prantl | 981f03e | 2017-03-16 17:14:56 +0000 | [diff] [blame] | 7 | ; No need to a piece at offset 0. |
| 8 | ; CHECK-NOT: DW_OP_piece |
| 9 | ; CHECK-NOT: DW_OP_bit_piece |
| Rafael Espindola | b8e08be | 2011-05-27 22:15:01 +0000 | [diff] [blame] | 10 | |
| Peter Collingbourne | d4bff30 | 2015-11-05 22:03:56 +0000 | [diff] [blame] | 11 | define i16 @f(i16 signext %zzz) nounwind !dbg !1 { |
| Rafael Espindola | b8e08be | 2011-05-27 22:15:01 +0000 | [diff] [blame] | 12 | entry: |
| Adrian Prantl | abe0475 | 2017-07-28 20:21:02 +0000 | [diff] [blame] | 13 | call void @llvm.dbg.value(metadata i16 %zzz, metadata !0, metadata !DIExpression()), !dbg !DILocation(scope: !1) |
| Rafael Espindola | b8e08be | 2011-05-27 22:15:01 +0000 | [diff] [blame] | 14 | %conv = sext i16 %zzz to i32, !dbg !7 |
| 15 | %conv1 = trunc i32 %conv to i16 |
| 16 | ret i16 %conv1 |
| 17 | } |
| 18 | |
| Adrian Prantl | abe0475 | 2017-07-28 20:21:02 +0000 | [diff] [blame] | 19 | declare void @llvm.dbg.value(metadata, metadata, metadata) nounwind readnone |
| Rafael Espindola | b8e08be | 2011-05-27 22:15:01 +0000 | [diff] [blame] | 20 | |
| David Blaikie | e5a2f70 | 2013-03-08 00:23:31 +0000 | [diff] [blame] | 21 | !llvm.dbg.cu = !{!3} |
| Manman Ren | 409558f | 2013-11-22 21:49:45 +0000 | [diff] [blame] | 22 | !llvm.module.flags = !{!11} |
| Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 23 | !9 = !{!1} |
| David Blaikie | e5a2f70 | 2013-03-08 00:23:31 +0000 | [diff] [blame] | 24 | |
| Duncan P. N. Exon Smith | ed013cd | 2015-07-31 18:58:39 +0000 | [diff] [blame] | 25 | !0 = !DILocalVariable(name: "zzz", line: 3, arg: 1, scope: !1, file: !2, type: !6) |
| Adrian Prantl | 75819ae | 2016-04-15 15:57:41 +0000 | [diff] [blame] | 26 | !1 = distinct !DISubprogram(name: "f", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !3, scopeLine: 3, file: !10, scope: !2, type: !4) |
| Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 27 | !2 = !DIFile(filename: "/home/espindola/llvm/test.c", directory: "/home/espindola/tmpfs/build") |
| Adrian Prantl | 75819ae | 2016-04-15 15:57:41 +0000 | [diff] [blame] | 28 | !3 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 ()", isOptimized: false, emissionKind: FullDebug, file: !10, enums: !{}, retainedTypes: !{}, imports: null) |
| Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 29 | !4 = !DISubroutineType(types: !5) |
| Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 30 | !5 = !{null} |
| Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 31 | !6 = !DIBasicType(tag: DW_TAG_base_type, name: "short", size: 16, align: 16, encoding: DW_ATE_signed) |
| 32 | !7 = !DILocation(line: 4, column: 22, scope: !8) |
| 33 | !8 = distinct !DILexicalBlock(line: 3, column: 19, file: !10, scope: !1) |
| 34 | !10 = !DIFile(filename: "/home/espindola/llvm/test.c", directory: "/home/espindola/tmpfs/build") |
| Duncan P. N. Exon Smith | e274180 | 2015-03-03 17:24:31 +0000 | [diff] [blame] | 35 | !11 = !{i32 1, !"Debug Info Version", i32 3} |