-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PPC]add DEBUG_COUNTER for PPCMIPeephole pass
- Loading branch information
1 parent
5820ad9
commit 0a0f1f9
Showing
3 changed files
with
173 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# 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-skip=0,ppc-xtoi-peephole-count=8 \ | ||
# 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-skip=3,ppc-xtoi-peephole-count=2 \ | ||
# 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-skip=5,ppc-xtoi-peephole-count=2 \ | ||
# 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-skip=3,ppc-xtoi-peephole-count=4 \ | ||
# 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 | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# 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-per-op-peephole-skip=0,ppc-per-op-peephole-count=6 \ | ||
# 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-per-op-peephole-skip=3,ppc-per-op-peephole-count=1 \ | ||
# RUN: | FileCheck %s --check-prefix=ONE-FIRST-RLWINM | ||
# RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -verify-machineinstrs \ | ||
# RUN: -run-pass ppc-mi-peepholes %s -o - -debug-counter=ppc-per-op-peephole-skip=4,ppc-per-op-peephole-count=1 \ | ||
# RUN: | FileCheck %s --check-prefix=ONE-SECOND-RLWINM | ||
# RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -verify-machineinstrs \ | ||
# RUN: -run-pass ppc-mi-peepholes %s -o - -debug-counter=ppc-per-op-peephole-skip=3,ppc-per-op-peephole-count=2 \ | ||
# RUN: | FileCheck %s --check-prefix=TWO | ||
|
||
--- | ||
name: testFoldRLWINM | ||
#CHECK: name: testFoldRLWINM | ||
tracksRegLiveness: true | ||
body: | | ||
bb.0.entry: | ||
liveins: $x3 | ||
; ALL-LABEL: name: testFoldRLWINM | ||
; ALL: liveins: $x3 | ||
; ALL-NEXT: {{ $}} | ||
; ALL-NEXT: [[COPY:%[0-9]+]]:g8rc = COPY killed $x3 | ||
; ALL-NEXT: [[COPY1:%[0-9]+]]:gprc = COPY killed [[COPY]].sub_32 | ||
; ALL-NEXT: dead [[RLWINM:%[0-9]+]]:gprc = RLWINM [[COPY1]], 14, 0, 12 | ||
; ALL-NEXT: dead [[RLWINM1:%[0-9]+]]:gprc = RLWINM [[COPY1]], 14, 0, 11 | ||
; ALL-NEXT: dead [[RLWINM2:%[0-9]+]]:gprc = RLWINM killed [[COPY1]], 14, 0, 10 | ||
; ALL-NEXT: BLR8 implicit $lr8, implicit $rm | ||
; | ||
; ONE-FIRST-RLWINM-LABEL: name: testFoldRLWINM | ||
; ONE-FIRST-RLWINM: liveins: $x3 | ||
; ONE-FIRST-RLWINM-NEXT: {{ $}} | ||
; ONE-FIRST-RLWINM-NEXT: [[COPY:%[0-9]+]]:g8rc = COPY killed $x3 | ||
; ONE-FIRST-RLWINM-NEXT: [[COPY1:%[0-9]+]]:gprc = COPY killed [[COPY]].sub_32 | ||
; ONE-FIRST-RLWINM-NEXT: [[RLWINM:%[0-9]+]]:gprc = RLWINM [[COPY1]], 27, 5, 31 | ||
; ONE-FIRST-RLWINM-NEXT: dead [[RLWINM1:%[0-9]+]]:gprc = RLWINM killed [[COPY1]], 14, 0, 12 | ||
; ONE-FIRST-RLWINM-NEXT: dead [[RLWINM2:%[0-9]+]]:gprc = RLWINM [[RLWINM]], 19, 0, 11 | ||
; ONE-FIRST-RLWINM-NEXT: dead [[RLWINM3:%[0-9]+]]:gprc = RLWINM killed [[RLWINM]], 19, 0, 10 | ||
; ONE-FIRST-RLWINM-NEXT: BLR8 implicit $lr8, implicit $rm | ||
; | ||
; ONE-SECOND-RLWINM-LABEL: name: testFoldRLWINM | ||
; ONE-SECOND-RLWINM: liveins: $x3 | ||
; ONE-SECOND-RLWINM-NEXT: {{ $}} | ||
; ONE-SECOND-RLWINM-NEXT: [[COPY:%[0-9]+]]:g8rc = COPY killed $x3 | ||
; ONE-SECOND-RLWINM-NEXT: [[COPY1:%[0-9]+]]:gprc = COPY killed [[COPY]].sub_32 | ||
; ONE-SECOND-RLWINM-NEXT: [[RLWINM:%[0-9]+]]:gprc = RLWINM [[COPY1]], 27, 5, 31 | ||
; ONE-SECOND-RLWINM-NEXT: dead [[RLWINM1:%[0-9]+]]:gprc = RLWINM [[RLWINM]], 19, 0, 12 | ||
; ONE-SECOND-RLWINM-NEXT: dead [[RLWINM2:%[0-9]+]]:gprc = RLWINM killed [[COPY1]], 14, 0, 11 | ||
; ONE-SECOND-RLWINM-NEXT: dead [[RLWINM3:%[0-9]+]]:gprc = RLWINM killed [[RLWINM]], 19, 0, 10 | ||
; ONE-SECOND-RLWINM-NEXT: BLR8 implicit $lr8, implicit $rm | ||
; | ||
; TWO-LABEL: name: testFoldRLWINM | ||
; TWO: liveins: $x3 | ||
; TWO-NEXT: {{ $}} | ||
; TWO-NEXT: [[COPY:%[0-9]+]]:g8rc = COPY killed $x3 | ||
; TWO-NEXT: [[COPY1:%[0-9]+]]:gprc = COPY killed [[COPY]].sub_32 | ||
; TWO-NEXT: [[RLWINM:%[0-9]+]]:gprc = RLWINM [[COPY1]], 27, 5, 31 | ||
; TWO-NEXT: dead [[RLWINM1:%[0-9]+]]:gprc = RLWINM [[COPY1]], 14, 0, 12 | ||
; TWO-NEXT: dead [[RLWINM2:%[0-9]+]]:gprc = RLWINM killed [[COPY1]], 14, 0, 11 | ||
; TWO-NEXT: dead [[RLWINM3:%[0-9]+]]:gprc = RLWINM killed [[RLWINM]], 19, 0, 10 | ||
; TWO-NEXT: BLR8 implicit $lr8, implicit $rm | ||
%0:g8rc = COPY $x3 | ||
%1:gprc = COPY %0.sub_32:g8rc | ||
%2:gprc = RLWINM %1:gprc, 27, 5, 31 | ||
%3:gprc = RLWINM %2:gprc, 19, 0, 12 | ||
%4:gprc = RLWINM %2:gprc, 19, 0, 11 | ||
%5:gprc = RLWINM %2:gprc, 19, 0, 10 | ||
BLR8 implicit $lr8, implicit $rm | ||
... |