1 ; RUN: opt -mergefunc -S < %s | FileCheck %s
3 ;; Make sure that two different allocas are not treated as equal.
5 target datalayout = "e-m:w-p:32:32-i64:64-f80:32-n8:16:32-S32"
7 %kv1 = type { i32, i32 }
9 %kv3 = type { i64, i64 }
13 ; CHECK-LABEL: define void @size1
14 ; CHECK-NOT: call void @
15 define void @size1(i8 *%f) {
16 %v = alloca %kv1, align 8
17 %f_2 = bitcast i8* %f to void (%kv1 *)*
18 call void %f_2(%kv1 * %v)
19 call void %f_2(%kv1 * %v)
20 call void %f_2(%kv1 * %v)
21 call void %f_2(%kv1 * %v)
25 ; CHECK-LABEL: define void @size2
26 ; CHECK-NOT: call void @
27 define void @size2(i8 *%f) {
28 %v = alloca %kv2, align 8
29 %f_2 = bitcast i8* %f to void (%kv2 *)*
30 call void %f_2(%kv2 * %v)
31 call void %f_2(%kv2 * %v)
32 call void %f_2(%kv2 * %v)
33 call void %f_2(%kv2 * %v)
37 ; Alignment difference.
39 ; CHECK-LABEL: define void @align1
40 ; CHECK-NOT: call void @
41 define void @align1(i8 *%f) {
42 %v = alloca %kv3, align 8
43 %f_2 = bitcast i8* %f to void (%kv3 *)*
44 call void %f_2(%kv3 * %v)
45 call void %f_2(%kv3 * %v)
46 call void %f_2(%kv3 * %v)
47 call void %f_2(%kv3 * %v)
51 ; CHECK-LABEL: define void @align2
52 ; CHECK-NOT: call void @
53 define void @align2(i8 *%f) {
54 %v = alloca %kv3, align 16
55 %f_2 = bitcast i8* %f to void (%kv3 *)*
56 call void %f_2(%kv3 * %v)
57 call void %f_2(%kv3 * %v)
58 call void %f_2(%kv3 * %v)
59 call void %f_2(%kv3 * %v)