|
1 |
| -; RUN: llc < %s -march=x86-64 | FileCheck %s |
| 1 | +; RUN: llc < %s -mtriple=x86_64-apple-darwin10 | FileCheck %s |
2 | 2 |
|
3 | 3 | define i32 @test1(i32 %X, i32* %y) nounwind {
|
4 | 4 | %tmp = load i32* %y ; <i32> [#uses=1]
|
@@ -30,3 +30,46 @@ ReturnBlock: ; preds = %0
|
30 | 30 | ; CHECK: shll $3, %eax
|
31 | 31 | ; CHECK: testl %eax, %eax
|
32 | 32 | }
|
| 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(...) |
0 commit comments