blob: e578ca3737d988dd56e8634405c1f5a6ba54bd06 [file] [log] [blame]
Dale Johannesen0a6ee6d2008-04-14 17:56:54 +00001; RUN: llvm-as < %s | llc -march=ppc32 | grep or | count 3
Chris Lattnerfe39edd2008-01-08 06:46:30 +00002; This should produce one 'or' or 'cror' instruction per function.
3
Chris Lattnerdb973482008-10-29 18:42:22 +00004
5; RUN: llvm-as < %s | llc -march=ppc32 | grep mfcr | count 3
6; PR2964
7
Chris Lattnerfe39edd2008-01-08 06:46:30 +00008define i32 @test(double %x, double %y) nounwind {
9entry:
10 %tmp3 = fcmp ole double %x, %y ; <i1> [#uses=1]
11 %tmp345 = zext i1 %tmp3 to i32 ; <i32> [#uses=1]
12 ret i32 %tmp345
13}
14
15define i32 @test2(double %x, double %y) nounwind {
16entry:
17 %tmp3 = fcmp one double %x, %y ; <i1> [#uses=1]
18 %tmp345 = zext i1 %tmp3 to i32 ; <i32> [#uses=1]
19 ret i32 %tmp345
20}
21
22define i32 @test3(double %x, double %y) nounwind {
23entry:
24 %tmp3 = fcmp ugt double %x, %y ; <i1> [#uses=1]
25 %tmp34 = zext i1 %tmp3 to i32 ; <i32> [#uses=1]
26 ret i32 %tmp34
27}
28