| ; RUN: llc < %s -mtriple=armv8r-eabi -mcpu=cortex-a57 -enable-misched -verify-misched -debug-only=machine-scheduler -o - 2>&1 > /dev/null | FileCheck %s --check-prefix=CHECK --check-prefix=A57_SCHED |
| ; RUN: llc < %s -mtriple=armv8r-eabi -mcpu=generic -enable-misched -verify-misched -debug-only=machine-scheduler -o - 2>&1 > /dev/null | FileCheck %s --check-prefix=CHECK --check-prefix=GENERIC |
| ; Check the latency for instructions for both generic and cortex-a57. |
| ; SDIV should be scheduled at the block's begin (20 cyc of independent M unit). |
| ; CHECK: ********** MI Scheduling ********** |
| ; A57_SCHED: Latency : 20 |
| ; CHECK: ** Final schedule for %bb.0 *** |
| ; CHECK: ********** INTERVALS ********** |
| target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" |
| target triple = "armv8r-arm-none-eabi" |
| ; Function Attrs: norecurse nounwind readnone |
| define hidden i32 @foo(i32 %a, i32 %b, i32 %c, i32* %d) local_unnamed_addr #0 { |
| %add = add nsw i32 %xor, %ld |
| %sub = sub i32 %div, %add |