1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64 -o - -run-pass=early-tailduplication -verify-machineinstrs %s | FileCheck %s
4 # Reproducer for a problem found with an out-of-tree target. This being
5 # an attempt to re-create that for an in-tree target.
7 # When tail duplicator is duplicating the $s1 assignment into
8 # bb.0 it need to resolve both the subreg access in the PHI
9 # and the subreg access in the COPY.
11 # So what we expect is to find some thing like
12 # $s1 = COPY %0.dsub_then_ssub
13 # with two levels of subreg accesses (possibly composed into one subreg index).
18 tracksRegLiveness: true
20 ; CHECK-LABEL: name: foo2
22 ; CHECK-NEXT: successors: %bb.4(0x80000000)
23 ; CHECK-NEXT: liveins: $q1
25 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr128 = COPY $q1
26 ; CHECK-NEXT: $s1 = COPY [[COPY]].ssub
27 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:fpr64 = COPY [[COPY]].dsub
31 ; CHECK-NEXT: successors: %bb.4(0x80000000)
33 ; CHECK-NEXT: [[DEF:%[0-9]+]]:fpr128 = IMPLICIT_DEF
34 ; CHECK-NEXT: $s1 = COPY [[DEF]].ssub
35 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:fpr64 = COPY [[DEF]].dsub
39 ; CHECK-NEXT: successors: %bb.3(0x80000000)
44 ; CHECK-NEXT: successors: %bb.4(0x80000000)
54 %1:fpr128 = IMPLICIT_DEF
58 %2:fpr64 = PHI %0.dsub, %bb.0, %1.dsub, %bb.1