1 ; RUN: llc -mcpu=generic -mtriple=arm-eabi -verify-machineinstrs < %s | FileCheck %s
3 %struct.comment = type { ptr, ptr, i32, ptr }
4 %struct.info = type { i32, i32, i32, i32, i32, i32, i32, ptr }
5 %struct.state = type { i32, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, ptr }
7 @str215 = external global [2 x i8]
9 define void @t1(ptr %v) {
11 ; Make sure we generate:
18 ; CHECK: bic [[REG1:r[0-9]+]],
19 ; CHECK-NOT: sub r{{[0-9]+}}, sp, [[REG1]]
20 ; CHECK: sub sp, sp, [[REG1]]
22 %tmp6 = load i32, ptr null
23 %tmp8 = alloca float, i32 %tmp6
25 br i1 false, label %bb123.preheader, label %return
27 bb123.preheader: ; preds = %0
28 br i1 false, label %bb43, label %return
30 bb43: ; preds = %bb123.preheader
31 call fastcc void @f1(ptr %tmp8, ptr null, i32 0)
32 %tmp70 = load i32, ptr null
33 call fastcc void @f2(ptr null, ptr null, ptr %tmp8, i32 %tmp70)
36 return: ; preds = %bb123.preheader, %0
40 declare fastcc void @f1(ptr, ptr, i32)
42 declare fastcc void @f2(ptr, ptr, ptr, i32)
44 define void @t2(ptr %vc, ptr %tag, ptr %contents) {
45 %tmp1 = call i32 @strlen(ptr %tag)
46 %tmp3 = call i32 @strlen(ptr %contents)
47 %tmp4 = add i32 %tmp1, 2
48 %tmp5 = add i32 %tmp4, %tmp3
49 %tmp6 = alloca i8, i32 %tmp5
50 %tmp9 = call ptr @strcpy(ptr %tmp6, ptr %tag)
51 %tmp6.len = call i32 @strlen(ptr %tmp6)
52 %tmp6.indexed = getelementptr i8, ptr %tmp6, i32 %tmp6.len
53 call void @llvm.memcpy.p0.p0.i32(ptr align 1 %tmp6.indexed, ptr align 1 @str215, i32 2, i1 false)
54 %tmp15 = call ptr @strcat(ptr %tmp6, ptr %contents)
55 call fastcc void @comment_add(ptr %vc, ptr %tmp6)
59 declare i32 @strlen(ptr)
61 declare ptr @strcat(ptr, ptr)
63 declare fastcc void @comment_add(ptr, ptr)
65 declare ptr @strcpy(ptr, ptr)
67 declare void @llvm.memcpy.p0.p0.i32(ptr nocapture, ptr nocapture, i32, i1) nounwind