1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-01 08:23:21 +01:00
llvm-mirror/test/Transforms/InstCombine/canonicalize_branch.ll
Chris Lattner 6020407d78 filecheckize this.
llvm-svn: 93776
2010-01-18 22:00:46 +00:00

45 lines
778 B
LLVM

; RUN: opt < %s -instcombine -S | FileCheck %s
define i32 @test1(i32 %X, i32 %Y) {
%C = icmp ne i32 %X, %Y
br i1 %C, label %T, label %F
; CHECK: @test1
; CHECK: %C = icmp eq i32 %X, %Y
; CHECK: br i1 %C, label %F, label %T
T:
ret i32 12
F:
ret i32 123
}
define i32 @test2(i32 %X, i32 %Y) {
%C = icmp ule i32 %X, %Y
br i1 %C, label %T, label %F
; CHECK: @test2
; CHECK: %C = icmp ugt i32 %X, %Y
; CHECK: br i1 %C, label %F, label %T
T:
ret i32 12
F:
ret i32 123
}
define i32 @test3(i32 %X, i32 %Y) {
%C = icmp uge i32 %X, %Y
br i1 %C, label %T, label %F
; CHECK: @test3
; CHECK: %C = icmp ult i32 %X, %Y
; CHECK: br i1 %C, label %F, label %T
T:
ret i32 12
F:
ret i32 123
}