Add compile command to each testcase
[gcc-vect-testsuite.git] / pr46126.ll
blob8a503e42cf86a2068891c3813f8cbe2162e181d3
1 ; RUN: opt %loadPolly %defaultOpts -polly-codegen -enable-polly-vector -dce -S %s | FileCheck %s
2 ; Obtained from C source as:
3 ; clang -S -emit-llvm -O0 pr46126.c
4 ; opt -correlated-propagation -mem2reg -instcombine -loop-simplify -indvars -instnamer pr46126.s > pr46126.ll
6 ; ModuleID = 'pr46126.s'
7 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"
8 target triple = "x86_64-unknown-linux-gnu"
10 %struct.TypHeader = type { %struct.TypHeader**, i8 }
12 @EvTab = external global [81 x %struct.TypHeader* (%struct.TypHeader*)*]
14 define %struct.TypHeader* @FunApplyRel(%struct.TypHeader* %hdCall) nounwind uwtable {
15 entry:
16   %ptr = getelementptr inbounds %struct.TypHeader* %hdCall, i64 0, i32 0
17   %tmp1 = load %struct.TypHeader*** %ptr, align 8
18   %arrayidx = getelementptr inbounds %struct.TypHeader** %tmp1, i64 1
19   %tmp2 = load %struct.TypHeader** %arrayidx, align 8
20   %tmp = ptrtoint %struct.TypHeader* %tmp2 to i64
21   %and = and i64 %tmp, 1
22   %tobool = icmp eq i64 %and, 0
23   br i1 %tobool, label %cond.false, label %cond.true
25 cond.true:                                        ; preds = %entry
26   %ptr4 = getelementptr inbounds %struct.TypHeader* %hdCall, i64 0, i32 0
27   %tmp5 = load %struct.TypHeader*** %ptr4, align 8
28   %arrayidx6 = getelementptr inbounds %struct.TypHeader** %tmp5, i64 1
29   %tmp7 = load %struct.TypHeader** %arrayidx6, align 8
30   br label %cond.end30
32 cond.false:                                       ; preds = %entry
33   %ptr9 = getelementptr inbounds %struct.TypHeader* %hdCall, i64 0, i32 0
34   %tmp10 = load %struct.TypHeader*** %ptr9, align 8
35   %arrayidx11 = getelementptr inbounds %struct.TypHeader** %tmp10, i64 1
36   %tmp12 = load %struct.TypHeader** %arrayidx11, align 8
37   %tmp3 = ptrtoint %struct.TypHeader* %tmp12 to i64
38   %and13 = and i64 %tmp3, 1
39   %tobool14 = icmp eq i64 %and13, 0
40   br i1 %tobool14, label %cond.false16, label %cond.true15
42 cond.true15:                                      ; preds = %cond.false
43   br label %cond.end
45 cond.false16:                                     ; preds = %cond.false
46   %ptr18 = getelementptr inbounds %struct.TypHeader* %hdCall, i64 0, i32 0
47   %tmp19 = load %struct.TypHeader*** %ptr18, align 8
48   %arrayidx20 = getelementptr inbounds %struct.TypHeader** %tmp19, i64 1
49   %tmp21 = load %struct.TypHeader** %arrayidx20, align 8
50   %type = getelementptr inbounds %struct.TypHeader* %tmp21, i64 0, i32 1
51   %tmp22 = load i8* %type, align 1
52   %phitmp = zext i8 %tmp22 to i64
53   br label %cond.end
55 cond.end:                                         ; preds = %cond.false16, %cond.true15
56   %cond = phi i64 [ 1, %cond.true15 ], [ %phitmp, %cond.false16 ]
57   %arrayidx23 = getelementptr inbounds [81 x %struct.TypHeader* (%struct.TypHeader*)*]* @EvTab, i64 0, i64 %cond
58   %tmp24 = load %struct.TypHeader* (%struct.TypHeader*)** %arrayidx23, align 8
59   %ptr26 = getelementptr inbounds %struct.TypHeader* %hdCall, i64 0, i32 0
60   %tmp27 = load %struct.TypHeader*** %ptr26, align 8
61   %arrayidx28 = getelementptr inbounds %struct.TypHeader** %tmp27, i64 1
62   %tmp29 = load %struct.TypHeader** %arrayidx28, align 8
63   %call = call %struct.TypHeader* %tmp24(%struct.TypHeader* %tmp29) nounwind
64   br label %cond.end30
66 cond.end30:                                       ; preds = %cond.end, %cond.true
67   %cond31 = phi %struct.TypHeader* [ %tmp7, %cond.true ], [ %call, %cond.end ]
68   %ptr33 = getelementptr inbounds %struct.TypHeader* %cond31, i64 0, i32 0
69   %tmp34 = load %struct.TypHeader*** %ptr33, align 8
70   %arrayidx37 = getelementptr inbounds %struct.TypHeader** %tmp34, i64 1
71   store %struct.TypHeader* inttoptr (i64 1 to %struct.TypHeader*), %struct.TypHeader** %arrayidx37, align 8
72   %arrayidx42 = getelementptr inbounds %struct.TypHeader** %tmp34, i64 2
73   store %struct.TypHeader* inttoptr (i64 1 to %struct.TypHeader*), %struct.TypHeader** %arrayidx42, align 8
74   ret %struct.TypHeader* undef
76 ; CHECK: define