| Dan Gohman | a080159 | 2009-09-11 18:36:27 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -march=cellspu > %t1.s | 
| Chris Lattner | 1b35211 | 2008-01-18 19:53:43 +0000 | [diff] [blame] | 2 | ; RUN: grep ilhu  %t1.s | count 8 | 
|  | 3 | ; RUN: grep iohl  %t1.s | count 6 | 
| Rafael Espindola | 74dc32d | 2008-12-03 17:14:56 +0000 | [diff] [blame] | 4 | ; RUN: grep -w il    %t1.s | count 3 | 
| Chris Lattner | 1b35211 | 2008-01-18 19:53:43 +0000 | [diff] [blame] | 5 | ; RUN: grep 16429 %t1.s | count 1 | 
|  | 6 | ; RUN: grep 63572 %t1.s | count 1 | 
|  | 7 | ; RUN: grep   128 %t1.s | count 1 | 
|  | 8 | ; RUN: grep 32639 %t1.s | count 1 | 
|  | 9 | ; RUN: grep 65535 %t1.s | count 1 | 
|  | 10 | ; RUN: grep 16457 %t1.s | count 1 | 
|  | 11 | ; RUN: grep  4059 %t1.s | count 1 | 
|  | 12 | ; RUN: grep 49077 %t1.s | count 1 | 
|  | 13 | ; RUN: grep  1267 %t1.s | count 2 | 
| Scott Michel | 8172f85 | 2007-12-17 23:45:52 +0000 | [diff] [blame] | 14 | ; RUN: grep 16309 %t1.s | count 1 | 
| Scott Michel | 8d5841a | 2008-01-11 02:53:15 +0000 | [diff] [blame] | 15 | 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" | 
|  | 16 | target triple = "spu" | 
| Scott Michel | 8172f85 | 2007-12-17 23:45:52 +0000 | [diff] [blame] | 17 |  | 
|  | 18 | define i32 @test_1() { | 
| Scott Michel | 48072bf | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 19 | ret i32 4784128               ;; ILHU via pattern (0x49000) | 
| Scott Michel | 8172f85 | 2007-12-17 23:45:52 +0000 | [diff] [blame] | 20 | } | 
|  | 21 |  | 
|  | 22 | define i32 @test_2() { | 
| Scott Michel | 48072bf | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 23 | ret i32 5308431               ;; ILHU/IOHL via pattern (0x5100f) | 
| Scott Michel | 8172f85 | 2007-12-17 23:45:52 +0000 | [diff] [blame] | 24 | } | 
|  | 25 |  | 
|  | 26 | define i32 @test_3() { | 
| Scott Michel | 48072bf | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 27 | ret i32 511                   ;; IL via pattern | 
| Scott Michel | 8172f85 | 2007-12-17 23:45:52 +0000 | [diff] [blame] | 28 | } | 
|  | 29 |  | 
|  | 30 | define i32 @test_4() { | 
| Scott Michel | 48072bf | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 31 | ret i32 -512                  ;; IL via pattern | 
| Scott Michel | 8172f85 | 2007-12-17 23:45:52 +0000 | [diff] [blame] | 32 | } | 
|  | 33 |  | 
|  | 34 | ;; double             float       floatval | 
|  | 35 | ;; 0x4005bf0a80000000 0x402d|f854 2.718282 | 
|  | 36 | define float @float_const_1() { | 
| Scott Michel | 48072bf | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 37 | ret float 0x4005BF0A80000000  ;; ILHU/IOHL | 
| Scott Michel | 8172f85 | 2007-12-17 23:45:52 +0000 | [diff] [blame] | 38 | } | 
|  | 39 |  | 
|  | 40 | ;; double             float       floatval | 
|  | 41 | ;; 0x3810000000000000 0x0080|0000 0.000000 | 
|  | 42 | define float @float_const_2() { | 
| Scott Michel | 48072bf | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 43 | ret float 0x3810000000000000  ;; IL 128 | 
| Scott Michel | 8172f85 | 2007-12-17 23:45:52 +0000 | [diff] [blame] | 44 | } | 
|  | 45 |  | 
|  | 46 | ;; double             float       floatval | 
|  | 47 | ;; 0x47efffffe0000000 0x7f7f|ffff NaN | 
|  | 48 | define float @float_const_3() { | 
| Scott Michel | 48072bf | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 49 | ret float 0x47EFFFFFE0000000  ;; ILHU/IOHL via pattern | 
| Scott Michel | 8172f85 | 2007-12-17 23:45:52 +0000 | [diff] [blame] | 50 | } | 
|  | 51 |  | 
|  | 52 | ;; double             float       floatval | 
|  | 53 | ;; 0x400921fb60000000 0x4049|0fdb 3.141593 | 
|  | 54 | define float @float_const_4() { | 
| Scott Michel | 48072bf | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 55 | ret float 0x400921FB60000000  ;; ILHU/IOHL via pattern | 
| Scott Michel | 8172f85 | 2007-12-17 23:45:52 +0000 | [diff] [blame] | 56 | } | 
|  | 57 |  | 
|  | 58 | ;; double             float       floatval | 
|  | 59 | ;; 0xbff6a09e60000000 0xbfb5|04f3 -1.414214 | 
|  | 60 | define float @float_const_5() { | 
| Scott Michel | 48072bf | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 61 | ret float 0xBFF6A09E60000000  ;; ILHU/IOHL via pattern | 
| Scott Michel | 8172f85 | 2007-12-17 23:45:52 +0000 | [diff] [blame] | 62 | } | 
|  | 63 |  | 
|  | 64 | ;; double             float       floatval | 
|  | 65 | ;; 0x3ff6a09e60000000 0x3fb5|04f3 1.414214 | 
|  | 66 | define float @float_const_6() { | 
| Scott Michel | 48072bf | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 67 | ret float 0x3FF6A09E60000000  ;; ILHU/IOHL via pattern | 
| Scott Michel | 8172f85 | 2007-12-17 23:45:52 +0000 | [diff] [blame] | 68 | } | 
|  | 69 |  | 
|  | 70 | define float @float_const_7() { | 
| Scott Michel | 48072bf | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 71 | ret float 0.000000e+00        ;; IL 0 via pattern | 
| Scott Michel | 8172f85 | 2007-12-17 23:45:52 +0000 | [diff] [blame] | 72 | } |