brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · f5134d8 Raw
71 lines · plain
1; RUN: llc < %s -mtriple=thumbv7-apple-ios -relocation-model=pic -mcpu=cortex-a8 | FileCheck %s2 3; Do not move the umull above previous call which would require use of4; more callee-saved registers and introduce copies.5; rdar://93296276 7%struct.FF = type { ptr, ptr, ptr, ptr, ptr, ptr }8%struct.BD = type { ptr, i32, i32, i32, i32, i64, ptr, ptr, ptr, ptr, ptr, [16 x i8], i64, i64 }9 10@FuncPtr = external hidden unnamed_addr global ptr11@.str1 = external hidden unnamed_addr constant [6 x i8], align 412@G = external unnamed_addr global i3213@.str2 = external hidden unnamed_addr constant [58 x i8], align 414@.str3 = external hidden unnamed_addr constant [58 x i8], align 415 16define i32 @test() nounwind optsize ssp {17entry:18; CHECK-LABEL: test:19; CHECK: push20; CHECK-NOT: push21  %block_size = alloca i32, align 422  %block_count = alloca i32, align 423  %index_cache = alloca i32, align 424  store i32 0, ptr %index_cache, align 425  %tmp = load i32, ptr @G, align 426  %tmp1 = call i32 @bar(i32 0, i32 0, i32 %tmp) nounwind27  switch i32 %tmp1, label %bb8 [28    i32 0, label %bb29    i32 536870913, label %bb430    i32 536870914, label %bb631  ]32 33bb:34  %tmp2 = load i32, ptr @G, align 435  %tmp4 = icmp eq i32 %tmp2, 036  br i1 %tmp4, label %bb1, label %bb837 38bb1:39; CHECK: %bb140; CHECK-NOT: umull41; CHECK: bl _Get42; CHECK: umull43; CHECK: bl _foo44  %tmp5 = load i32, ptr %block_size, align 445  %tmp6 = load i32, ptr %block_count, align 446  %tmp7 = call ptr @Get() nounwind47  store ptr %tmp7, ptr @FuncPtr, align 448  %tmp10 = zext i32 %tmp6 to i6449  %tmp11 = zext i32 %tmp5 to i6450  %tmp12 = mul nsw i64 %tmp10, %tmp1151  %tmp13 = call i32 @foo(ptr @.str1, i64 %tmp12, i32 %tmp5) nounwind52  br label %bb853 54bb4:55  ret i32 056 57bb6:58  ret i32 159 60bb8:61  ret i32 -162}63 64declare i32 @printf(ptr, ...)65 66declare ptr @Get()67 68declare i32 @foo(ptr, i64, i32)69 70declare i32 @bar(i32, i32, i32)71