From f32c3adb8d77c0ebee112ecf26ae249c8574970e Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Tue, 7 Nov 2017 16:08:47 +0000 Subject: [PATCH] [AArch64] Use aarch64_reg_or_imm instead of nonmemory_operand Some of the shift expanders accepted nonmemory_operands but were only able to handle register_operands or CONST_INTs. This is probably academic without SVE, since we're not likely to see shifts by other types of constant (const_wide_ints, consts, etc). But for SVE, it's possible for a vectorised shift induction to have a CONST_POLY_INT shift amount. This patch makes the expanders use aarch64_reg_or_imm instead. 2017-11-07 Richard Sandiford gcc/ * config/aarch64/aarch64.md (ashl3, ashr3, lshr3) (rotr3, rotl3): Use aarch64_reg_or_imm instead of nonmmory_operand. From-SVN: r254499 --- gcc/ChangeLog | 6 ++++++ gcc/config/aarch64/aarch64.md | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f81b5d81567..db9ff08ddc8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-11-07 Richard Sandiford + + * config/aarch64/aarch64.md (ashl3, ashr3, lshr3) + (rotr3, rotl3): Use aarch64_reg_or_imm instead of + nonmmory_operand. + 2017-11-07 Richard Biener * match.pd: Fix build. diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index ce75cf4171d..423a3352aab 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -3958,7 +3958,7 @@ (define_expand "3" [(set (match_operand:GPI 0 "register_operand") (ASHIFT:GPI (match_operand:GPI 1 "register_operand") - (match_operand:QI 2 "nonmemory_operand")))] + (match_operand:QI 2 "aarch64_reg_or_imm")))] "" { if (CONST_INT_P (operands[2])) @@ -3994,7 +3994,7 @@ (define_expand "rotr3" [(set (match_operand:GPI 0 "register_operand") (rotatert:GPI (match_operand:GPI 1 "register_operand") - (match_operand:QI 2 "nonmemory_operand")))] + (match_operand:QI 2 "aarch64_reg_or_imm")))] "" { if (CONST_INT_P (operands[2])) @@ -4014,7 +4014,7 @@ (define_expand "rotl3" [(set (match_operand:GPI 0 "register_operand") (rotatert:GPI (match_operand:GPI 1 "register_operand") - (match_operand:QI 2 "nonmemory_operand")))] + (match_operand:QI 2 "aarch64_reg_or_imm")))] "" { /* (SZ - cnt) % SZ == -cnt % SZ */ -- 2.30.2