1 ; RUN: llc < %s -O0 -mtriple=x86_64-apple-darwin10 | FileCheck %s
3 ; Test if we do not fold the cmp into select if the instructions are in
4 ; different basic blocks.
6 define i32 @select_cmp_cmov_i32(i32 %a, i32 %b) {
7 ; CHECK-LABEL: select_cmp_cmov_i32:
8 ; CHECK-LABEL: continue
9 ; CHECK-NOT: cmp{{[^_]}}
10 %1 = icmp ult i32 %a, %b
11 br i1 %1, label %continue, label %exit
14 %2 = select i1 %1, i32 %a, i32 %b
21 define float @select_fcmp_oeq_f32(float %a, float %b, float %c, float %d) {
22 ; CHECK-LABEL: select_fcmp_oeq_f32:
23 ; CHECK-LABEL: continue
24 ; CHECK-NOT: cmp{{[^_]}}
25 %1 = fcmp oeq float %a, %b
26 br i1 %1, label %continue, label %exit
29 %2 = select i1 %1, float %c, float %d
36 define float @select_fcmp_one_f32(float %a, float %b, float %c, float %d) {
37 ; CHECK-LABEL: select_fcmp_one_f32:
38 ; CHECK-LABEL: continue
40 %1 = fcmp one float %a, %b
41 br i1 %1, label %continue, label %exit
44 %2 = select i1 %1, float %c, float %d