~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to test/CodeGen/ARM/phi.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2015-07-15 17:51:08 UTC
  • Revision ID: package-import@ubuntu.com-20150715175108-l8mynwovkx4zx697
Tags: upstream-3.7~+rc2
ImportĀ upstreamĀ versionĀ 3.7~+rc2

Show diffs side-by-side

added added

removed removed

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