File: taildup-subreg-compose.mir

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,998,520 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (68 lines) | stat: -rw-r--r-- 1,896 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=aarch64 -o - -run-pass=early-tailduplication -verify-machineinstrs %s | FileCheck %s

# Reproducer for a problem found with an out-of-tree target. This being
# an attempt to re-create that for an in-tree target.
#
# When tail duplicator is duplicating the $s1 assignment into
# bb.0 it need to resolve both the subreg access in the PHI
# and the subreg access in the COPY.
#
# So what we expect is to find some thing like
#   $s1 = COPY %0.dsub_then_ssub
# with two levels of subreg accesses (possibly composed into one subreg index).


---
name:            foo2
tracksRegLiveness: true
body:             |
  ; CHECK-LABEL: name: foo2
  ; CHECK: bb.0.entry:
  ; CHECK-NEXT:   successors: %bb.4(0x80000000)
  ; CHECK-NEXT:   liveins: $q1
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   [[COPY:%[0-9]+]]:fpr128 = COPY $q1
  ; CHECK-NEXT:   $s1 = COPY [[COPY]].ssub
  ; CHECK-NEXT:   [[COPY1:%[0-9]+]]:fpr64 = COPY [[COPY]].dsub
  ; CHECK-NEXT:   B %bb.4
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.1:
  ; CHECK-NEXT:   successors: %bb.4(0x80000000)
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
  ; CHECK-NEXT:   $s1 = COPY [[DEF]].ssub
  ; CHECK-NEXT:   [[COPY2:%[0-9]+]]:fpr64 = COPY [[DEF]].dsub
  ; CHECK-NEXT:   B %bb.4
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.3:
  ; CHECK-NEXT:   successors: %bb.3(0x80000000)
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   B %bb.3
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.4:
  ; CHECK-NEXT:   successors: %bb.4(0x80000000)
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   B %bb.4
  bb.0.entry:
    liveins: $q1

    %0:fpr128 = COPY $q1
    B %bb.2

  bb.1:
    %1:fpr128 = IMPLICIT_DEF
    B %bb.2

  bb.2:
    %2:fpr64 = PHI %0.dsub, %bb.0, %1.dsub, %bb.1
    $s1 = COPY %2.ssub
    B %bb.4

  bb.3:
    B %bb.3

  bb.4:
    B %bb.4
...