1 # RUN: llc -run-pass=peephole-opt -verify-machineinstrs -o - %s | FileCheck %s
3 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
4 target triple = "thumbv7-none-eabi"
6 define i32 @test(i32 %a, i32 %b) {
13 tracksRegLiveness: true
15 - { reg: '$r0', virtual-reg: '%0' }
16 - { reg: '$r1', virtual-reg: '%1' }
23 %2:rgpr = t2MOVi 1, 14, $noreg, $noreg
24 %3:gprnopc = t2ADDrr %0, %1, 14, $noreg, $noreg
25 %4:gprnopc = t2SUBri %3, 0, 14, $noreg, def dead $cpsr
26 t2CMPri killed %3, 0, 14, $noreg, implicit-def $cpsr
27 %5:rgpr = t2MOVCCi %2, 0, 7, $cpsr
29 tBX_RET 14, $noreg, implicit $r0
31 # CHECK-LABEL: name: test
32 # CHECK: %3:gprnopc = t2ADDrr %0, %1, 14, $noreg, $noreg
33 # CHECK-NEXT: %4:gprnopc = t2SUBri %3, 0, 14, $noreg, def $cpsr
34 # CHECK-NEXT: %5:rgpr = t2MOVCCi %2, 0, 7, $cpsr