1 ; RUN: llc < %s -O0 -o - | FileCheck %s
2 target datalayout = "e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
3 target triple = "armv7s-apple-ios7"
8 declare float @llvm.ceil.f32(float)
10 ; Check that we are not emitting a tail call for the last call to ceil.
11 ; This function returns three different results.
15 define { float, float, float } @func1() {
17 %0 = alloca %foo, align 4
18 %1 = alloca %foo, align 4
19 %2 = alloca %foo, align 4
20 store float 0.000000e+00, ptr %0, align 4
21 store float 1.000000e+00, ptr %1, align 4
22 store float 5.000000e+00, ptr %2, align 4
23 br i1 true, label %3, label %4
25 ; <label>:3 ; preds = %entry
26 store float 2.000000e+00, ptr %1, align 4
29 ; <label>:4 ; preds = %3, %entry
30 %5 = call float @llvm.ceil.f32(float 5.000000e+00)
31 %6 = load float, ptr %1, align 4
32 %7 = call float @llvm.ceil.f32(float %6)
33 %8 = insertvalue { float, float, float } { float 0.000000e+00, float undef, float undef }, float %5, 1
34 %9 = insertvalue { float, float, float } %8, float %7, 2
35 ret { float, float, float } %9
38 ; Check that we are not emitting a tail call for the last call to ceil.
39 ; This function returns two different results.
43 define { float, float } @func2() {
45 %0 = alloca %foo, align 4
46 %1 = alloca %foo, align 4
47 %2 = alloca %foo, align 4
48 store float 0.000000e+00, ptr %0, align 4
49 store float 1.000000e+00, ptr %1, align 4
50 store float 5.000000e+00, ptr %2, align 4
51 br i1 true, label %3, label %4
53 ; <label>:3 ; preds = %entry
54 store float 2.000000e+00, ptr %1, align 4
57 ; <label>:4 ; preds = %3, %entry
58 %5 = call float @llvm.ceil.f32(float 5.000000e+00)
59 %6 = load float, ptr %1, align 4
60 %7 = call float @llvm.ceil.f32(float %6)
61 %8 = insertvalue { float, float } { float 0.000000e+00, float undef }, float %7, 1
62 ret { float, float } %8