1 ; RUN: llc -mtriple=arm64-apple-ios < %s | FileCheck %s 2 ; RUN: llc -mtriple=arm64-linux-gnu < %s | FileCheck %s --check-prefix=CHECK-LINUX 3 ; <rdar://11417675> 4 5 define void @sum(i32 %a, i32* %to, i32 %c) { 6 entry: 7 switch i32 %a, label %exit [ 8 i32 1, label %bb1 9 i32 2, label %exit.sink.split 10 i32 3, label %bb3 11 i32 4, label %bb4 12 ] 13 bb1: 14 %b = add i32 %c, 1 15 br label %exit.sink.split 16 bb3: 17 br label %exit.sink.split 18 bb4: 19 br label %exit.sink.split 20 exit.sink.split: 21 %.sink = phi i32 [ 5, %bb4 ], [ %b, %bb1 ], [ 3, %bb3 ], [ %a, %entry ] 22 store i32 %.sink, i32* %to 23 br label %exit 24 exit: 25 ret void 26 } 27 28 ; CHECK-LABEL: sum: 29 ; CHECK: adrp {{x[0-9]+}}, LJTI0_0@PAGE 30 ; CHECK: add {{x[0-9]+}}, {{x[0-9]+}}, LJTI0_0@PAGEOFF 31 32 ; CHECK-LINUX-LABEL: sum: 33 ; CHECK-LINUX: adrp {{x[0-9]+}}, .LJTI0_0 34 ; CHECK-LINUX: add {{x[0-9]+}}, {{x[0-9]+}}, :lo12:.LJTI0_0 35