reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    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
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=aarch64-apple-ios -run-pass=greedy -run-pass=virtregrewriter %s -o - | FileCheck %s
---
name: func0
body: |
  bb.0:
    ; Make sure we don't clobber q3 when we expand the bundle
    ; CHECK-LABEL: name: func0
    ; CHECK: $x0 = IMPLICIT_DEF
    ; CHECK: $q0_q1_q2_q3 = IMPLICIT_DEF
    ; CHECK: $q4 = COPY $q3
    ; CHECK: $q1_q2_q3 = COPY $q0_q1_q2
    ; CHECK: ST4i64 $q1_q2_q3_q4, 0, $x0
    $x0 = IMPLICIT_DEF
    $q0_q1_q2_q3 = IMPLICIT_DEF
    $q1_q2_q3 = COPY $q0_q1_q2 {
      $q4 = COPY $q3
    }
    ST4i64 $q1_q2_q3_q4, 0, $x0

...
---
name: func1
body: |
  bb.0:
    ; If it was already ordered, make sure we don't break it
    ; CHECK-LABEL: name: func1
    ; CHECK: $x0 = IMPLICIT_DEF
    ; CHECK: $q0_q1_q2_q3 = IMPLICIT_DEF
    ; CHECK: $q4 = COPY $q3
    ; CHECK: $q1_q2_q3 = COPY $q0_q1_q2
    ; CHECK: ST4i64 $q1_q2_q3_q4, 0, $x0
    $x0 = IMPLICIT_DEF
    $q0_q1_q2_q3 = IMPLICIT_DEF
    $q4 = COPY $q3 {
      $q1_q2_q3 = COPY $q0_q1_q2
    }
    ST4i64 $q1_q2_q3_q4, 0, $x0

...
---
name: func2
body: |
  bb.0:
    ; A bit less realistic, but check that we handle multiple nodes
    ; CHECK-LABEL: name: func2
    ; CHECK: $x0 = IMPLICIT_DEF
    ; CHECK: $q0_q1_q2_q3 = IMPLICIT_DEF
    ; CHECK: $q3 = COPY $q2
    ; CHECK: $q4 = COPY $q1
    ; CHECK: $q1_q2 = COPY $q0_q1
    ; CHECK: ST4i64 $q1_q2_q3_q4, 0, $x0
    $x0 = IMPLICIT_DEF
    $q0_q1_q2_q3 = IMPLICIT_DEF
    $q1_q2 = COPY $q0_q1 {
      $q3 = COPY $q2
      $q4 = COPY $q1
    }
    ST4i64 $q1_q2_q3_q4, 0, $x0

...
---
name: func3
body: |
  bb.0:
    ; If there was nothing wrong, don't change the order for no reason
    ; CHECK-LABEL: name: func3
    ; CHECK: $x0 = IMPLICIT_DEF
    ; CHECK: $q1_q2_q3_q4 = IMPLICIT_DEF
    ; CHECK: $q0_q1 = COPY $q1_q2
    ; CHECK: $q2_q3 = COPY $q3_q4
    ; CHECK: ST4i64 $q0_q1_q2_q3, 0, $x0
    $x0 = IMPLICIT_DEF
    $q1_q2_q3_q4 = IMPLICIT_DEF
    $q0_q1 = COPY $q1_q2 {
      $q2_q3 = COPY $q3_q4
    }
    ST4i64 $q0_q1_q2_q3, 0, $x0

...