75 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=armv7-apple-ios -mcpu=cortex-a8 | FileCheck %s -check-prefix=A83; RUN: llc < %s -mtriple=armv7-apple-ios -mcpu=swift | FileCheck %s -check-prefix=SWIFT4; rdar://84021265 6@x = external global ptr ; <ptr> [#uses=1]7 8define void @foo(i32 %a) "frame-pointer"="none" {9; A8-LABEL: foo:10; A8: @ %bb.0: @ %entry11; A8-NEXT: movw r1, :lower16:(L_x$non_lazy_ptr-(LPC0_0+8))12; A8-NEXT: movt r1, :upper16:(L_x$non_lazy_ptr-(LPC0_0+8))13; A8-NEXT: LPC0_0:14; A8-NEXT: ldr r1, [pc, r1]15; A8-NEXT: ldr r1, [r1]16; A8-NEXT: str r0, [r1]17; A8-NEXT: bx lr18;19; SWIFT-LABEL: foo:20; SWIFT: @ %bb.0: @ %entry21; SWIFT-NEXT: movw r1, :lower16:(L_x$non_lazy_ptr-(LPC0_0+8))22; SWIFT-NEXT: movt r1, :upper16:(L_x$non_lazy_ptr-(LPC0_0+8))23; SWIFT-NEXT: LPC0_0:24; SWIFT-NEXT: ldr r1, [pc, r1]25; SWIFT-NEXT: ldr r1, [r1]26; SWIFT-NEXT: str r0, [r1]27; SWIFT-NEXT: bx lr28entry:29 %tmp = load ptr, ptr @x ; <ptr> [#uses=1]30 store i32 %a, ptr %tmp31 ret void32}33 34define i32 @t1(i32 %a, i32 %b) "frame-pointer"="all" {35; A8-LABEL: t1:36; A8: @ %bb.0: @ %entry37; A8-NEXT: mov r2, r038; A8-NEXT: mov r0, #139; A8-NEXT: cmp r2, #1040; A8-NEXT: bxle lr41; A8-NEXT: LBB1_1: @ %cond_true42; A8-NEXT: push {r7, lr}43; A8-NEXT: mov r7, sp44; A8-NEXT: mov r0, r145; A8-NEXT: bl _foo46; A8-NEXT: mov r0, #047; A8-NEXT: pop {r7, lr}48; A8-NEXT: bx lr49;50; SWIFT-LABEL: t1:51; SWIFT: @ %bb.0: @ %entry52; SWIFT-NEXT: mov r2, r053; SWIFT-NEXT: mov r0, #154; SWIFT-NEXT: cmp r2, #1055; SWIFT-NEXT: bxle lr56; SWIFT-NEXT: LBB1_1: @ %cond_true57; SWIFT-NEXT: push {r7, lr}58; SWIFT-NEXT: mov r7, sp59; SWIFT-NEXT: mov r0, r160; SWIFT-NEXT: bl _foo61; SWIFT-NEXT: mov r0, #062; SWIFT-NEXT: pop {r7, lr}63; SWIFT-NEXT: bx lr64entry:65 %tmp1 = icmp sgt i32 %a, 10 ; <i1> [#uses=1]66 br i1 %tmp1, label %cond_true, label %UnifiedReturnBlock67 68cond_true: ; preds = %entry69 tail call void @foo( i32 %b )70 ret i32 071 72UnifiedReturnBlock: ; preds = %entry73 ret i32 174}75