2009-11-07 07:19:20 +01:00
|
|
|
; RUN: llc < %s -march=x86-64 | FileCheck %s
|
2007-09-17 16:35:24 +02:00
|
|
|
|
2009-11-07 07:19:20 +01:00
|
|
|
define i64 @test0(i64 %x) nounwind {
|
2007-09-17 16:35:24 +02:00
|
|
|
%t = icmp eq i64 %x, 0
|
|
|
|
%r = zext i1 %t to i64
|
|
|
|
ret i64 %r
|
2009-11-07 07:19:20 +01:00
|
|
|
; CHECK: test0:
|
|
|
|
; CHECK: testq %rdi, %rdi
|
|
|
|
; CHECK: sete %al
|
|
|
|
; CHECK: movzbl %al, %eax
|
|
|
|
; CHECK: ret
|
2007-09-17 16:35:24 +02:00
|
|
|
}
|
2009-11-07 07:19:20 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|