Dan Gohman | b7c0b24 | 2009-09-11 18:36:27 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -march=cellspu > %t1.s |
Kalle Raiskila | 31cbac1 | 2011-03-04 13:19:18 +0000 | [diff] [blame^] | 2 | ; RUN: grep {shlh } %t1.s | count 10 |
Duncan Sands | 74789ea | 2009-01-21 09:41:42 +0000 | [diff] [blame] | 3 | ; RUN: grep {shlhi } %t1.s | count 3 |
Kalle Raiskila | 31cbac1 | 2011-03-04 13:19:18 +0000 | [diff] [blame^] | 4 | ; RUN: grep {shl } %t1.s | count 11 |
Duncan Sands | 74789ea | 2009-01-21 09:41:42 +0000 | [diff] [blame] | 5 | ; RUN: grep {shli } %t1.s | count 3 |
Evan Cheng | 3927f43 | 2009-03-25 20:20:11 +0000 | [diff] [blame] | 6 | ; RUN: grep {xshw } %t1.s | count 5 |
Chris Lattner | d302773 | 2011-02-13 09:02:52 +0000 | [diff] [blame] | 7 | ; RUN: grep {and } %t1.s | count 14 |
Duncan Sands | 74789ea | 2009-01-21 09:41:42 +0000 | [diff] [blame] | 8 | ; RUN: grep {andi } %t1.s | count 2 |
| 9 | ; RUN: grep {rotmi } %t1.s | count 2 |
| 10 | ; RUN: grep {rotqmbyi } %t1.s | count 1 |
| 11 | ; RUN: grep {rotqmbii } %t1.s | count 2 |
| 12 | ; RUN: grep {rotqmby } %t1.s | count 1 |
Kalle Raiskila | 9363f73 | 2010-11-29 14:44:28 +0000 | [diff] [blame] | 13 | ; RUN: grep {rotqmbi } %t1.s | count 2 |
Duncan Sands | 74789ea | 2009-01-21 09:41:42 +0000 | [diff] [blame] | 14 | ; RUN: grep {rotqbyi } %t1.s | count 1 |
| 15 | ; RUN: grep {rotqbii } %t1.s | count 2 |
| 16 | ; RUN: grep {rotqbybi } %t1.s | count 1 |
Kalle Raiskila | 31cbac1 | 2011-03-04 13:19:18 +0000 | [diff] [blame^] | 17 | ; RUN: grep {sfi } %t1.s | count 6 |
Kalle Raiskila | 9363f73 | 2010-11-29 14:44:28 +0000 | [diff] [blame] | 18 | ; RUN: cat %t1.s | FileCheck %s |
Scott Michel | 02d711b | 2008-12-30 23:28:25 +0000 | [diff] [blame] | 19 | |
Scott Michel | 9de5d0d | 2008-01-11 02:53:15 +0000 | [diff] [blame] | 20 | 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" |
| 21 | target triple = "spu" |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 22 | |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 23 | ; Shift left i16 via register, note that the second operand to shl is promoted |
| 24 | ; to a 32-bit type: |
| 25 | |
| 26 | define i16 @shlh_i16_1(i16 %arg1, i16 %arg2) { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 27 | %A = shl i16 %arg1, %arg2 |
| 28 | ret i16 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 29 | } |
| 30 | |
| 31 | define i16 @shlh_i16_2(i16 %arg1, i16 %arg2) { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 32 | %A = shl i16 %arg2, %arg1 |
| 33 | ret i16 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 34 | } |
| 35 | |
| 36 | define i16 @shlh_i16_3(i16 signext %arg1, i16 signext %arg2) signext { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 37 | %A = shl i16 %arg1, %arg2 |
| 38 | ret i16 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 39 | } |
| 40 | |
| 41 | define i16 @shlh_i16_4(i16 signext %arg1, i16 signext %arg2) signext { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 42 | %A = shl i16 %arg2, %arg1 |
| 43 | ret i16 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 44 | } |
| 45 | |
| 46 | define i16 @shlh_i16_5(i16 zeroext %arg1, i16 zeroext %arg2) zeroext { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 47 | %A = shl i16 %arg1, %arg2 |
| 48 | ret i16 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 49 | } |
| 50 | |
| 51 | define i16 @shlh_i16_6(i16 zeroext %arg1, i16 zeroext %arg2) zeroext { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 52 | %A = shl i16 %arg2, %arg1 |
| 53 | ret i16 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 54 | } |
| 55 | |
| 56 | ; Shift left i16 with immediate: |
| 57 | define i16 @shlhi_i16_1(i16 %arg1) { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 58 | %A = shl i16 %arg1, 12 |
| 59 | ret i16 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 60 | } |
| 61 | |
| 62 | ; Should not generate anything other than the return, arg1 << 0 = arg1 |
| 63 | define i16 @shlhi_i16_2(i16 %arg1) { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 64 | %A = shl i16 %arg1, 0 |
| 65 | ret i16 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 66 | } |
| 67 | |
| 68 | define i16 @shlhi_i16_3(i16 %arg1) { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 69 | %A = shl i16 16383, %arg1 |
| 70 | ret i16 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 71 | } |
| 72 | |
| 73 | ; Should generate 0, 0 << arg1 = 0 |
| 74 | define i16 @shlhi_i16_4(i16 %arg1) { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 75 | %A = shl i16 0, %arg1 |
| 76 | ret i16 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 77 | } |
| 78 | |
| 79 | define i16 @shlhi_i16_5(i16 signext %arg1) signext { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 80 | %A = shl i16 %arg1, 12 |
| 81 | ret i16 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 82 | } |
| 83 | |
| 84 | ; Should not generate anything other than the return, arg1 << 0 = arg1 |
| 85 | define i16 @shlhi_i16_6(i16 signext %arg1) signext { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 86 | %A = shl i16 %arg1, 0 |
| 87 | ret i16 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 88 | } |
| 89 | |
| 90 | define i16 @shlhi_i16_7(i16 signext %arg1) signext { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 91 | %A = shl i16 16383, %arg1 |
| 92 | ret i16 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 93 | } |
| 94 | |
| 95 | ; Should generate 0, 0 << arg1 = 0 |
| 96 | define i16 @shlhi_i16_8(i16 signext %arg1) signext { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 97 | %A = shl i16 0, %arg1 |
| 98 | ret i16 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 99 | } |
| 100 | |
| 101 | define i16 @shlhi_i16_9(i16 zeroext %arg1) zeroext { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 102 | %A = shl i16 %arg1, 12 |
| 103 | ret i16 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 104 | } |
| 105 | |
| 106 | ; Should not generate anything other than the return, arg1 << 0 = arg1 |
| 107 | define i16 @shlhi_i16_10(i16 zeroext %arg1) zeroext { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 108 | %A = shl i16 %arg1, 0 |
| 109 | ret i16 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 110 | } |
| 111 | |
| 112 | define i16 @shlhi_i16_11(i16 zeroext %arg1) zeroext { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 113 | %A = shl i16 16383, %arg1 |
| 114 | ret i16 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 115 | } |
| 116 | |
| 117 | ; Should generate 0, 0 << arg1 = 0 |
| 118 | define i16 @shlhi_i16_12(i16 zeroext %arg1) zeroext { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 119 | %A = shl i16 0, %arg1 |
| 120 | ret i16 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 121 | } |
| 122 | |
| 123 | ; Shift left i32 via register, note that the second operand to shl is promoted |
| 124 | ; to a 32-bit type: |
| 125 | |
| 126 | define i32 @shl_i32_1(i32 %arg1, i32 %arg2) { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 127 | %A = shl i32 %arg1, %arg2 |
| 128 | ret i32 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 129 | } |
| 130 | |
| 131 | define i32 @shl_i32_2(i32 %arg1, i32 %arg2) { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 132 | %A = shl i32 %arg2, %arg1 |
| 133 | ret i32 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 134 | } |
| 135 | |
| 136 | define i32 @shl_i32_3(i32 signext %arg1, i32 signext %arg2) signext { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 137 | %A = shl i32 %arg1, %arg2 |
| 138 | ret i32 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 139 | } |
| 140 | |
| 141 | define i32 @shl_i32_4(i32 signext %arg1, i32 signext %arg2) signext { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 142 | %A = shl i32 %arg2, %arg1 |
| 143 | ret i32 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 144 | } |
| 145 | |
| 146 | define i32 @shl_i32_5(i32 zeroext %arg1, i32 zeroext %arg2) zeroext { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 147 | %A = shl i32 %arg1, %arg2 |
| 148 | ret i32 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 149 | } |
| 150 | |
| 151 | define i32 @shl_i32_6(i32 zeroext %arg1, i32 zeroext %arg2) zeroext { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 152 | %A = shl i32 %arg2, %arg1 |
| 153 | ret i32 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 154 | } |
| 155 | |
| 156 | ; Shift left i32 with immediate: |
| 157 | define i32 @shli_i32_1(i32 %arg1) { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 158 | %A = shl i32 %arg1, 12 |
| 159 | ret i32 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 160 | } |
| 161 | |
| 162 | ; Should not generate anything other than the return, arg1 << 0 = arg1 |
| 163 | define i32 @shli_i32_2(i32 %arg1) { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 164 | %A = shl i32 %arg1, 0 |
| 165 | ret i32 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 166 | } |
| 167 | |
| 168 | define i32 @shli_i32_3(i32 %arg1) { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 169 | %A = shl i32 16383, %arg1 |
| 170 | ret i32 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 171 | } |
| 172 | |
| 173 | ; Should generate 0, 0 << arg1 = 0 |
| 174 | define i32 @shli_i32_4(i32 %arg1) { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 175 | %A = shl i32 0, %arg1 |
| 176 | ret i32 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 177 | } |
| 178 | |
| 179 | define i32 @shli_i32_5(i32 signext %arg1) signext { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 180 | %A = shl i32 %arg1, 12 |
| 181 | ret i32 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 182 | } |
| 183 | |
| 184 | ; Should not generate anything other than the return, arg1 << 0 = arg1 |
| 185 | define i32 @shli_i32_6(i32 signext %arg1) signext { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 186 | %A = shl i32 %arg1, 0 |
| 187 | ret i32 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 188 | } |
| 189 | |
| 190 | define i32 @shli_i32_7(i32 signext %arg1) signext { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 191 | %A = shl i32 16383, %arg1 |
| 192 | ret i32 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 193 | } |
| 194 | |
| 195 | ; Should generate 0, 0 << arg1 = 0 |
| 196 | define i32 @shli_i32_8(i32 signext %arg1) signext { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 197 | %A = shl i32 0, %arg1 |
| 198 | ret i32 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 199 | } |
| 200 | |
| 201 | define i32 @shli_i32_9(i32 zeroext %arg1) zeroext { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 202 | %A = shl i32 %arg1, 12 |
| 203 | ret i32 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 204 | } |
| 205 | |
| 206 | ; Should not generate anything other than the return, arg1 << 0 = arg1 |
| 207 | define i32 @shli_i32_10(i32 zeroext %arg1) zeroext { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 208 | %A = shl i32 %arg1, 0 |
| 209 | ret i32 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 210 | } |
| 211 | |
| 212 | define i32 @shli_i32_11(i32 zeroext %arg1) zeroext { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 213 | %A = shl i32 16383, %arg1 |
| 214 | ret i32 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 215 | } |
| 216 | |
| 217 | ; Should generate 0, 0 << arg1 = 0 |
| 218 | define i32 @shli_i32_12(i32 zeroext %arg1) zeroext { |
Scott Michel | 53dec47 | 2008-03-05 23:00:19 +0000 | [diff] [blame] | 219 | %A = shl i32 0, %arg1 |
| 220 | ret i32 %A |
Scott Michel | 0a92af4 | 2007-12-19 20:50:49 +0000 | [diff] [blame] | 221 | } |
Scott Michel | 02d711b | 2008-12-30 23:28:25 +0000 | [diff] [blame] | 222 | |
| 223 | ;; i64 shift left |
| 224 | |
| 225 | define i64 @shl_i64_1(i64 %arg1) { |
| 226 | %A = shl i64 %arg1, 9 |
| 227 | ret i64 %A |
| 228 | } |
| 229 | |
| 230 | define i64 @shl_i64_2(i64 %arg1) { |
| 231 | %A = shl i64 %arg1, 3 |
| 232 | ret i64 %A |
| 233 | } |
| 234 | |
| 235 | define i64 @shl_i64_3(i64 %arg1, i32 %shift) { |
| 236 | %1 = zext i32 %shift to i64 |
| 237 | %2 = shl i64 %arg1, %1 |
| 238 | ret i64 %2 |
| 239 | } |
| 240 | |
| 241 | ;; i64 shift right logical (shift 0s from the right) |
| 242 | |
| 243 | define i64 @lshr_i64_1(i64 %arg1) { |
| 244 | %1 = lshr i64 %arg1, 9 |
| 245 | ret i64 %1 |
| 246 | } |
| 247 | |
| 248 | define i64 @lshr_i64_2(i64 %arg1) { |
| 249 | %1 = lshr i64 %arg1, 3 |
| 250 | ret i64 %1 |
| 251 | } |
| 252 | |
| 253 | define i64 @lshr_i64_3(i64 %arg1, i32 %shift) { |
| 254 | %1 = zext i32 %shift to i64 |
| 255 | %2 = lshr i64 %arg1, %1 |
| 256 | ret i64 %2 |
| 257 | } |
| 258 | |
| 259 | ;; i64 shift right arithmetic (shift 1s from the right) |
| 260 | |
| 261 | define i64 @ashr_i64_1(i64 %arg) { |
| 262 | %1 = ashr i64 %arg, 9 |
| 263 | ret i64 %1 |
| 264 | } |
| 265 | |
| 266 | define i64 @ashr_i64_2(i64 %arg) { |
| 267 | %1 = ashr i64 %arg, 3 |
| 268 | ret i64 %1 |
| 269 | } |
| 270 | |
| 271 | define i64 @ashr_i64_3(i64 %arg1, i32 %shift) { |
| 272 | %1 = zext i32 %shift to i64 |
| 273 | %2 = ashr i64 %arg1, %1 |
| 274 | ret i64 %2 |
| 275 | } |
Scott Michel | c9c8b2a | 2009-01-26 03:31:40 +0000 | [diff] [blame] | 276 | |
| 277 | define i32 @hi32_i64(i64 %arg) { |
| 278 | %1 = lshr i64 %arg, 32 |
| 279 | %2 = trunc i64 %1 to i32 |
| 280 | ret i32 %2 |
| 281 | } |
Kalle Raiskila | 9363f73 | 2010-11-29 14:44:28 +0000 | [diff] [blame] | 282 | |
| 283 | ; some random tests |
| 284 | define i128 @test_lshr_i128( i128 %val ) { |
| 285 | ;CHECK: test_lshr_i128 |
| 286 | ;CHECK: sfi |
| 287 | ;CHECK: rotqmbi |
| 288 | ;CHECK: rotqmbybi |
| 289 | ;CHECK: bi $lr |
| 290 | %rv = lshr i128 %val, 64 |
| 291 | ret i128 %rv |
| 292 | } |
Kalle Raiskila | 31cbac1 | 2011-03-04 13:19:18 +0000 | [diff] [blame^] | 293 | |
| 294 | ;Vector shifts |
| 295 | define <2 x i32> @shl_v2i32(<2 x i32> %val, <2 x i32> %sh) { |
| 296 | ;CHECK: shl |
| 297 | ;CHECK: bi $lr |
| 298 | %rv = shl <2 x i32> %val, %sh |
| 299 | ret <2 x i32> %rv |
| 300 | } |
| 301 | |
| 302 | define <4 x i32> @shl_v4i32(<4 x i32> %val, <4 x i32> %sh) { |
| 303 | ;CHECK: shl |
| 304 | ;CHECK: bi $lr |
| 305 | %rv = shl <4 x i32> %val, %sh |
| 306 | ret <4 x i32> %rv |
| 307 | } |
| 308 | |
| 309 | define <8 x i16> @shl_v8i16(<8 x i16> %val, <8 x i16> %sh) { |
| 310 | ;CHECK: shlh |
| 311 | ;CHECK: bi $lr |
| 312 | %rv = shl <8 x i16> %val, %sh |
| 313 | ret <8 x i16> %rv |
| 314 | } |
| 315 | |
| 316 | define <4 x i32> @lshr_v4i32(<4 x i32> %val, <4 x i32> %sh) { |
| 317 | ;CHECK: rotm |
| 318 | ;CHECK: bi $lr |
| 319 | %rv = lshr <4 x i32> %val, %sh |
| 320 | ret <4 x i32> %rv |
| 321 | } |
| 322 | |
| 323 | define <8 x i16> @lshr_v8i16(<8 x i16> %val, <8 x i16> %sh) { |
| 324 | ;CHECK: sfhi |
| 325 | ;CHECK: rothm |
| 326 | ;CHECK: bi $lr |
| 327 | %rv = lshr <8 x i16> %val, %sh |
| 328 | ret <8 x i16> %rv |
| 329 | } |
| 330 | |
| 331 | define <4 x i32> @ashr_v4i32(<4 x i32> %val, <4 x i32> %sh) { |
| 332 | ;CHECK: rotma |
| 333 | ;CHECK: bi $lr |
| 334 | %rv = ashr <4 x i32> %val, %sh |
| 335 | ret <4 x i32> %rv |
| 336 | } |
| 337 | |
| 338 | define <8 x i16> @ashr_v8i16(<8 x i16> %val, <8 x i16> %sh) { |
| 339 | ;CHECK: sfhi |
| 340 | ;CHECK: rotmah |
| 341 | ;CHECK: bi $lr |
| 342 | %rv = ashr <8 x i16> %val, %sh |
| 343 | ret <8 x i16> %rv |
| 344 | } |