~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to test/CodeGen/X86/hoist-common.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 < %s -mtriple=x86_64-apple-macosx  | FileCheck %s
 
2
; This is supposed to be testing BranchFolding's common
 
3
; code hoisting logic, but has been erroneously passing due
 
4
; to there being a redundant xorl in the entry block
 
5
; and no common code to hoist.
 
6
; However, now that MachineSink sinks the redundant xor
 
7
; hoist-common looks at it and rejects it for hoisting,
 
8
; which causes this test to fail.
 
9
; Since it seems this test is broken, marking XFAIL for now
 
10
; until someone decides to remove it or fix what it tests.
 
11
; XFAIL: *
 
12
 
 
13
; Common "xorb al, al" instruction in the two successor blocks should be
 
14
; moved to the entry block above the test + je.
 
15
 
 
16
; rdar://9145558
 
17
 
 
18
define zeroext i1 @t(i32 %c) nounwind ssp {
 
19
entry:
 
20
; CHECK-LABEL: t:
 
21
; CHECK: xorl %eax, %eax
 
22
; CHECK: test
 
23
; CHECK: je
 
24
  %tobool = icmp eq i32 %c, 0
 
25
  br i1 %tobool, label %return, label %if.then
 
26
 
 
27
if.then:
 
28
; CHECK: callq
 
29
  %call = tail call zeroext i1 (...) @foo() nounwind
 
30
  br label %return
 
31
 
 
32
return:
 
33
; CHECK: ret
 
34
  %retval.0 = phi i1 [ %call, %if.then ], [ false, %entry ]
 
35
  ret i1 %retval.0
 
36
}
 
37
 
 
38
declare zeroext i1 @foo(...)