1 ; RUN: llc -mtriple=armv7-apple-ios8.0 -o - %s | FileCheck %s
5 declare void @use(%BigInt)
7 define %BigInt @test_moved_jumptable(i1 %tst, i32 %sw, %BigInt %l) {
8 ; CHECK-LABEL: test_moved_jumptable:
10 ; CHECK: adr {{r[0-9]+}}, [[JUMP_TABLE:LJTI[0-9]+_[0-9]+]]
11 ; CHECK: b [[SKIP_TABLE:LBB[0-9]+_[0-9]+]]
13 ; CHECK: [[JUMP_TABLE]]:
14 ; CHECK: .data_region jt32
15 ; CHECK: .long LBB{{[0-9]+_[0-9]+}}-[[JUMP_TABLE]]
17 ; CHECK: [[SKIP_TABLE]]:
18 ; CHECK: add pc, {{r[0-9]+|lr}}, {{r[0-9]+|lr}}
19 br i1 %tst, label %simple, label %complex
25 switch i32 %sw, label %simple [ i32 0, label %other
38 %val = phi %BigInt [ %l, %complex ], [ -1, %simple ]
39 ; Prevent SimplifyCFG from simplifying the phi node above.
40 call void @use(%BigInt %val)