45 lines · plain
1; RUN: llc -mtriple=armv7-apple-ios8.0 -o - %s | FileCheck %s2 3%BigInt = type i85004 5declare void @use(%BigInt)6 7define %BigInt @test_moved_jumptable(i1 %tst, i32 %sw, %BigInt %l) {8; CHECK-LABEL: test_moved_jumptable:9 10; CHECK: adr {{r[0-9]+}}, [[JUMP_TABLE:LJTI[0-9]+_[0-9]+]]11; CHECK: b [[SKIP_TABLE:LBB[0-9]+_[0-9]+]]12 13; CHECK: [[JUMP_TABLE]]:14; CHECK: .data_region jt3215; CHECK: .long LBB{{[0-9]+_[0-9]+}}-[[JUMP_TABLE]]16 17; CHECK: [[SKIP_TABLE]]:18; CHECK: add pc, {{r[0-9]+|lr}}, {{r[0-9]+|lr}}19 br i1 %tst, label %simple, label %complex20 21simple:22 br label %end23 24complex:25 switch i32 %sw, label %simple [ i32 0, label %other26 i32 1, label %third27 i32 5, label %end28 i32 6, label %other ]29 30third:31 ret %BigInt 032 33other:34 call void @bar()35 unreachable36 37end:38 %val = phi %BigInt [ %l, %complex ], [ -1, %simple ]39; Prevent SimplifyCFG from simplifying the phi node above.40 call void @use(%BigInt %val)41 ret %BigInt %val42}43 44declare void @bar()45