blob: 31e3e00c468e6e57e690ec5ce11db278077d16fc [file] [log] [blame]
Bob Wilsone8a549c2012-09-29 21:43:49 +00001; RUN: llc < %s -mtriple=armv7-apple-ios -mcpu=cortex-a8 | FileCheck %s -check-prefix=A8
2; RUN: llc < %s -mtriple=armv7-apple-ios -mcpu=swift | FileCheck %s -check-prefix=SWIFT
3; rdar://8402126
Evan Cheng85010162007-06-20 18:26:15 +00004
5@x = external global i32* ; <i32**> [#uses=1]
6
7define void @foo(i32 %a) {
8entry:
9 %tmp = load i32** @x ; <i32*> [#uses=1]
10 store i32 %a, i32* %tmp
11 ret void
12}
13
Dan Gohman2ad68de2010-05-03 14:35:47 +000014define i32 @t1(i32 %a, i32 %b) {
Stephen Lind24ab202013-07-14 06:24:09 +000015; A8-LABEL: t1:
Bob Wilsone8a549c2012-09-29 21:43:49 +000016; A8: poplt {r7, pc}
17
Stephen Lind24ab202013-07-14 06:24:09 +000018; SWIFT-LABEL: t1:
Bob Wilsone8a549c2012-09-29 21:43:49 +000019; SWIFT: pop {r7, pc}
20; SWIFT: pop {r7, pc}
Evan Cheng85010162007-06-20 18:26:15 +000021entry:
22 %tmp1 = icmp sgt i32 %a, 10 ; <i1> [#uses=1]
23 br i1 %tmp1, label %cond_true, label %UnifiedReturnBlock
24
25cond_true: ; preds = %entry
26 tail call void @foo( i32 %b )
Dan Gohman2ad68de2010-05-03 14:35:47 +000027 ret i32 0
Evan Cheng85010162007-06-20 18:26:15 +000028
29UnifiedReturnBlock: ; preds = %entry
Dan Gohman2ad68de2010-05-03 14:35:47 +000030 ret i32 1
Evan Cheng85010162007-06-20 18:26:15 +000031}