Home | History | Annotate | Download | only in X86
      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 
      8 define i32 @check_flag(i32 %flags, ...) nounwind {
      9 entry:
     10   %and = and i32 %flags, 512
     11   %tobool = icmp eq i32 %and, 0
     12   br i1 %tobool, label %if.end, label %if.then
     13 
     14 if.then:
     15   br label %if.end
     16 
     17 if.end:
     18   %hasflag = phi i32 [ 1, %if.then ], [ 0, %entry ]
     19   ret i32 %hasflag
     20 }
     21