Dan Gohman | 36a0947 | 2009-09-08 23:54:48 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -march=x86 -mattr=+sse2 > %t |
Chris Lattner | 7fb501c | 2008-10-21 03:55:19 +0000 | [diff] [blame] | 2 | ; RUN: not grep cmp %t |
| 3 | ; RUN: not grep xor %t |
| 4 | ; RUN: grep jne %t | count 1 |
| 5 | ; RUN: grep jp %t | count 1 |
| 6 | ; RUN: grep setnp %t | count 1 |
| 7 | ; RUN: grep sete %t | count 1 |
| 8 | ; RUN: grep and %t | count 1 |
| 9 | ; RUN: grep cvt %t | count 4 |
Dan Gohman | 279c22e | 2008-10-21 03:29:32 +0000 | [diff] [blame] | 10 | |
| 11 | define i32 @isint_return(double %d) nounwind { |
| 12 | %i = fptosi double %d to i32 |
| 13 | %e = sitofp i32 %i to double |
| 14 | %c = fcmp oeq double %d, %e |
| 15 | %z = zext i1 %c to i32 |
| 16 | ret i32 %z |
| 17 | } |
| 18 | |
| 19 | declare void @foo() |
| 20 | |
| 21 | define void @isint_branch(double %d) nounwind { |
| 22 | %i = fptosi double %d to i32 |
| 23 | %e = sitofp i32 %i to double |
| 24 | %c = fcmp oeq double %d, %e |
| 25 | br i1 %c, label %true, label %false |
| 26 | true: |
| 27 | call void @foo() |
| 28 | ret void |
| 29 | false: |
| 30 | ret void |
| 31 | } |