brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 3f9226c Raw
47 lines · plain
1; RUN: llc < %s -O0 -relocation-model=pic -mtriple=thumbv7-apple-ios | FileCheck %s2; <rdar://problem/12529625>3 4@foo = global i32 34879, align 45@DWJumpTable2808 = global [2 x i32] [i32 sub (i32 ptrtoint (ptr blockaddress(@func, %14) to i32), i32 ptrtoint (ptr blockaddress(@func, %4) to i32)), i32 sub (i32 ptrtoint (ptr blockaddress(@func, %13) to i32), i32 ptrtoint (ptr blockaddress(@func, %4) to i32))]6@0 = internal constant [45 x i8] c"func XXXXXXXXXXX :: bb xxxxxxxxxxxxxxxxxxxx\0A\00"7 8; The indirect branch has the two destinations as successors. The lone PHI9; statement shouldn't be implicitly defined.10 11; CHECK-LABEL:      func:12; CHECK:      Ltmp1:    @ Block address taken13; CHECK-NOT:            @ implicit-def: R014; CHECK:                @ 4-byte Reload15 16define i32 @func() nounwind ssp {17  %1 = alloca i32, align 418  %2 = load i32, ptr @foo, align 419  %3 = icmp eq i32 %2, 3487920  br label %421 22; <label>:4                                       ; preds = %023  %5 = zext i1 %3 to i3224  %6 = mul i32 %5, 28725  %7 = add i32 %6, 226  %8 = getelementptr [2 x i32], ptr @DWJumpTable2808, i32 0, i32 %527  %9 = load i32, ptr %828  %10 = add i32 %9, ptrtoint (ptr blockaddress(@func, %4) to i32)29  %11 = inttoptr i32 %10 to ptr30  %12 = call i32 (ptr, ...) @printf(ptr @0)31  indirectbr ptr %11, [label %13, label %14]32 33; <label>:13                                      ; preds = %434  %tmp14 = phi i32 [ %7, %4 ]35  store i32 23958, ptr @foo, align 436  %tmp15 = load i32, ptr %1, align 437  %tmp16 = icmp eq i32 %tmp15, 038  %tmp17 = zext i1 %tmp16 to i3239  %tmp21 = add i32 %tmp17, %tmp1440  ret i32 %tmp2141 42; <label>:14                                      ; preds = %443  ret i32 4244}45 46declare i32 @printf(ptr, ...)47