1 # RUN: llc -o - %s -mtriple=armv7-- -verify-machineinstrs -run-pass=peephole-opt | FileCheck %s
3 # Make sure we do not crash on this input.
4 # Note that this input could in principle be optimized, but right now we don't
5 # have this case implemented so the output should simply be unchanged.
7 # CHECK-LABEL: name: func
10 # CHECK: Bcc %bb.2, 1, undef $cpsr
13 # CHECK: %0:dpr = IMPLICIT_DEF
14 # CHECK: %1:gpr, %2:gpr = VMOVRRD %0, 14, $noreg
18 # CHECK: %3:spr = IMPLICIT_DEF
19 # CHECK: %4:gpr = VMOVRS %3, 14, $noreg
22 # CHECK: %5:gpr = PHI %1, %bb.1, %4, %bb.2
23 # CHECK: %6:spr = VMOVSR %5, 14, $noreg
26 tracksRegLiveness: true
29 Bcc %bb.2, 1, undef $cpsr
33 %1:gpr, %2:gpr = VMOVRRD %0:dpr, 14, $noreg
38 %4:gpr = VMOVRS %3:spr, 14, $noreg
41 %5:gpr = PHI %1, %bb.1, %4, %bb.2
42 %6:spr = VMOVSR %5, 14, $noreg
45 # CHECK-LABEL: name: func1
46 # CHECK: %6:spr = PHI %0, %bb.1, %2, %bb.2
47 # CHECK: %7:spr = COPY %6
50 tracksRegLiveness: true
53 Bcc %bb.2, 1, undef $cpsr
57 %0:gpr = VMOVRS %1, 14, $noreg
62 %2:gpr = VMOVRS %3:spr, 14, $noreg
65 %4:gpr = PHI %0, %bb.1, %2, %bb.2
66 %5:spr = VMOVSR %4, 14, $noreg
69 # The current implementation doesn't perform any transformations if undef
70 # operands are involved.
71 # CHECK-LABEL: name: func-undefops
74 # CHECK: Bcc %bb.2, 1, undef $cpsr
77 # CHECK: %0:gpr = VMOVRS undef %1:spr, 14, $noreg
81 # CHECK: %2:gpr = VMOVRS undef %3:spr, 14, $noreg
84 # CHECK: %4:gpr = PHI %0, %bb.1, %2, %bb.2
85 # CHECK: %5:spr = VMOVSR %4, 14, $noreg
88 tracksRegLiveness: true
91 Bcc %bb.2, 1, undef $cpsr
94 %0:gpr = VMOVRS undef %1:spr, 14, $noreg
98 %2:gpr = VMOVRS undef %3:spr, 14, $noreg
101 %4:gpr = PHI %0, %bb.1, %2, %bb.2
102 %5:spr = VMOVSR %4, 14, $noreg