1 # RUN: llc %s -run-pass machine-scheduler -o - | FileCheck %s
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"
12 ; Function Attrs: norecurse nounwind optsize readonly
13 define dso_local i32 @test(ptr nocapture readonly %a, ptr nocapture readonly %b) local_unnamed_addr #0 {
15 %0 = load i32, ptr %a, align 4
16 %add = add nsw i32 %0, 10
17 %1 = load i32, ptr %b, align 4
18 %add1 = add nsw i32 %1, 20
19 %mul = mul nsw i32 %add1, %add
23 attributes #0 = { "target-cpu"="cortex-m4" }
29 exposesReturnsTwice: false
31 regBankSelected: false
34 tracksRegLiveness: true
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: '' }
44 - { reg: '$r0', virtual-reg: '%0' }
45 - { reg: '$r1', virtual-reg: '%1' }
52 %2:gprnopc = t2LDRi12 %0, 0, 14, $noreg :: (load (s32) from %ir.a)
53 %3:rgpr = nsw t2ADDri %2, 10, 14, $noreg, $noreg
54 %4:gprnopc = t2LDRi12 %1, 0, 14, $noreg :: (load (s32) from %ir.b)
55 %5:rgpr = nsw t2ADDri %4, 20, 14, $noreg, $noreg
56 %6:rgpr = nsw t2MUL %5, %3, 14, $noreg
58 tBX_RET 14, $noreg, implicit $r0