Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame^] | 1 | ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s |
| 2 | ; RUN: grep fsmbi %t1.s | count 3 && |
| 3 | ; RUN: grep 32768 %t1.s | count 2 && |
| 4 | ; RUN: grep xor %t1.s | count 4 && |
| 5 | ; RUN: grep and %t1.s | count 5 && |
| 6 | ; RUN: grep andbi %t1.s | count 3 |
| 7 | |
| 8 | define double @fneg_dp(double %X) { |
| 9 | %Y = sub double -0.000000e+00, %X |
| 10 | ret double %Y |
| 11 | } |
| 12 | |
| 13 | define <2 x double> @fneg_dp_vec(<2 x double> %X) { |
| 14 | %Y = sub <2 x double> < double -0.0000e+00, double -0.0000e+00 >, %X |
| 15 | ret <2 x double> %Y |
| 16 | } |
| 17 | |
| 18 | define float @fneg_sp(float %X) { |
| 19 | %Y = sub float -0.000000e+00, %X |
| 20 | ret float %Y |
| 21 | } |
| 22 | |
| 23 | define <4 x float> @fneg_sp_vec(<4 x float> %X) { |
| 24 | %Y = sub <4 x float> <float -0.000000e+00, float -0.000000e+00, |
| 25 | float -0.000000e+00, float -0.000000e+00>, %X |
| 26 | ret <4 x float> %Y |
| 27 | } |
| 28 | |
| 29 | declare double @fabs(double) |
| 30 | |
| 31 | declare float @fabsf(float) |
| 32 | |
| 33 | define double @fabs_dp(double %X) { |
| 34 | %Y = call double @fabs( double %X ) ; <double> [#uses=1] |
| 35 | ret double %Y |
| 36 | } |
| 37 | |
| 38 | define float @fabs_sp(float %X) { |
| 39 | %Y = call float @fabsf( float %X ) ; <float> [#uses=1] |
| 40 | ret float %Y |
| 41 | } |