blob: 95f5c97f2a9ae18448c5dfde4c1005e528f0da08 [file] [log] [blame]
Evan Chengafad0fe2012-01-04 01:55:04 +00001; RUN: llc < %s -mtriple=armv7-apple-ios | FileCheck %s
Evan Cheng60c916b2007-06-20 18:26:15 +00002
3@x = external global i32* ; <i32**> [#uses=1]
4
5define void @foo(i32 %a) {
6entry:
7 %tmp = load i32** @x ; <i32*> [#uses=1]
8 store i32 %a, i32* %tmp
9 ret void
10}
11
Dan Gohman30fc5bb2010-05-03 14:35:47 +000012define i32 @t1(i32 %a, i32 %b) {
Evan Cheng62a1b5d2009-10-02 04:57:15 +000013; CHECK: t1:
Jim Grosbachdd119882011-03-11 22:51:41 +000014; CHECK: poplt {r7, pc}
Evan Cheng60c916b2007-06-20 18:26:15 +000015entry:
16 %tmp1 = icmp sgt i32 %a, 10 ; <i1> [#uses=1]
17 br i1 %tmp1, label %cond_true, label %UnifiedReturnBlock
18
19cond_true: ; preds = %entry
20 tail call void @foo( i32 %b )
Dan Gohman30fc5bb2010-05-03 14:35:47 +000021 ret i32 0
Evan Cheng60c916b2007-06-20 18:26:15 +000022
23UnifiedReturnBlock: ; preds = %entry
Dan Gohman30fc5bb2010-05-03 14:35:47 +000024 ret i32 1
Evan Cheng60c916b2007-06-20 18:26:15 +000025}