Akira Hatanaka | 3fef29d | 2012-07-11 19:32:27 +0000 | [diff] [blame^] | 1 | ; RUN: llc -march=mipsel < %s |
| 2 | |
| 3 | @gd0 = external global double |
| 4 | @gd1 = external global double |
| 5 | |
| 6 | define double @select_cc_f32(float %a, float %b) nounwind { |
| 7 | entry: |
| 8 | store double 0.000000e+00, double* @gd0, align 8 |
| 9 | store double 1.000000e+00, double* @gd1, align 8 |
| 10 | %cmp = fcmp olt float %a, %b |
| 11 | %conv = zext i1 %cmp to i32 |
| 12 | %conv1 = sitofp i32 %conv to double |
| 13 | ret double %conv1 |
| 14 | } |
| 15 | |
| 16 | define double @select_cc_f64(double %a, double %b) nounwind { |
| 17 | entry: |
| 18 | store double 0.000000e+00, double* @gd0, align 8 |
| 19 | store double 1.000000e+00, double* @gd1, align 8 |
| 20 | %cmp = fcmp olt double %a, %b |
| 21 | %conv = zext i1 %cmp to i32 |
| 22 | %conv1 = sitofp i32 %conv to double |
| 23 | ret double %conv1 |
| 24 | } |
| 25 | |