~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to test/CodeGen/AArch64/fast-isel-switch-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=aarch64-apple-darwin -fast-isel -verify-machineinstrs < %s
 
2
 
 
3
; Test that the Machine Instruction PHI node doesn't have more than one operand
 
4
; from the same predecessor.
 
5
define i32 @foo(i32 %a, i32 %b, i1 %c) {
 
6
entry:
 
7
  br i1 %c, label %switch, label %direct
 
8
 
 
9
switch:
 
10
  switch i32 %a, label %exit [
 
11
    i32 43, label %continue
 
12
    i32 45, label %continue
 
13
  ]
 
14
 
 
15
direct:
 
16
  %var = add i32 %b, 1
 
17
  br label %continue
 
18
 
 
19
continue:
 
20
  %var.phi = phi i32 [ %var, %direct ], [ 0, %switch ], [ 0, %switch ]
 
21
  ret i32 %var.phi
 
22
 
 
23
exit:
 
24
  ret i32 1
 
25
}