1 ; RUN: opt %s -dse -S | not grep alloca
2 ; ModuleID = 'placeholder.adb'
3 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"
4 target triple = "i686-pc-linux-gnu"
5 %struct.placeholder__T5b = type { i32, [1 x i32] }
6 %struct.placeholder__an_interval___PAD = type { %struct.placeholder__interval, [4 x i32] }
7 %struct.placeholder__interval = type { i32, i32 }
8 %struct.placeholder__s__s__the_interval___PAD = type { %struct.placeholder__interval }
10 define void @_ada_placeholder() nounwind {
12 %an_interval = alloca %struct.placeholder__an_interval___PAD ; <%struct.placeholder__an_interval___PAD*> [#uses=3]
13 %tmp34 = bitcast %struct.placeholder__an_interval___PAD* %an_interval to %struct.placeholder__T5b* ; <%struct.placeholder__T5b*> [#uses=1]
14 %tmp5 = getelementptr %struct.placeholder__an_interval___PAD* %an_interval, i32 0, i32 0, i32 0 ; <i32*> [#uses=2]
15 store i32 1, i32* %tmp5, align 8
16 %tmp10 = getelementptr %struct.placeholder__T5b* %tmp34, i32 0, i32 1, i32 0 ; <i32*> [#uses=1]
17 store i32 1, i32* %tmp10, align 4
18 %tmp82 = load i32* %tmp5, align 8 ; <i32> [#uses=5]
19 %tmp83 = icmp slt i32 %tmp82, 6 ; <i1> [#uses=1]
20 %min84 = select i1 %tmp83, i32 %tmp82, i32 5 ; <i32> [#uses=3]
21 %tmp85 = icmp sgt i32 %min84, -1 ; <i1> [#uses=2]
22 %min84.cast193 = zext i32 %min84 to i64 ; <i64> [#uses=1]
23 %min84.cast193.op = shl i64 %min84.cast193, 33 ; <i64> [#uses=1]
24 %tmp104 = icmp sgt i32 %tmp82, -1 ; <i1> [#uses=2]
25 %tmp103.cast192 = zext i32 %tmp82 to i64 ; <i64> [#uses=1]
26 %tmp103.cast192.op = shl i64 %tmp103.cast192, 33 ; <i64> [#uses=1]
27 %min84.cast193.op.op = ashr i64 %min84.cast193.op, 28 ; <i64> [#uses=1]
28 %sextr121 = select i1 %tmp85, i64 %min84.cast193.op.op, i64 0 ; <i64> [#uses=2]
29 %tmp103.cast192.op.op = ashr i64 %tmp103.cast192.op, 28 ; <i64> [#uses=1]
30 %sextr123 = select i1 %tmp104, i64 %tmp103.cast192.op.op, i64 0 ; <i64> [#uses=2]
31 %tmp124 = icmp sle i64 %sextr121, %sextr123 ; <i1> [#uses=1]
32 %min125 = select i1 %tmp124, i64 %sextr121, i64 %sextr123 ; <i64> [#uses=1]
33 %sextr131194 = and i64 %min125, 34359738336 ; <i64> [#uses=1]
34 %tmp134 = add i64 %sextr131194, 63 ; <i64> [#uses=1]
35 lshr i64 %tmp134, 3 ; <i64>:0 [#uses=1]
36 %tmp150188.shrunk = trunc i64 %0 to i32 ; <i32> [#uses=1]
37 %tmp159 = and i32 %tmp150188.shrunk, -4 ; <i32> [#uses=1]
38 %tmp161 = alloca i8, i32 %tmp159 ; <i8*> [#uses=1]
39 %min167.op = shl i32 %min84, 2 ; <i32> [#uses=1]
40 %tmp170 = select i1 %tmp85, i32 %min167.op, i32 0 ; <i32> [#uses=2]
41 %tmp173.op = shl i32 %tmp82, 2 ; <i32> [#uses=1]
42 %tmp176 = select i1 %tmp104, i32 %tmp173.op, i32 0 ; <i32> [#uses=2]
43 %tmp177 = icmp sle i32 %tmp170, %tmp176 ; <i1> [#uses=1]
44 %min178 = select i1 %tmp177, i32 %tmp170, i32 %tmp176 ; <i32> [#uses=1]
45 %tmp179 = add i32 %min178, 7 ; <i32> [#uses=1]
46 %tmp180 = and i32 %tmp179, -4 ; <i32> [#uses=1]
47 %tmp183185 = bitcast %struct.placeholder__an_interval___PAD* %an_interval to i8* ; <i8*> [#uses=1]
48 call void @llvm.memcpy.i32( i8* %tmp161, i8* %tmp183185, i32 %tmp180, i32 4 )
52 declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) nounwind