1# RUN: llc %s -run-pass machine-scheduler -o - | FileCheck %s
2
3# CHECK-LABEL: bb.0.
4# CHECK: t2LDRi12
5# CHECK-NEXT: t2LDRi12
6# CHECK-NEXT: t2ADDri
7# CHECK-NEXT: t2ADDri
8--- |
9  target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
10  target triple = "thumbv7em-arm-none-eabi"
11
12  ; Function Attrs: norecurse nounwind optsize readonly
13  define dso_local i32 @test(i32* nocapture readonly %a, i32* nocapture readonly %b) local_unnamed_addr #0 {
14  entry:
15    %0 = load i32, i32* %a, align 4
16    %add = add nsw i32 %0, 10
17    %1 = load i32, i32* %b, align 4
18    %add1 = add nsw i32 %1, 20
19    %mul = mul nsw i32 %add1, %add
20    ret i32 %mul
21  }
22
23  attributes #0 = { "target-cpu"="cortex-m4" }
24
25...
26---
27name:            test
28alignment:       2
29exposesReturnsTwice: false
30legalized:       false
31regBankSelected: false
32selected:        false
33failedISel:      false
34tracksRegLiveness: true
35registers:
36  - { id: 0, class: gpr, preferred-register: '' }
37  - { id: 1, class: gpr, preferred-register: '' }
38  - { id: 2, class: gprnopc, preferred-register: '' }
39  - { id: 3, class: rgpr, preferred-register: '' }
40  - { id: 4, class: gprnopc, preferred-register: '' }
41  - { id: 5, class: rgpr, preferred-register: '' }
42  - { id: 6, class: rgpr, preferred-register: '' }
43liveins:
44  - { reg: '$r0', virtual-reg: '%0' }
45  - { reg: '$r1', virtual-reg: '%1' }
46body:             |
47  bb.0.entry:
48    liveins: $r0, $r1
49
50    %1:gpr = COPY $r1
51    %0:gpr = COPY $r0
52    %2:gprnopc = t2LDRi12 %0, 0, 14, $noreg :: (load 4 from %ir.a)
53    %3:rgpr = nsw t2ADDri %2, 10, 14, $noreg, $noreg
54    %4:gprnopc = t2LDRi12 %1, 0, 14, $noreg :: (load 4 from %ir.b)
55    %5:rgpr = nsw t2ADDri %4, 20, 14, $noreg, $noreg
56    %6:rgpr = nsw t2MUL %5, %3, 14, $noreg
57    $r0 = COPY %6
58    tBX_RET 14, $noreg, implicit $r0
59
60...
61