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
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.
9 name: test_peephole_subreg_def
11 tracksRegLiveness: true
14 machineFunctionInfo: {}
19 ; CHECK-LABEL: name: test_peephole_subreg_def
21 ; CHECK: [[COPY:%[0-9]+]]:g8rc_and_g8rc_nox0 = COPY $x3
22 ; CHECK: [[ADDI8_:%[0-9]+]]:g8rc = ADDI8 [[COPY]], 1
23 ; CHECK: [[EXTSW:%[0-9]+]]:g8rc_and_g8rc_nox0 = EXTSW [[ADDI8_]]
24 ; CHECK: [[LI8_:%[0-9]+]]:g8rc = LI8 0
25 ; CHECK: STB8 [[LI8_]], 0, [[EXTSW]]
26 ; CHECK: [[COPY1:%[0-9]+]]:gprc_and_gprc_nor0 = COPY [[EXTSW]].sub_32
27 ; CHECK: [[COPY2:%[0-9]+]]:gprc_and_gprc_nor0 = COPY [[COPY1]]
28 ; CHECK: [[ADDI:%[0-9]+]]:gprc = ADDI killed [[COPY2]], 1
29 ; CHECK: [[EXTSW_32_64_:%[0-9]+]]:g8rc_and_g8rc_nox0 = EXTSW_32_64 killed [[ADDI]]
30 ; CHECK: STB8 [[LI8_]], 0, killed [[EXTSW_32_64_]]
31 %0:g8rc_and_g8rc_nox0 = COPY $x3
33 %2:g8rc_and_g8rc_nox0 = EXTSW %1
36 %4:gprc_and_gprc_nor0 = COPY %1.sub_32
37 %5:gprc = ADDI killed %4, 1
38 %6:g8rc_and_g8rc_nox0 = EXTSW_32_64 killed %5