• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -march=x86-64 -mcpu=corei7-avx | FileCheck %s
2
3; testb should be scheduled right before je to enable macro-fusion.
4
5; CHECK: testb $2, %{{[abcd]}}h
6; CHECK-NEXT: je
7
8define i32 @check_flag(i32 %flags, ...) nounwind {
9entry:
10  %and = and i32 %flags, 512
11  %tobool = icmp eq i32 %and, 0
12  br i1 %tobool, label %if.end, label %if.then
13
14if.then:
15  br label %if.end
16
17if.end:
18  %hasflag = phi i32 [ 1, %if.then ], [ 0, %entry ]
19  ret i32 %hasflag
20}
21