Add patterns to match conditional moves with loads folded
[oota-llvm.git] / test / CodeGen / X86 / bt.ll
1 ; RUN: llvm-as < %s | llc | grep btl
2 ; RUN: llvm-as < %s | llc -mcpu=pentium4 | grep btl | grep esp
3 ; RUN: llvm-as < %s | llc -mcpu=penryn   | grep btl | not grep esp
4 ; PR3253
5 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
6 target triple = "i386-apple-darwin8"
7
8 define void @test2(i32 %x, i32 %n) nounwind {
9 entry:
10         %tmp29 = lshr i32 %x, %n                ; <i32> [#uses=1]
11         %tmp3 = and i32 %tmp29, 1               ; <i32> [#uses=1]
12         %tmp4 = icmp eq i32 %tmp3, 0            ; <i1> [#uses=1]
13         br i1 %tmp4, label %bb, label %UnifiedReturnBlock
14
15 bb:             ; preds = %entry
16         call void @foo()
17         ret void
18
19 UnifiedReturnBlock:             ; preds = %entry
20         ret void
21 }
22
23 declare void @foo()