# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 4
# REQUIRES: asserts
# RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -verify-machineinstrs \
# RUN: -run-pass ppc-mi-peepholes %s -o - | FileCheck %s --check-prefix=ALL
# RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -verify-machineinstrs \
# RUN: -run-pass ppc-mi-peepholes %s -o - -debug-counter=ppc-xtoi-peephole=0-7 \
# RUN: | FileCheck %s --check-prefix=ALL
# RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -verify-machineinstrs \
# RUN: -run-pass ppc-mi-peepholes %s -o - -debug-counter=ppc-xtoi-peephole=3-4 \
# RUN: | FileCheck %s --check-prefix=ONE-FIRSTSTORE
# RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -verify-machineinstrs \
# RUN: -run-pass ppc-mi-peepholes %s -o - -debug-counter=ppc-xtoi-peephole=5-6 \
# RUN: | FileCheck %s --check-prefix=ONE-SECONDSTORE
# RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -verify-machineinstrs \
# RUN: -run-pass ppc-mi-peepholes %s -o - -debug-counter=ppc-xtoi-peephole=3-6 \
# RUN: | FileCheck %s --check-prefix=TWO
---
name: foldDForm
tracksRegLiveness: true
body: |
bb.0.entry:
liveins: $x3
; ALL-LABEL: name: foldDForm
; ALL: liveins: $x3
; ALL-NEXT: {{ $}}
; ALL-NEXT: [[COPY:%[0-9]+]]:g8rc_and_g8rc_nox0 = COPY killed $x3
; ALL-NEXT: dead [[ADDI8_:%[0-9]+]]:g8rc_and_g8rc_nox0 = ADDI8 [[COPY]], 144
; ALL-NEXT: [[LI8_:%[0-9]+]]:g8rc = LI8 0
; ALL-NEXT: STD [[LI8_]], 160, [[COPY]]
; ALL-NEXT: dead [[ADDI8_1:%[0-9]+]]:g8rc_and_g8rc_nox0 = ADDI8 [[COPY]], 160
; ALL-NEXT: STD [[LI8_]], 176, [[COPY]]
; ALL-NEXT: dead [[ADDI8_2:%[0-9]+]]:g8rc_and_g8rc_nox0 = ADDI8 [[COPY]], 176
; ALL-NEXT: STD killed [[LI8_]], 192, killed [[COPY]]
; ALL-NEXT: BLR8 implicit $lr8, implicit $rm
;
; ONE-FIRSTSTORE-LABEL: name: foldDForm
; ONE-FIRSTSTORE: liveins: $x3
; ONE-FIRSTSTORE-NEXT: {{ $}}
; ONE-FIRSTSTORE-NEXT: [[COPY:%[0-9]+]]:g8rc_and_g8rc_nox0 = COPY killed $x3
; ONE-FIRSTSTORE-NEXT: dead [[ADDI8_:%[0-9]+]]:g8rc_and_g8rc_nox0 = ADDI8 [[COPY]], 144
; ONE-FIRSTSTORE-NEXT: [[LI8_:%[0-9]+]]:g8rc = LI8 0
; ONE-FIRSTSTORE-NEXT: STD [[LI8_]], 160, [[COPY]]
; ONE-FIRSTSTORE-NEXT: [[ADDI8_1:%[0-9]+]]:g8rc_and_g8rc_nox0 = ADDI8 [[COPY]], 160
; ONE-FIRSTSTORE-NEXT: STD [[LI8_]], 16, killed [[ADDI8_1]]
; ONE-FIRSTSTORE-NEXT: [[ADDI8_2:%[0-9]+]]:g8rc_and_g8rc_nox0 = ADDI8 killed [[COPY]], 176
; ONE-FIRSTSTORE-NEXT: STD killed [[LI8_]], 16, killed [[ADDI8_2]]
; ONE-FIRSTSTORE-NEXT: BLR8 implicit $lr8, implicit $rm
;
; ONE-SECONDSTORE-LABEL: name: foldDForm
; ONE-SECONDSTORE: liveins: $x3
; ONE-SECONDSTORE-NEXT: {{ $}}
; ONE-SECONDSTORE-NEXT: [[COPY:%[0-9]+]]:g8rc_and_g8rc_nox0 = COPY killed $x3
; ONE-SECONDSTORE-NEXT: [[ADDI8_:%[0-9]+]]:g8rc_and_g8rc_nox0 = ADDI8 [[COPY]], 144
; ONE-SECONDSTORE-NEXT: [[LI8_:%[0-9]+]]:g8rc = LI8 0
; ONE-SECONDSTORE-NEXT: STD [[LI8_]], 16, killed [[ADDI8_]]
; ONE-SECONDSTORE-NEXT: dead [[ADDI8_1:%[0-9]+]]:g8rc_and_g8rc_nox0 = ADDI8 [[COPY]], 160
; ONE-SECONDSTORE-NEXT: STD [[LI8_]], 176, [[COPY]]
; ONE-SECONDSTORE-NEXT: [[ADDI8_2:%[0-9]+]]:g8rc_and_g8rc_nox0 = ADDI8 killed [[COPY]], 176
; ONE-SECONDSTORE-NEXT: STD killed [[LI8_]], 16, killed [[ADDI8_2]]
; ONE-SECONDSTORE-NEXT: BLR8 implicit $lr8, implicit $rm
;
; TWO-LABEL: name: foldDForm
; TWO: liveins: $x3
; TWO-NEXT: {{ $}}
; TWO-NEXT: [[COPY:%[0-9]+]]:g8rc_and_g8rc_nox0 = COPY killed $x3
; TWO-NEXT: dead [[ADDI8_:%[0-9]+]]:g8rc_and_g8rc_nox0 = ADDI8 [[COPY]], 144
; TWO-NEXT: [[LI8_:%[0-9]+]]:g8rc = LI8 0
; TWO-NEXT: STD [[LI8_]], 160, [[COPY]]
; TWO-NEXT: dead [[ADDI8_1:%[0-9]+]]:g8rc_and_g8rc_nox0 = ADDI8 [[COPY]], 160
; TWO-NEXT: STD [[LI8_]], 176, [[COPY]]
; TWO-NEXT: [[ADDI8_2:%[0-9]+]]:g8rc_and_g8rc_nox0 = ADDI8 killed [[COPY]], 176
; TWO-NEXT: STD killed [[LI8_]], 16, killed [[ADDI8_2]]
; TWO-NEXT: BLR8 implicit $lr8, implicit $rm
%0:g8rc_and_g8rc_nox0 = COPY $x3
%1:g8rc_and_g8rc_nox0 = ADDI8 %0:g8rc_and_g8rc_nox0, 144
%2:g8rc = LI8 0
STD %2:g8rc, 16, %1:g8rc_and_g8rc_nox0
%3:g8rc_and_g8rc_nox0 = ADDI8 %0:g8rc_and_g8rc_nox0, 160
STD %2:g8rc, 16, %3:g8rc_and_g8rc_nox0
%4:g8rc_and_g8rc_nox0 = ADDI8 %0:g8rc_and_g8rc_nox0, 176
STD killed %2:g8rc, 16, %4:g8rc_and_g8rc_nox0
BLR8 implicit $lr8, implicit $rm
...