Modify two Transforms tests to explicitly check for full function names in some cases...
[oota-llvm.git] / test / Transforms / BBVectorize / X86 / sh-rec.ll
1 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
2 target triple = "x86_64-unknown-linux-gnu"
3 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7 -bb-vectorize -S | FileCheck %s
4
5 define void @ptoa() nounwind uwtable {
6 entry:
7   %call = call i8* @malloc() nounwind
8   br i1 undef, label %return, label %if.end10
9
10 if.end10:                                         ; preds = %entry
11   %incdec.ptr = getelementptr inbounds i8* %call, i64 undef
12   %call17 = call i32 @ptou() nounwind
13   %incdec.ptr26.1 = getelementptr inbounds i8* %incdec.ptr, i64 -2
14   store i8 undef, i8* %incdec.ptr26.1, align 1
15   %div27.1 = udiv i32 %call17, 100
16   %rem.2 = urem i32 %div27.1, 10
17   %add2230.2 = or i32 %rem.2, 48
18   %conv25.2 = trunc i32 %add2230.2 to i8
19   %incdec.ptr26.2 = getelementptr inbounds i8* %incdec.ptr, i64 -3
20   store i8 %conv25.2, i8* %incdec.ptr26.2, align 1
21   %incdec.ptr26.3 = getelementptr inbounds i8* %incdec.ptr, i64 -4
22   store i8 undef, i8* %incdec.ptr26.3, align 1
23   %div27.3 = udiv i32 %call17, 10000
24   %rem.4 = urem i32 %div27.3, 10
25   %add2230.4 = or i32 %rem.4, 48
26   %conv25.4 = trunc i32 %add2230.4 to i8
27   %incdec.ptr26.4 = getelementptr inbounds i8* %incdec.ptr, i64 -5
28   store i8 %conv25.4, i8* %incdec.ptr26.4, align 1
29   %div27.4 = udiv i32 %call17, 100000
30   %rem.5 = urem i32 %div27.4, 10
31   %add2230.5 = or i32 %rem.5, 48
32   %conv25.5 = trunc i32 %add2230.5 to i8
33   %incdec.ptr26.5 = getelementptr inbounds i8* %incdec.ptr, i64 -6
34   store i8 %conv25.5, i8* %incdec.ptr26.5, align 1
35   %incdec.ptr26.6 = getelementptr inbounds i8* %incdec.ptr, i64 -7
36   store i8 0, i8* %incdec.ptr26.6, align 1
37   %incdec.ptr26.7 = getelementptr inbounds i8* %incdec.ptr, i64 -8
38   store i8 undef, i8* %incdec.ptr26.7, align 1
39   %div27.7 = udiv i32 %call17, 100000000
40   %rem.8 = urem i32 %div27.7, 10
41   %add2230.8 = or i32 %rem.8, 48
42   %conv25.8 = trunc i32 %add2230.8 to i8
43   %incdec.ptr26.8 = getelementptr inbounds i8* %incdec.ptr, i64 -9
44   store i8 %conv25.8, i8* %incdec.ptr26.8, align 1
45   unreachable
46
47 return:                                           ; preds = %entry
48   ret void
49 ; CHECK: @ptoa
50 }
51
52 declare noalias i8* @malloc() nounwind
53
54 declare i32 @ptou()