• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -march=arm -mattr=+v4t < %s | FileCheck %s
2; <rdar://problem/8686347>
3
4define i32 @test1(i1 %a, i32* %b) {
5; CHECK: test1
6entry:
7  br i1 %a, label %lblock, label %rblock
8
9lblock:
10  %lbranch = getelementptr i32* %b, i32 1
11  br label %end
12
13rblock:
14  %rbranch = getelementptr i32* %b, i32 1
15  br label %end
16
17end:
18; CHECK: ldr	r0, [r1, #4]
19  %gep = phi i32* [%lbranch, %lblock], [%rbranch, %rblock]
20  %r = load i32* %gep
21; CHECK-NEXT: bx	lr
22  ret i32 %r
23}
24