; RUN: llc < %s -mtriple=thumbv7-apple-ios -relocation-model=pic -disable-fp-elim -mcpu=cortex-a8
+; RUN: llc < %s -mtriple=thumbv8-none-linux-gnueabi | FileCheck %s
%struct.LIST_NODE.0.16 = type { %struct.LIST_NODE.0.16*, i8* }
bb5: ; preds = %bb3, %bb
ret %struct.LIST_NODE.0.16* null
}
+
+declare void @use(i32)
+define double @find_max_double(i32 %n, double* nocapture readonly %aa) {
+entry:
+;CHECK-LABEL: find_max_double:
+ br i1 undef, label %for.body, label %for.end
+
+for.body: ; preds = %for.body, %entry
+ %0 = load double* null, align 8
+ %cmp2.6 = fcmp ogt double %0, 0.000000e+00
+ %idx.1.6 = select i1 %cmp2.6, i32 undef, i32 0
+ %idx.1.7 = select i1 undef, i32 undef, i32 %idx.1.6
+ %max.1.7 = select i1 undef, double 0.000000e+00, double undef
+ br i1 undef, label %for.end, label %for.body
+
+for.end: ; preds = %for.body, %entry
+ %max.0.lcssa = phi double [ undef, %entry ], [ %max.1.7, %for.body ]
+ %idx.0.lcssa = phi i32 [ 0, %entry ], [ %idx.1.7, %for.body ]
+ tail call void @use(i32 %idx.0.lcssa)
+ ret double %max.0.lcssa
+}