1 ; RUN: llc < %s -mtriple=i386-apple-darwin10 -mcpu=core2 | FileCheck %s
4 define i32 @test1(i32 %a, i32 %b) nounwind ssp {
11 %0 = and i32 %a, 16384
12 %1 = icmp ne i32 %0, 0
13 %2 = and i32 %b, 16384
14 %3 = icmp ne i32 %2, 0
16 br i1 %4, label %bb1, label %bb
19 %5 = tail call i32 (...)* @foo() nounwind ; <i32> [#uses=1]
23 %6 = tail call i32 (...)* @bar() nounwind ; <i32> [#uses=1]
33 ; PR3351 - (P == 0) & (Q == 0) -> (P|Q) == 0
34 define i32 @test2(i32* %P, i32* %Q) nounwind ssp {
36 %a = icmp eq i32* %P, null ; <i1> [#uses=1]
37 %b = icmp eq i32* %Q, null ; <i1> [#uses=1]
39 br i1 %c, label %bb1, label %return
44 return: ; preds = %entry
47 ; CHECK: movl 4(%esp), %eax
48 ; CHECK-NEXT: orl 8(%esp), %eax
49 ; CHECK-NEXT: jne LBB1_2
52 ; PR3351 - (P != 0) | (Q != 0) -> (P|Q) != 0
53 define i32 @test3(i32* %P, i32* %Q) nounwind ssp {
55 %a = icmp ne i32* %P, null ; <i1> [#uses=1]
56 %b = icmp ne i32* %Q, null ; <i1> [#uses=1]
58 br i1 %c, label %bb1, label %return
63 return: ; preds = %entry
66 ; CHECK: movl 4(%esp), %eax
67 ; CHECK-NEXT: orl 8(%esp), %eax
68 ; CHECK-NEXT: je LBB2_2
71 ; <rdar://problem/7598384>:
87 define float @test4(float %x, float %y) nounwind readnone optsize ssp {
89 %0 = fpext float %x to double ; <double> [#uses=1]
90 %1 = fpext float %y to double ; <double> [#uses=1]
91 %2 = fmul double %0, %1 ; <double> [#uses=3]
92 %3 = fcmp oeq double %2, 0.000000e+00 ; <i1> [#uses=1]
93 br i1 %3, label %bb2, label %bb1
100 bb1: ; preds = %entry
101 %4 = fadd double %2, -1.000000e+00 ; <double> [#uses=1]
104 bb2: ; preds = %entry, %bb1
105 %.0.in = phi double [ %4, %bb1 ], [ %2, %entry ] ; <double> [#uses=1]
106 %.0 = fptrunc double %.0.in to float ; <float> [#uses=1]