• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -mtriple=arm-eabi -mcpu=cortex-r52 -debug-only=machine-scheduler %s -o - 2>&1 | FileCheck %s --check-prefix=CHECK-R52
2; REQUIRES: asserts
3
4; source_filename = "sched-2.c"
5target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
6
7define dso_local i32 @f(i32 %a, i32 %b, i32 %c, i32 %d) local_unnamed_addr {
8entry:
9  %add = add nsw i32 %b, %a
10  %add1 = add nsw i32 %d, %c
11  %div = sdiv i32 %add, %add1
12  ret i32 %div
13}
14
15; Cortex-R52 model describes it as dual-issue with two integer ALUs
16; It should be able to issue the two additions in the same cycle.
17; CHECK-R52: MI Scheduling
18; CHECK-R52: Cycle: 14
19; CHECK-R52: Scheduling SU(5) %5:gpr = nsw ADDrr %3:gpr, %2:gpr, 14, $noreg, $noreg
20; CHECK-R52: Scheduling SU(4) %4:gpr = nsw ADDrr %1:gpr, %0:gpr, 14, $noreg, $noreg
21; CHECK-R52: Cycle: 15
22