
The MI Peephole pass has grown to include a large number of transformations over the years. Many of the transformations require re-computation of kill flags but don't do a good job of re-computing them. This causes us to have very common failures when the compiler is built with expensive checks. Over time, we added and augmented a function that is supposed to go and fix up kill flags after each transformation but we keep missing cases. This patch does the following: - Removes the function to re-compute kill flags - Adds LiveVariables to compute and maintain kill flags while transforming code - Adds re-computation of kill flags for the post-RA peepholes for each block that contains a transformed instruction Reviewed By: stefanp Differential Revision: https://reviews.llvm.org/D133103
23 lines
730 B
YAML
23 lines
730 B
YAML
# RUN: llc -mtriple=powerpc64-unknown-unknown -stop-after ppc-pre-emit-peephole \
|
|
# RUN: %s -o - -verify-machineinstrs | FileCheck %s
|
|
|
|
---
|
|
name: testRedundantLiImplicitReg
|
|
tracksRegLiveness: true
|
|
body: |
|
|
bb.0.entry:
|
|
liveins: $x3, $x4, $x5
|
|
|
|
STW killed $r3, killed $x5, 100
|
|
renamable $x5 = LI8 2
|
|
renamable $x4 = exact SRD killed renamable $x4, killed renamable $r5, implicit $x5
|
|
STD $x4, $x4, 100
|
|
BLR8 implicit $lr8, implicit $rm
|
|
|
|
; CHECK-LABEL: testRedundantLiImplicitReg
|
|
; CHECK: bb.0.entry:
|
|
; CHECK: STW killed $r3, killed $x5, 100
|
|
; CHECK: renamable $x4 = exact RLDICL killed renamable $x4, 62, 2
|
|
; CHECK: STD killed $x4, killed $x4, 100
|
|
; CHECK: BLR8 implicit $lr8, implicit $rm
|