1*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=powerpc64-bgq-linux -enable-misched < %s | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker; 3*9880d681SAndroid Build Coastguard Worker; PR14315: misched should not move the physreg copy of %t below the calls. 4*9880d681SAndroid Build Coastguard Worker 5*9880d681SAndroid Build Coastguard Worker@.str89 = external unnamed_addr constant [6 x i8], align 1 6*9880d681SAndroid Build Coastguard Worker 7*9880d681SAndroid Build Coastguard Workerdeclare void @init() nounwind 8*9880d681SAndroid Build Coastguard Worker 9*9880d681SAndroid Build Coastguard Workerdeclare void @clock() nounwind 10*9880d681SAndroid Build Coastguard Worker 11*9880d681SAndroid Build Coastguard Worker; CHECK: mflr 0 12*9880d681SAndroid Build Coastguard Worker; CHECK: fmr 31, 1 13*9880d681SAndroid Build Coastguard Worker; CHECK: bl init 14*9880d681SAndroid Build Coastguard Workerdefine double @s332(double %t) nounwind { 15*9880d681SAndroid Build Coastguard Workerentry: 16*9880d681SAndroid Build Coastguard Worker tail call void @init() 17*9880d681SAndroid Build Coastguard Worker tail call void @clock() nounwind 18*9880d681SAndroid Build Coastguard Worker br label %for.cond2 19*9880d681SAndroid Build Coastguard Worker 20*9880d681SAndroid Build Coastguard Workerfor.cond2: ; preds = %for.body4, %entry 21*9880d681SAndroid Build Coastguard Worker %i.0 = phi i32 [ %inc, %for.body4 ], [ 0, %entry ] 22*9880d681SAndroid Build Coastguard Worker %cmp3 = icmp slt i32 undef, 16000 23*9880d681SAndroid Build Coastguard Worker br i1 %cmp3, label %for.body4, label %L20 24*9880d681SAndroid Build Coastguard Worker 25*9880d681SAndroid Build Coastguard Workerfor.body4: ; preds = %for.cond2 26*9880d681SAndroid Build Coastguard Worker %cmp5 = fcmp ogt double undef, %t 27*9880d681SAndroid Build Coastguard Worker %inc = add nsw i32 %i.0, 1 28*9880d681SAndroid Build Coastguard Worker br i1 %cmp5, label %L20, label %for.cond2 29*9880d681SAndroid Build Coastguard Worker 30*9880d681SAndroid Build Coastguard WorkerL20: ; preds = %for.body4, %for.cond2 31*9880d681SAndroid Build Coastguard Worker %index.0 = phi i32 [ -2, %for.cond2 ], [ %i.0, %for.body4 ] 32*9880d681SAndroid Build Coastguard Worker %index.d = sitofp i32 %index.0 to double 33*9880d681SAndroid Build Coastguard Worker %retval = fadd double %t, %index.d 34*9880d681SAndroid Build Coastguard Worker ret double %retval 35*9880d681SAndroid Build Coastguard Worker} 36