Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 1 | ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s |
Chris Lattner | 994d6cf | 2008-01-18 19:53:43 +0000 | [diff] [blame] | 2 | ; RUN: grep 32768 %t1.s | count 2 |
Scott Michel | a82d3f7 | 2009-03-17 16:45:16 +0000 | [diff] [blame] | 3 | ; RUN: grep xor %t1.s | count 4 |
Scott Michel | 7ea02ff | 2009-03-17 01:15:45 +0000 | [diff] [blame] | 4 | ; RUN: grep and %t1.s | count 2 |
Scott Michel | c9c8b2a | 2009-01-26 03:31:40 +0000 | [diff] [blame] | 5 | |
Scott Michel | 9de5d0d | 2008-01-11 02:53:15 +0000 | [diff] [blame] | 6 | 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" |
| 7 | target triple = "spu" |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 8 | |
| 9 | define double @fneg_dp(double %X) { |
Dan Gohman | ae3a0be | 2009-06-04 22:49:04 +0000 | [diff] [blame^] | 10 | %Y = fsub double -0.000000e+00, %X |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 11 | ret double %Y |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 12 | } |
| 13 | |
| 14 | define <2 x double> @fneg_dp_vec(<2 x double> %X) { |
Dan Gohman | ae3a0be | 2009-06-04 22:49:04 +0000 | [diff] [blame^] | 15 | %Y = fsub <2 x double> < double -0.0000e+00, double -0.0000e+00 >, %X |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 16 | ret <2 x double> %Y |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 17 | } |
| 18 | |
| 19 | define float @fneg_sp(float %X) { |
Dan Gohman | ae3a0be | 2009-06-04 22:49:04 +0000 | [diff] [blame^] | 20 | %Y = fsub float -0.000000e+00, %X |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 21 | ret float %Y |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 22 | } |
| 23 | |
| 24 | define <4 x float> @fneg_sp_vec(<4 x float> %X) { |
Dan Gohman | ae3a0be | 2009-06-04 22:49:04 +0000 | [diff] [blame^] | 25 | %Y = fsub <4 x float> <float -0.000000e+00, float -0.000000e+00, |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 26 | float -0.000000e+00, float -0.000000e+00>, %X |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 27 | ret <4 x float> %Y |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 28 | } |
| 29 | |
| 30 | declare double @fabs(double) |
| 31 | |
| 32 | declare float @fabsf(float) |
| 33 | |
| 34 | define double @fabs_dp(double %X) { |
Scott Michel | c9c8b2a | 2009-01-26 03:31:40 +0000 | [diff] [blame] | 35 | %Y = call double @fabs( double %X ) |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 36 | ret double %Y |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 37 | } |
| 38 | |
| 39 | define float @fabs_sp(float %X) { |
Scott Michel | c9c8b2a | 2009-01-26 03:31:40 +0000 | [diff] [blame] | 40 | %Y = call float @fabsf( float %X ) |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 41 | ret float %Y |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 42 | } |