1 # RUN: llc -mtriple thumbv6m-none-eabi -run-pass=opt-phis -verify-machineinstrs -o - %s | FileCheck %s
2 # RUN: llc -mtriple thumbv6m-none-eabi -passes=opt-phis -verify-machineinstrs -o - %s | FileCheck %s
4 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
5 target triple = "thumbv6m-arm-none-eabi"
7 define i32 @funca() { unreachable }
12 tracksRegLiveness: true
15 successors: %bb.2(0x40000000), %bb.3(0x40000000)
17 %0:tgpr, dead $cpsr = tMOVi8 255, 14, $noreg
18 %1:tgpr, dead $cpsr = tMOVi8 128, 14, $noreg
19 tCMPi8 %0, 0, 14, $noreg, implicit-def $cpsr
23 successors: %bb.3(0x80000000)
26 successors: %bb.0(0x80000000)
28 %2:tgpr = PHI %0, %bb.2, %0, %bb.0
29 %3:tgpr, $cpsr = tSUBrr %1, killed %2, 14, $noreg
30 %4:tgpr, $cpsr = tADDrr killed %3, killed %0, 14, $noreg
33 # Make sure the kill flags are not incorrect
34 # CHECK-LABEL: name: funca
36 # CHECK: tSUBrr %1, %0
37 # CHECK: tADDrr killed %3, %0