1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-31 16:02:52 +01:00
llvm-mirror/test/CodeGen/X86/cmp-redundant.ll

23 lines
623 B
LLVM

; RUN: llc < %s -mtriple=x86_64-apple-darwin10 | FileCheck %s
define i32 @cmp(i32* %aa, i32* %bb) nounwind readnone ssp {
entry:
%a = load i32* %aa
%b = load i32* %bb
%cmp = icmp sgt i32 %a, %b
br i1 %cmp, label %return, label %if.end
; CHECK: cmp:
; CHECK: cmpl
; CHECK: jg
if.end: ; preds = %entry
; CHECK-NOT: cmpl
; CHECK: cmov
%cmp4 = icmp slt i32 %a, %b
%. = select i1 %cmp4, i32 2, i32 111
br label %return
return: ; preds = %if.end, %entry
%retval.0 = phi i32 [ 1, %entry ], [ %., %if.end ]
ret i32 %retval.0
}