Scott Michel | 86c041f | 2007-12-20 00:44:13 +0000 | [diff] [blame^] | 1 | ; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s |
| 2 | ; RUN: grep lqa %t1.s | count 13 && |
| 3 | ; RUN: grep shufb %t1.s | count 13 && |
| 4 | ; RUN: grep 65520 %t1.s | count 1 && |
| 5 | ; RUN: grep 43981 %t1.s | count 1 && |
| 6 | ; RUN: grep 13702 %t1.s | count 1 && |
| 7 | ; RUN: grep 81 %t1.s | count 2 && |
| 8 | ; RUN: grep 28225 %t1.s | count 1 && |
| 9 | ; RUN: grep 30720 %t1.s | count 1 && |
| 10 | ; RUN: grep 192 %t1.s | count 32 && |
| 11 | ; RUN: grep 128 %t1.s | count 30 && |
| 12 | ; RUN: grep 224 %t1.s | count 2 |
| 13 | |
| 14 | ; 1311768467750121234 => 0x 12345678 abcdef12 (4660,22136/43981,61202) |
| 15 | ; 18446744073709551591 => 0x ffffffff ffffffe7 (-25) |
| 16 | ; 18446744073708516742 => 0x ffffffff fff03586 (-1034874) |
| 17 | ; 5308431 => 0x 00000000 0051000F |
| 18 | ; 9223372038704560128 => 0x 80000000 6e417800 |
| 19 | |
| 20 | define i64 @i64_const_1() { |
| 21 | ret i64 1311768467750121234 ;; Constant pool spill |
| 22 | } |
| 23 | |
| 24 | define i64 @i64_const_2() { |
| 25 | ret i64 18446744073709551591 ;; IL/SHUFB |
| 26 | } |
| 27 | |
| 28 | define i64 @i64_const_3() { |
| 29 | ret i64 18446744073708516742 ;; IHLU/IOHL/SHUFB |
| 30 | } |
| 31 | |
| 32 | define i64 @i64_const_4() { |
| 33 | ret i64 5308431 ;; ILHU/IOHL/SHUFB |
| 34 | } |
| 35 | |
| 36 | define i64 @i64_const_5() { |
| 37 | ret i64 511 ;; IL/SHUFB |
| 38 | } |
| 39 | |
| 40 | define i64 @i64_const_6() { |
| 41 | ret i64 -512 ;; IL/SHUFB |
| 42 | } |
| 43 | |
| 44 | define i64 @i64_const_7() { |
| 45 | ret i64 9223372038704560128 ;; IHLU/IOHL/SHUFB |
| 46 | } |
| 47 | |
| 48 | define i64 @i64_const_8() { |
| 49 | ret i64 0 ;; IL |
| 50 | } |
| 51 | |
| 52 | ; 0x4005bf0a8b145769 -> |
| 53 | ; (ILHU 0x4005 [16389]/IOHL 0xbf0a [48906]) |
| 54 | ; (ILHU 0x8b14 [35604]/IOHL 0x5769 [22377]) |
| 55 | define double @f64_const_1() { |
| 56 | ret double 0x4005bf0a8b145769 ;; ILHU/IOHL via pattern |
| 57 | } |
| 58 | |
| 59 | define double @f64_const_2() { |
| 60 | ret double 0x0010000000000000 |
| 61 | } |
| 62 | |
| 63 | define double @f64_const_3() { |
| 64 | ret double 0x7fefffffffffffff |
| 65 | } |
| 66 | |
| 67 | define double @f64_const_4() { |
| 68 | ret double 0x400921fb54442d18 |
| 69 | } |
| 70 | |
| 71 | define double @f64_const_5() { |
| 72 | ret double 0xbff6a09e667f3bcd ;; ILHU/IOHL via pattern |
| 73 | } |
| 74 | |
| 75 | define double @f64_const_6() { |
| 76 | ret double 0x3ff6a09e667f3bcd |
| 77 | } |
| 78 | |
| 79 | define double @f64_const_7() { |
| 80 | ret double 0.000000e+00 |
| 81 | } |