|
1266 | 1266 | ;; - XAR
|
1267 | 1267 | ;; -------------------------------------------------------------------------
|
1268 | 1268 |
|
| 1269 | +;; Also allow the Advanced SIMD modes as the the SVE2 XAR instruction |
| 1270 | +;; can handle more element sizes than the TARGET_SHA3 one from Advanced SIMD. |
| 1271 | +;; Don't allow the V2DImode use here unless !TARGET_SHA3 as the Advanced SIMD |
| 1272 | +;; version should be preferred when available as it is non-destructive on its |
| 1273 | +;; input. |
1269 | 1274 | (define_insn "@aarch64_sve2_xar<mode>"
|
1270 |
| - [(set (match_operand:SVE_FULL_I 0 "register_operand") |
1271 |
| - (rotatert:SVE_FULL_I |
1272 |
| - (xor:SVE_FULL_I |
1273 |
| - (match_operand:SVE_FULL_I 1 "register_operand") |
1274 |
| - (match_operand:SVE_FULL_I 2 "register_operand")) |
1275 |
| - (match_operand:SVE_FULL_I 3 "aarch64_simd_rshift_imm")))] |
1276 |
| - "TARGET_SVE2" |
1277 |
| - {@ [ cons: =0 , 1 , 2 ; attrs: movprfx ] |
1278 |
| - [ w , %0 , w ; * ] xar\t%0.<Vetype>, %0.<Vetype>, %2.<Vetype>, #%3 |
1279 |
| - [ ?&w , w , w ; yes ] movprfx\t%0, %1\;xar\t%0.<Vetype>, %0.<Vetype>, %2.<Vetype>, #%3 |
| 1275 | + [(set (match_operand:SVE_ASIMD_FULL_I 0 "register_operand" "=w,?&w") |
| 1276 | + (rotate:SVE_ASIMD_FULL_I |
| 1277 | + (xor:SVE_ASIMD_FULL_I |
| 1278 | + (match_operand:SVE_ASIMD_FULL_I 1 "register_operand" "%0,w") |
| 1279 | + (match_operand:SVE_ASIMD_FULL_I 2 "register_operand" "w,w")) |
| 1280 | + (match_operand:SVE_ASIMD_FULL_I 3 "aarch64_simd_lshift_imm")))] |
| 1281 | + "TARGET_SVE2 && !(<MODE>mode == V2DImode && TARGET_SHA3)" |
| 1282 | + { |
| 1283 | + operands[3] |
| 1284 | + = GEN_INT (GET_MODE_UNIT_BITSIZE (<MODE>mode) |
| 1285 | + - INTVAL (unwrap_const_vec_duplicate (operands[3]))); |
| 1286 | + if (which_alternative == 0) |
| 1287 | + return "xar\t%Z0.<Vetype>, %Z0.<Vetype>, %Z2.<Vetype>, #%3"; |
| 1288 | + return "movprfx\t%Z0, %Z1\;xar\t%Z0.<Vetype>, %Z0.<Vetype>, %Z2.<Vetype>, #%3"; |
1280 | 1289 | }
|
| 1290 | + [(set_attr "movprfx" "*,yes")] |
1281 | 1291 | )
|
1282 | 1292 |
|
1283 | 1293 | ;; -------------------------------------------------------------------------
|
|
0 commit comments