Fix test to be less sensitive to coalescing.
[oota-llvm.git] / test / CodeGen / X86 / cmp-redundant.ll
1 ; RUN: llc < %s -mtriple=x86_64-apple-darwin10 | FileCheck %s
2
3 define i32 @cmp(i32* %aa, i32* %bb) nounwind readnone ssp {
4 entry:
5   %a = load i32* %aa
6   %b = load i32* %bb
7   %cmp = icmp sgt i32 %a, %b
8   br i1 %cmp, label %return, label %if.end
9 ; CHECK: cmp:
10 ; CHECK: cmpl
11 ; CHECK: jg
12 if.end:                                           ; preds = %entry
13 ; CHECK-NOT: cmpl
14 ; CHECK: cmov
15   %cmp4 = icmp slt i32 %a, %b
16   %. = select i1 %cmp4, i32 2, i32 111
17   br label %return
18
19 return:                                           ; preds = %if.end, %entry
20   %retval.0 = phi i32 [ 1, %entry ], [ %., %if.end ]
21   ret i32 %retval.0
22 }