File: merge-locations-legalizer.mir

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (30 lines) | stat: -rw-r--r-- 1,353 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# This test checks to make sure that when an instruction (%3 in the test) is 
# moved due to matching a result of a fold of two other instructions
# (%1, and %2 in the test) in the legalizer, the DILocation of the 
# instruction that is moved (%3) is updated appropriately.

# RUN: llc %s -run-pass=legalizer -mtriple=aarch64 -o - | FileCheck %s 
# CHECK-NOT: %2:_(s32) = G_CONSTANT i32 0, debug-location !DILocation(line: 13
# CHECK: %2:_(s32) = G_CONSTANT i32 0, debug-location !DILocation(line: 0,
--- |
  
  define i32 @main(i32 %0, ptr %1) #0 !dbg !57 {
  entry:
    ret i32 0, !dbg !71
  }
  !3 = !DIFile(filename: "main.swift", directory: "/Volumes/Data/swift")
  !23 = distinct !DICompileUnit(language: DW_LANG_Swift, file: !3, sdk: "blah.sdk")
  !57 = distinct !DISubprogram(name: "main", unit: !23)
  !64 = distinct !DILexicalBlock(scope: !57, column: 1)
  !66 = distinct !DILexicalBlock(scope: !64, column: 1)
  !68 = !DILocation(line: 12, scope: !66)
  !70 = distinct !DILexicalBlock(scope: !66, column: 1)
  !71 = !DILocation(line: 13, scope: !70)
name:            main
body:             |
  bb.0:
    %1:_(s8) = G_CONSTANT i8 0, debug-location !68
    %2:_(s32) = G_ANYEXT %1(s8), debug-location !68
    $w2 = COPY %2(s32), debug-location !68
    %3:_(s32) = G_CONSTANT i32 0, debug-location !71
    $w0 = COPY %3(s32), debug-location !71