1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 4
3 # RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -verify-machineinstrs \
4 # RUN: -run-pass ppc-mi-peepholes %s -o - | FileCheck %s --check-prefix=ALL
5 # RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -verify-machineinstrs \
6 # RUN: -run-pass ppc-mi-peepholes %s -o - -debug-counter=ppc-xtoi-peephole=0-7 \
7 # RUN: | FileCheck %s --check-prefix=ALL
8 # RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -verify-machineinstrs \
9 # RUN: -run-pass ppc-mi-peepholes %s -o - -debug-counter=ppc-xtoi-peephole=3-4 \
10 # RUN: | FileCheck %s --check-prefix=ONE-FIRSTSTORE
11 # RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -verify-machineinstrs \
12 # RUN: -run-pass ppc-mi-peepholes %s -o - -debug-counter=ppc-xtoi-peephole=5-6 \
13 # RUN: | FileCheck %s --check-prefix=ONE-SECONDSTORE
14 # RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -verify-machineinstrs \
15 # RUN: -run-pass ppc-mi-peepholes %s -o - -debug-counter=ppc-xtoi-peephole=3-6 \
16 # RUN: | FileCheck %s --check-prefix=TWO
20 tracksRegLiveness: true
25 ; ALL-LABEL: name: foldDForm
28 ; ALL-NEXT: [[COPY:%[0-9]+]]:g8rc_and_g8rc_nox0 = COPY killed $x3
29 ; ALL-NEXT: dead [[ADDI8_:%[0-9]+]]:g8rc_and_g8rc_nox0 = ADDI8 [[COPY]], 144
30 ; ALL-NEXT: [[LI8_:%[0-9]+]]:g8rc = LI8 0
31 ; ALL-NEXT: STD [[LI8_]], 160, [[COPY]]
32 ; ALL-NEXT: dead [[ADDI8_1:%[0-9]+]]:g8rc_and_g8rc_nox0 = ADDI8 [[COPY]], 160
33 ; ALL-NEXT: STD [[LI8_]], 176, [[COPY]]
34 ; ALL-NEXT: dead [[ADDI8_2:%[0-9]+]]:g8rc_and_g8rc_nox0 = ADDI8 [[COPY]], 176
35 ; ALL-NEXT: STD killed [[LI8_]], 192, killed [[COPY]]
36 ; ALL-NEXT: BLR8 implicit $lr8, implicit $rm
38 ; ONE-FIRSTSTORE-LABEL: name: foldDForm
39 ; ONE-FIRSTSTORE: liveins: $x3
40 ; ONE-FIRSTSTORE-NEXT: {{ $}}
41 ; ONE-FIRSTSTORE-NEXT: [[COPY:%[0-9]+]]:g8rc_and_g8rc_nox0 = COPY killed $x3
42 ; ONE-FIRSTSTORE-NEXT: dead [[ADDI8_:%[0-9]+]]:g8rc_and_g8rc_nox0 = ADDI8 [[COPY]], 144
43 ; ONE-FIRSTSTORE-NEXT: [[LI8_:%[0-9]+]]:g8rc = LI8 0
44 ; ONE-FIRSTSTORE-NEXT: STD [[LI8_]], 160, [[COPY]]
45 ; ONE-FIRSTSTORE-NEXT: [[ADDI8_1:%[0-9]+]]:g8rc_and_g8rc_nox0 = ADDI8 [[COPY]], 160
46 ; ONE-FIRSTSTORE-NEXT: STD [[LI8_]], 16, killed [[ADDI8_1]]
47 ; ONE-FIRSTSTORE-NEXT: [[ADDI8_2:%[0-9]+]]:g8rc_and_g8rc_nox0 = ADDI8 killed [[COPY]], 176
48 ; ONE-FIRSTSTORE-NEXT: STD killed [[LI8_]], 16, killed [[ADDI8_2]]
49 ; ONE-FIRSTSTORE-NEXT: BLR8 implicit $lr8, implicit $rm
51 ; ONE-SECONDSTORE-LABEL: name: foldDForm
52 ; ONE-SECONDSTORE: liveins: $x3
53 ; ONE-SECONDSTORE-NEXT: {{ $}}
54 ; ONE-SECONDSTORE-NEXT: [[COPY:%[0-9]+]]:g8rc_and_g8rc_nox0 = COPY killed $x3
55 ; ONE-SECONDSTORE-NEXT: [[ADDI8_:%[0-9]+]]:g8rc_and_g8rc_nox0 = ADDI8 [[COPY]], 144
56 ; ONE-SECONDSTORE-NEXT: [[LI8_:%[0-9]+]]:g8rc = LI8 0
57 ; ONE-SECONDSTORE-NEXT: STD [[LI8_]], 16, killed [[ADDI8_]]
58 ; ONE-SECONDSTORE-NEXT: dead [[ADDI8_1:%[0-9]+]]:g8rc_and_g8rc_nox0 = ADDI8 [[COPY]], 160
59 ; ONE-SECONDSTORE-NEXT: STD [[LI8_]], 176, [[COPY]]
60 ; ONE-SECONDSTORE-NEXT: [[ADDI8_2:%[0-9]+]]:g8rc_and_g8rc_nox0 = ADDI8 killed [[COPY]], 176
61 ; ONE-SECONDSTORE-NEXT: STD killed [[LI8_]], 16, killed [[ADDI8_2]]
62 ; ONE-SECONDSTORE-NEXT: BLR8 implicit $lr8, implicit $rm
64 ; TWO-LABEL: name: foldDForm
67 ; TWO-NEXT: [[COPY:%[0-9]+]]:g8rc_and_g8rc_nox0 = COPY killed $x3
68 ; TWO-NEXT: dead [[ADDI8_:%[0-9]+]]:g8rc_and_g8rc_nox0 = ADDI8 [[COPY]], 144
69 ; TWO-NEXT: [[LI8_:%[0-9]+]]:g8rc = LI8 0
70 ; TWO-NEXT: STD [[LI8_]], 160, [[COPY]]
71 ; TWO-NEXT: dead [[ADDI8_1:%[0-9]+]]:g8rc_and_g8rc_nox0 = ADDI8 [[COPY]], 160
72 ; TWO-NEXT: STD [[LI8_]], 176, [[COPY]]
73 ; TWO-NEXT: [[ADDI8_2:%[0-9]+]]:g8rc_and_g8rc_nox0 = ADDI8 killed [[COPY]], 176
74 ; TWO-NEXT: STD killed [[LI8_]], 16, killed [[ADDI8_2]]
75 ; TWO-NEXT: BLR8 implicit $lr8, implicit $rm
76 %0:g8rc_and_g8rc_nox0 = COPY $x3
77 %1:g8rc_and_g8rc_nox0 = ADDI8 %0:g8rc_and_g8rc_nox0, 144
79 STD %2:g8rc, 16, %1:g8rc_and_g8rc_nox0
80 %3:g8rc_and_g8rc_nox0 = ADDI8 %0:g8rc_and_g8rc_nox0, 160
81 STD %2:g8rc, 16, %3:g8rc_and_g8rc_nox0
82 %4:g8rc_and_g8rc_nox0 = ADDI8 %0:g8rc_and_g8rc_nox0, 176
83 STD killed %2:g8rc, 16, %4:g8rc_and_g8rc_nox0
84 BLR8 implicit $lr8, implicit $rm