[FastISel][AArch64] Add target-specific lowering for logical operations.
[oota-llvm.git] / test / CodeGen / AArch64 / fast-isel-machine-sink.ll
1 ; RUN: llc -mtriple=aarch64-apple-darwin -fast-isel -verify-machineinstrs < %s
2
3 define void @test() {
4   %sext = shl i64 undef, 32
5   %1 = ashr exact i64 %sext, 32
6   %2 = icmp sgt i64 undef, %1
7   br i1 %2, label %3, label %.critedge1
8
9 ; <label>:3                                       ; preds = %0
10   %4 = getelementptr inbounds i32* undef, i64 %1
11   %5 = load i32* %4, align 4
12   br i1 undef, label %6, label %.critedge1
13
14 ; <label>:6                                       ; preds = %3
15   %7 = and i32 %5, 255
16   %8 = icmp eq i32 %7, 255
17   br i1 %8, label %.lr.ph, label %._crit_edge
18
19 .lr.ph:                                           ; preds = %.lr.ph, %6
20   br i1 undef, label %.lr.ph, label %.critedge1
21
22 ._crit_edge:                                      ; preds = %6
23   ret void
24
25 .critedge1:                                       ; preds = %.lr.ph, %3, %0
26   ret void
27 }