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.
13 ; Common "xorb al, al" instruction in the two successor blocks should be
14 ; moved to the entry block above the test + je.
18 define zeroext i1 @t(i32 %c) nounwind ssp {
21 ; CHECK: xorl %eax, %eax
24 %tobool = icmp eq i32 %c, 0
25 br i1 %tobool, label %return, label %if.then
29 %call = tail call zeroext i1 (...) @foo() nounwind
34 %retval.0 = phi i1 [ %call, %if.then ], [ false, %entry ]
38 declare zeroext i1 @foo(...)