Dan Gohman | 41b3f4a | 2009-09-03 20:34:31 +0000 | [diff] [blame^] | 1 | ; RUN: llvm-as < %s | llc -march=x86-64 | FileCheck %s |
| 2 | |
| 3 | ; CHECK: clampTo3k_a: |
| 4 | ; CHECK: minsd |
| 5 | define double @clampTo3k_a(double %x) nounwind readnone { |
| 6 | entry: |
| 7 | %0 = fcmp ogt double %x, 3.000000e+03 ; <i1> [#uses=1] |
| 8 | %x_addr.0 = select i1 %0, double 3.000000e+03, double %x ; <double> [#uses=1] |
| 9 | ret double %x_addr.0 |
| 10 | } |
| 11 | |
| 12 | ; CHECK: clampTo3k_b: |
| 13 | ; CHECK: minsd |
| 14 | define double @clampTo3k_b(double %x) nounwind readnone { |
| 15 | entry: |
| 16 | %0 = fcmp uge double %x, 3.000000e+03 ; <i1> [#uses=1] |
| 17 | %x_addr.0 = select i1 %0, double 3.000000e+03, double %x ; <double> [#uses=1] |
| 18 | ret double %x_addr.0 |
| 19 | } |
| 20 | |
| 21 | ; CHECK: clampTo3k_c: |
| 22 | ; CHECK: maxsd |
| 23 | define double @clampTo3k_c(double %x) nounwind readnone { |
| 24 | entry: |
| 25 | %0 = fcmp olt double %x, 3.000000e+03 ; <i1> [#uses=1] |
| 26 | %x_addr.0 = select i1 %0, double 3.000000e+03, double %x ; <double> [#uses=1] |
| 27 | ret double %x_addr.0 |
| 28 | } |
| 29 | |
| 30 | ; CHECK: clampTo3k_d: |
| 31 | ; CHECK: maxsd |
| 32 | define double @clampTo3k_d(double %x) nounwind readnone { |
| 33 | entry: |
| 34 | %0 = fcmp ule double %x, 3.000000e+03 ; <i1> [#uses=1] |
| 35 | %x_addr.0 = select i1 %0, double 3.000000e+03, double %x ; <double> [#uses=1] |
| 36 | ret double %x_addr.0 |
| 37 | } |
| 38 | |
| 39 | ; CHECK: clampTo3k_e: |
| 40 | ; CHECK: maxsd |
| 41 | define double @clampTo3k_e(double %x) nounwind readnone { |
| 42 | entry: |
| 43 | %0 = fcmp olt double %x, 3.000000e+03 ; <i1> [#uses=1] |
| 44 | %x_addr.0 = select i1 %0, double 3.000000e+03, double %x ; <double> [#uses=1] |
| 45 | ret double %x_addr.0 |
| 46 | } |
| 47 | |
| 48 | ; CHECK: clampTo3k_f: |
| 49 | ; CHECK: maxsd |
| 50 | define double @clampTo3k_f(double %x) nounwind readnone { |
| 51 | entry: |
| 52 | %0 = fcmp ule double %x, 3.000000e+03 ; <i1> [#uses=1] |
| 53 | %x_addr.0 = select i1 %0, double 3.000000e+03, double %x ; <double> [#uses=1] |
| 54 | ret double %x_addr.0 |
| 55 | } |
| 56 | |
| 57 | ; CHECK: clampTo3k_g: |
| 58 | ; CHECK: minsd |
| 59 | define double @clampTo3k_g(double %x) nounwind readnone { |
| 60 | entry: |
| 61 | %0 = fcmp ogt double %x, 3.000000e+03 ; <i1> [#uses=1] |
| 62 | %x_addr.0 = select i1 %0, double 3.000000e+03, double %x ; <double> [#uses=1] |
| 63 | ret double %x_addr.0 |
| 64 | } |
| 65 | |
| 66 | ; CHECK: clampTo3k_h: |
| 67 | ; CHECK: minsd |
| 68 | define double @clampTo3k_h(double %x) nounwind readnone { |
| 69 | entry: |
| 70 | %0 = fcmp uge double %x, 3.000000e+03 ; <i1> [#uses=1] |
| 71 | %x_addr.0 = select i1 %0, double 3.000000e+03, double %x ; <double> [#uses=1] |
| 72 | ret double %x_addr.0 |
| 73 | } |