1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
llvm-mirror/test/CodeGen/X86/cmp0.ll
Chris Lattner 1be54634e0 merge cmp1 into cmp0 and filecheckize.
llvm-svn: 86345
2009-11-07 06:19:20 +00:00

25 lines
460 B
LLVM

; RUN: llc < %s -march=x86-64 | FileCheck %s
define i64 @test0(i64 %x) nounwind {
%t = icmp eq i64 %x, 0
%r = zext i1 %t to i64
ret i64 %r
; CHECK: test0:
; CHECK: testq %rdi, %rdi
; CHECK: sete %al
; CHECK: movzbl %al, %eax
; CHECK: ret
}
define i64 @test1(i64 %x) nounwind {
%t = icmp slt i64 %x, 1
%r = zext i1 %t to i64
ret i64 %r
; CHECK: test1:
; CHECK: testq %rdi, %rdi
; CHECK: setle %al
; CHECK: movzbl %al, %eax
; CHECK: ret
}