1; RUN: opt %loadPolly -S -polly-process-unprofitable -polly-codegen-ppcg \
2; RUN: -polly-invariant-load-hoisting -polly-ignore-parameter-bounds < %s | \
3; RUN: FileCheck %s
4
5; REQUIRES: pollyacc
6
7; CHECK: polly_launchKernel
8
9; Verify that this program compiles. At some point, this compilation crashed
10; due to insufficient parameters being available.
11
12source_filename = "bugpoint-output-4d01492.bc"
13target datalayout = "e-p:64:64:64-S128-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f16:16:16-f32:32:32-f64:64:64-f128:128:128-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
14target triple = "x86_64-unknown-linux-gnu"
15
16%struct.barney = type { i8*, i64, i64, [2 x %struct.widget] }
17%struct.widget = type { i64, i64, i64 }
18
19@global = external unnamed_addr global %struct.barney, align 32
20
21; Function Attrs: nounwind uwtable
22define void @wobble(i32* noalias %arg) #0 {
23bb:
24  %tmp = load i32, i32* %arg, align 4
25  br label %bb1
26
27bb1:                                              ; preds = %bb13, %bb
28  %tmp2 = phi i32 [ %tmp15, %bb13 ], [ 1, %bb ]
29  br label %bb3
30
31bb3:                                              ; preds = %bb3, %bb1
32  %tmp4 = load i32*, i32** bitcast (%struct.barney* @global to i32**), align 32
33  %tmp5 = sext i32 %tmp2 to i64
34  %tmp6 = load i64, i64* getelementptr inbounds (%struct.barney, %struct.barney* @global, i64 0, i32 3, i64 1, i32 0), align 8
35  %tmp7 = mul i64 %tmp6, %tmp5
36  %tmp8 = add i64 %tmp7, 0
37  %tmp9 = load i64, i64* getelementptr inbounds (%struct.barney, %struct.barney* @global, i64 0, i32 1), align 8
38  %tmp10 = add i64 %tmp8, %tmp9
39  %tmp11 = getelementptr i32, i32* %tmp4, i64 %tmp10
40  store i32 undef, i32* %tmp11, align 4
41  %tmp12 = icmp eq i32 0, 0
42  br i1 %tmp12, label %bb13, label %bb3
43
44bb13:                                             ; preds = %bb3
45  %tmp14 = icmp eq i32 %tmp2, %tmp
46  %tmp15 = add i32 %tmp2, 1
47  br i1 %tmp14, label %bb16, label %bb1
48
49bb16:                                             ; preds = %bb13
50  ret void
51}
52
53attributes #0 = { nounwind uwtable }
54