1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple thumbv7-apple-ios -run-pass none -o - %s | FileCheck %s
3 # This test ensures that the MIR parser parses the bundled machine instructions
4 # and 'internal' register flags correctly.
8 define i32 @test1(i32 %a) {
10 %cmp = icmp sgt i32 %a, -78
11 %. = zext i1 %cmp to i32
15 define i32 @test2(i32 %a) {
17 %cmp = icmp sgt i32 %a, -78
18 %. = zext i1 %cmp to i32
25 tracksRegLiveness: true
31 ; CHECK-LABEL: name: test1
33 ; CHECK: $r1 = t2MOVi 0, 14 /* CC::al */, $noreg, $noreg
34 ; CHECK: t2CMNri killed $r0, 78, 14 /* CC::al */, $noreg, implicit-def $cpsr
35 ; CHECK: BUNDLE implicit-def dead $itstate, implicit-def $r1, implicit killed $cpsr {
36 ; CHECK: t2IT 12, 8, implicit-def $itstate
37 ; CHECK: $r1 = t2MOVi 1, 12 /* CC::gt */, killed $cpsr, $noreg, implicit internal killed $itstate
39 ; CHECK: $r0 = tMOVr killed $r1, 14 /* CC::al */, $noreg
40 ; CHECK: tBX_RET 14 /* CC::al */, $noreg, implicit killed $r0
41 $r1 = t2MOVi 0, 14, _, _
42 t2CMNri killed $r0, 78, 14, _, implicit-def $cpsr
43 BUNDLE implicit-def dead $itstate, implicit-def $r1, implicit killed $cpsr {
44 t2IT 12, 8, implicit-def $itstate
45 $r1 = t2MOVi 1, 12, killed $cpsr, _, implicit internal killed $itstate
47 $r0 = tMOVr killed $r1, 14, _
48 tBX_RET 14, _, implicit killed $r0
52 tracksRegLiveness: true
59 ; Verify that the next machine instruction can be on the same line as
62 ; CHECK-LABEL: name: test2
64 ; CHECK: $r1 = t2MOVi 0, 14 /* CC::al */, $noreg, $noreg
65 ; CHECK: t2CMNri killed $r0, 78, 14 /* CC::al */, $noreg, implicit-def $cpsr
66 ; CHECK: BUNDLE implicit-def dead $itstate, implicit-def $r1, implicit killed $cpsr {
67 ; CHECK: t2IT 12, 8, implicit-def $itstate
68 ; CHECK: $r1 = t2MOVi 1, 12 /* CC::gt */, killed $cpsr, $noreg, implicit internal killed $itstate
70 ; CHECK: $r0 = tMOVr killed $r1, 14 /* CC::al */, $noreg
71 ; CHECK: tBX_RET 14 /* CC::al */, $noreg, implicit killed $r0
72 $r1 = t2MOVi 0, 14, _, _
73 t2CMNri killed $r0, 78, 14, _, implicit-def $cpsr
74 BUNDLE implicit-def dead $itstate, implicit-def $r1, implicit killed $cpsr { t2IT 12, 8, implicit-def $itstate
75 $r1 = t2MOVi 1, 12, killed $cpsr, _, internal implicit killed $itstate
76 } $r0 = tMOVr killed $r1, 14, _
77 tBX_RET 14, _, implicit killed $r0