• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -mtriple=x86_64-apple-macosx  | FileCheck %s
2
3; Common "xorb al, al" instruction in the two successor blocks should be
4; moved to the entry block above the test + je.
5
6; rdar://9145558
7
8define zeroext i1 @t(i32 %c) nounwind ssp {
9entry:
10; CHECK: t:
11; CHECK: xorb %al, %al
12; CHECK: test
13; CHECK: je
14  %tobool = icmp eq i32 %c, 0
15  br i1 %tobool, label %return, label %if.then
16
17if.then:
18; CHECK: callq
19  %call = tail call zeroext i1 (...)* @foo() nounwind
20  br label %return
21
22return:
23; CHECK: ret
24  %retval.0 = phi i1 [ %call, %if.then ], [ false, %entry ]
25  ret i1 %retval.0
26}
27
28declare zeroext i1 @foo(...)
29