• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -march=mips < %s | FileCheck %s
2
3define double @foo(double %a, double %b) nounwind readnone {
4entry:
5; CHECK: bc1f $BB
6; CHECK: nop
7
8  %cmp = fcmp ogt double %a, 0.000000e+00
9  br i1 %cmp, label %if.end6, label %if.else
10
11if.else:                                          ; preds = %entry
12  %cmp3 = fcmp ogt double %b, 0.000000e+00
13  br i1 %cmp3, label %if.end6, label %return
14
15if.end6:                                          ; preds = %if.else, %entry
16  %c.0 = phi double [ %a, %entry ], [ 0.000000e+00, %if.else ]
17  %sub = fsub double %b, %c.0
18  %mul = fmul double %sub, 2.000000e+00
19  br label %return
20
21return:                                           ; preds = %if.else, %if.end6
22  %retval.0 = phi double [ %mul, %if.end6 ], [ 0.000000e+00, %if.else ]
23  ret double %retval.0
24}
25
26define void @f1(float %f) nounwind {
27entry:
28; CHECK: bc1f $BB
29; CHECK: nop
30  %cmp = fcmp une float %f, 0.000000e+00
31  br i1 %cmp, label %if.then, label %if.end
32
33if.then:                                          ; preds = %entry
34  tail call void @abort() noreturn
35  unreachable
36
37if.end:                                           ; preds = %entry
38  tail call void (...)* @f2() nounwind
39  ret void
40}
41
42declare void @abort() noreturn nounwind
43
44declare void @f2(...)
45