| 1 |
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py |
| 2 |
# RUN: llc -mtriple=powerpc64le -simplify-mir -verify-machineinstrs \ |
| 3 |
# RUN: -run-pass=peephole-opt %s -o - | FileCheck %s |
| 4 |
|
| 5 |
# This tests to make sure that we do not generate subreg def |
| 6 |
# as it is illegal to generate subreg defs in machine SSA phase. |
| 7 |
|
| 8 |
--- |
| 9 |
name: test_peephole_subreg_def |
| 10 |
alignment: 16 |
| 11 |
tracksRegLiveness: true |
| 12 |
frameInfo: |
| 13 |
maxAlignment: 1 |
| 14 |
machineFunctionInfo: {} |
| 15 |
body: | |
| 16 |
bb.0.entry: |
| 17 |
liveins: $x3 |
| 18 |
|
| 19 |
; CHECK-LABEL: name: test_peephole_subreg_def |
| 20 |
; CHECK: liveins: $x3 |
| 21 |
; CHECK-NEXT: {{ $}} |
| 22 |
; CHECK-NEXT: [[COPY:%[0-9]+]]:g8rc_and_g8rc_nox0 = COPY $x3 |
| 23 |
; CHECK-NEXT: [[ADDI8_:%[0-9]+]]:g8rc = ADDI8 [[COPY]], 1 |
| 24 |
; CHECK-NEXT: [[EXTSW:%[0-9]+]]:g8rc_and_g8rc_nox0 = EXTSW [[ADDI8_]] |
| 25 |
; CHECK-NEXT: [[LI8_:%[0-9]+]]:g8rc = LI8 0 |
| 26 |
; CHECK-NEXT: STB8 [[LI8_]], 0, [[EXTSW]] |
| 27 |
; CHECK-NEXT: [[COPY1:%[0-9]+]]:gprc_and_gprc_nor0 = COPY [[EXTSW]].sub_32 |
| 28 |
; CHECK-NEXT: [[COPY2:%[0-9]+]]:gprc_and_gprc_nor0 = COPY [[EXTSW]].sub_32 |
| 29 |
; CHECK-NEXT: [[ADDI:%[0-9]+]]:gprc = ADDI killed [[COPY2]], 1 |
| 30 |
; CHECK-NEXT: [[EXTSW_32_64_:%[0-9]+]]:g8rc_and_g8rc_nox0 = EXTSW_32_64 killed [[ADDI]] |
| 31 |
; CHECK-NEXT: STB8 [[LI8_]], 0, killed [[EXTSW_32_64_]] |
| 32 |
%0:g8rc_and_g8rc_nox0 = COPY $x3 |
| 33 |
%1:g8rc = ADDI8 %0, 1 |
| 34 |
%2:g8rc_and_g8rc_nox0 = EXTSW %1 |
| 35 |
%3:g8rc = LI8 0 |
| 36 |
STB8 %3, 0, killed %2 |
| 37 |
%4:gprc_and_gprc_nor0 = COPY %1.sub_32 |
| 38 |
%5:gprc = ADDI killed %4, 1 |
| 39 |
%6:g8rc_and_g8rc_nox0 = EXTSW_32_64 killed %5 |
| 40 |
STB8 %3, 0, killed %6 |
| 41 |
|
| 42 |
... |