Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 1 | ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s |
Scott Michel | c9c8b2a | 2009-01-26 03:31:40 +0000 | [diff] [blame] | 2 | ; RUN: grep fsmbi %t1.s | count 3 |
Chris Lattner | 994d6cf | 2008-01-18 19:53:43 +0000 | [diff] [blame] | 3 | ; RUN: grep 32768 %t1.s | count 2 |
| 4 | ; RUN: grep xor %t1.s | count 4 |
Scott Michel | c9c8b2a | 2009-01-26 03:31:40 +0000 | [diff] [blame] | 5 | ; RUN: grep and %t1.s | count 5 |
| 6 | ; RUN: grep andbi %t1.s | count 3 |
| 7 | |
Scott Michel | 9de5d0d | 2008-01-11 02:53:15 +0000 | [diff] [blame] | 8 | target datalayout = "E-p:32:32:128-f64:64:128-f32:32:128-i64:32:128-i32:32:128-i16:16:128-i8:8:128-i1:8:128-a0:0:128-v128:128:128-s0:128:128" |
| 9 | target triple = "spu" |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 10 | |
| 11 | define double @fneg_dp(double %X) { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 12 | %Y = sub double -0.000000e+00, %X |
| 13 | ret double %Y |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 14 | } |
| 15 | |
| 16 | define <2 x double> @fneg_dp_vec(<2 x double> %X) { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 17 | %Y = sub <2 x double> < double -0.0000e+00, double -0.0000e+00 >, %X |
| 18 | ret <2 x double> %Y |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 19 | } |
| 20 | |
| 21 | define float @fneg_sp(float %X) { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 22 | %Y = sub float -0.000000e+00, %X |
| 23 | ret float %Y |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 24 | } |
| 25 | |
| 26 | define <4 x float> @fneg_sp_vec(<4 x float> %X) { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 27 | %Y = sub <4 x float> <float -0.000000e+00, float -0.000000e+00, |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 28 | float -0.000000e+00, float -0.000000e+00>, %X |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 29 | ret <4 x float> %Y |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 30 | } |
| 31 | |
| 32 | declare double @fabs(double) |
| 33 | |
| 34 | declare float @fabsf(float) |
| 35 | |
| 36 | define double @fabs_dp(double %X) { |
Scott Michel | c9c8b2a | 2009-01-26 03:31:40 +0000 | [diff] [blame] | 37 | %Y = call double @fabs( double %X ) |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 38 | ret double %Y |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 39 | } |
| 40 | |
| 41 | define float @fabs_sp(float %X) { |
Scott Michel | c9c8b2a | 2009-01-26 03:31:40 +0000 | [diff] [blame] | 42 | %Y = call float @fabsf( float %X ) |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 43 | ret float %Y |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 44 | } |