Skip to content

Commit 420cf26

Browse files
committed
merge tests
llvm-svn: 116051
1 parent 6a8a65c commit 420cf26

File tree

3 files changed

+44
-43
lines changed

3 files changed

+44
-43
lines changed

llvm/test/CodeGen/X86/cmp-test.ll

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: llc < %s -march=x86-64 | FileCheck %s
1+
; RUN: llc < %s -mtriple=x86_64-apple-darwin10 | FileCheck %s
22

33
define i32 @test1(i32 %X, i32* %y) nounwind {
44
%tmp = load i32* %y ; <i32> [#uses=1]
@@ -30,3 +30,46 @@ ReturnBlock: ; preds = %0
3030
; CHECK: shll $3, %eax
3131
; CHECK: testl %eax, %eax
3232
}
33+
34+
define i64 @test3(i64 %x) nounwind {
35+
%t = icmp eq i64 %x, 0
36+
%r = zext i1 %t to i64
37+
ret i64 %r
38+
; CHECK: test3:
39+
; CHECK: testq %rdi, %rdi
40+
; CHECK: sete %al
41+
; CHECK: movzbl %al, %eax
42+
; CHECK: ret
43+
}
44+
45+
define i64 @test4(i64 %x) nounwind {
46+
%t = icmp slt i64 %x, 1
47+
%r = zext i1 %t to i64
48+
ret i64 %r
49+
; CHECK: test4:
50+
; CHECK: testq %rdi, %rdi
51+
; CHECK: setle %al
52+
; CHECK: movzbl %al, %eax
53+
; CHECK: ret
54+
}
55+
56+
57+
define i32 @test5(double %A) nounwind {
58+
entry:
59+
%tmp2 = fcmp ogt double %A, 1.500000e+02; <i1> [#uses=1]
60+
%tmp5 = fcmp ult double %A, 7.500000e+01; <i1> [#uses=1]
61+
%bothcond = or i1 %tmp2, %tmp5; <i1> [#uses=1]
62+
br i1 %bothcond, label %bb8, label %bb12
63+
64+
bb8:; preds = %entry
65+
%tmp9 = tail call i32 (...)* @foo( ) nounwind ; <i32> [#uses=1]
66+
ret i32 %tmp9
67+
68+
bb12:; preds = %entry
69+
ret i32 32
70+
; CHECK: test5:
71+
; CHECK: ucomisd LCPI4_0(%rip), %xmm0
72+
; CHECK: ucomisd LCPI4_1(%rip), %xmm0
73+
}
74+
75+
declare i32 @foo(...)

llvm/test/CodeGen/X86/cmp0.ll

Lines changed: 0 additions & 24 deletions
This file was deleted.

llvm/test/CodeGen/X86/cmp2.ll

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)