aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtl.h
diff options
context:
space:
mode:
authorAlistair Lee <alistair.lee@arm.com>2021-08-17 10:49:35 +0100
committerRichard Sandiford <richard.sandiford@arm.com>2021-08-17 10:49:35 +0100
commit568b9c0e8ee482228f6c565730447de5b18e7cb3 (patch)
tree5edeb2d82ac4bbff66cea2e7bb9975643a41a97b /gcc/rtl.h
parent891bdbf2b0432b4aa3d3e76923617fcb4fd33cf6 (diff)
downloadgcc-568b9c0e8ee482228f6c565730447de5b18e7cb3.zip
gcc-568b9c0e8ee482228f6c565730447de5b18e7cb3.tar.gz
gcc-568b9c0e8ee482228f6c565730447de5b18e7cb3.tar.bz2
aarch64: Replace some uses of GET_CODE with RTL predicate macros
gcc/ 2021-08-17 Alistair_Lee <alistair.lee@arm.com> * rtl.h (CONST_VECTOR_P): New macro. * config/aarch64/aarch64.c (aarch64_get_sve_pred_bits): Use RTL code testing macros. (aarch64_ptrue_all_mode): Likewise. (aarch64_expand_mov_immediate): Likewise. (aarch64_const_vec_all_in_range_p): Likewise. (aarch64_rtx_costs): Likewise. (aarch64_legitimate_constant_p): Likewise. (aarch64_simd_valid_immediate): Likewise. (aarch64_simd_make_constant): Likewise. (aarch64_convert_mult_to_shift): Likewise. (aarch64_expand_sve_vec_perm): Likewise. (aarch64_vec_fpconst_pow_of_2): Likewise.
Diffstat (limited to 'gcc/rtl.h')
-rw-r--r--gcc/rtl.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 5fdcdfc..5473cc9 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -830,6 +830,9 @@ struct GTY(()) rtvec_def {
#define CONST_DOUBLE_AS_FLOAT_P(X) \
(GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) != VOIDmode)
+/* Predicate yielding nonzero iff X is an rtx for a constant vector. */
+#define CONST_VECTOR_P(X) (GET_CODE (X) == CONST_VECTOR)
+
/* Predicate yielding nonzero iff X is a label insn. */
#define LABEL_P(X) (GET_CODE (X) == CODE_LABEL)