blob: b96efd17b2bf0eed7841957516d1c26fa70e6b68 [file] [log] [blame]
Chris Lattner6c36fb52008-01-08 06:46:30 +00001; RUN: llvm-as < %s | llc -march=ppc32 | grep or | count 3
2; This should produce one 'or' or 'cror' instruction per function.
3
4target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
5target triple = "i686-apple-darwin8"
6
7define i32 @test(double %x, double %y) nounwind {
8entry:
9 %tmp3 = fcmp ole double %x, %y ; <i1> [#uses=1]
10 %tmp345 = zext i1 %tmp3 to i32 ; <i32> [#uses=1]
11 ret i32 %tmp345
12}
13
14define i32 @test2(double %x, double %y) nounwind {
15entry:
16 %tmp3 = fcmp one double %x, %y ; <i1> [#uses=1]
17 %tmp345 = zext i1 %tmp3 to i32 ; <i32> [#uses=1]
18 ret i32 %tmp345
19}
20
21define i32 @test3(double %x, double %y) nounwind {
22entry:
23 %tmp3 = fcmp ugt double %x, %y ; <i1> [#uses=1]
24 %tmp34 = zext i1 %tmp3 to i32 ; <i32> [#uses=1]
25 ret i32 %tmp34
26}
27