70 lines · plain
1# RUN: llc -mtriple=aarch64 -run-pass aarch64-mi-peephole-opt -verify-machineinstrs -o - %s | FileCheck %s2---3name: test14# CHECK-LABEL: name: test15alignment: 46tracksRegLiveness: true7registers:8 - { id: 0, class: gpr32 }9 - { id: 1, class: gpr32 }10 - { id: 2, class: gpr32 }11 - { id: 3, class: gpr32 }12 - { id: 4, class: gpr64 }13body: |14 bb.0:15 liveins: $w0, $w116 17 %0:gpr32 = COPY $w018 %1:gpr32 = COPY $w119 B %bb.120 21 bb.1:22 %2:gpr32 = nsw ADDWrr %0, %123 B %bb.224 25 bb.2:26 ; CHECK-LABEL: bb.2:27 ; CHECK-NOT: %3:gpr32 = ORRWrs $wzr, %2, 028 ; The ORRWrs should be removed.29 %3:gpr32 = ORRWrs $wzr, %2, 030 %4:gpr64 = SUBREG_TO_REG 0, %3, %subreg.sub_3231 B %bb.332 33 bb.3:34 $x0 = COPY %435 RET_ReallyLR implicit $x036...37---38name: test239# CHECK-LABEL: name: test240alignment: 441tracksRegLiveness: true42registers:43 - { id: 0, class: gpr64 }44 - { id: 1, class: gpr32 }45 - { id: 2, class: gpr32 }46 - { id: 3, class: gpr64 }47body: |48 bb.0:49 liveins: $x050 51 %0:gpr64 = COPY $x052 B %bb.153 54 bb.1:55 %1:gpr32 = EXTRACT_SUBREG %0, %subreg.sub_3256 B %bb.257 58 bb.2:59 ; CHECK-LABEL: bb.2:60 ; CHECK: %2:gpr32 = ORRWrs $wzr, %1, 061 ; The ORRWrs should not be removed.62 %2:gpr32 = ORRWrs $wzr, %1, 063 %3:gpr64 = SUBREG_TO_REG 0, %2, %subreg.sub_3264 B %bb.365 66 bb.3:67 $x0 = COPY %368 RET_ReallyLR implicit $x069...70