aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/aarch64/predicates.md
diff options
context:
space:
mode:
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>2017-06-05 08:49:59 +0000
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>2017-06-05 08:49:59 +0000
commit279dc4b464e3cc207b1729d8a392240430c57f42 (patch)
tree9561d1b7f733a9bfea072d79b805437a6d5f2a96 /gcc/config/aarch64/predicates.md
parente49d8b68a2330971c75ba7ff625c770e6f2ce2b9 (diff)
downloadgcc-279dc4b464e3cc207b1729d8a392240430c57f42.zip
gcc-279dc4b464e3cc207b1729d8a392240430c57f42.tar.gz
gcc-279dc4b464e3cc207b1729d8a392240430c57f42.tar.bz2
[AArch64] Use SUBS for parallel subtraction and comparison with immediate
* config/aarch64/aarch64.md (sub<mode>3_compare1_imm): New define_insn. (peephole2): New peephole2 to emit the above. * config/aarch64/predicates.md (aarch64_sub_immediate): New predicate. * gcc.target/aarch64/subs_compare_2.c: New test. From-SVN: r248870
Diffstat (limited to 'gcc/config/aarch64/predicates.md')
-rw-r--r--gcc/config/aarch64/predicates.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/config/aarch64/predicates.md b/gcc/config/aarch64/predicates.md
index 8e3ea9b..cd7ded9 100644
--- a/gcc/config/aarch64/predicates.md
+++ b/gcc/config/aarch64/predicates.md
@@ -77,6 +77,10 @@
(define_predicate "aarch64_fp_vec_pow2"
(match_test "aarch64_vec_fpconst_pow_of_2 (op) > 0"))
+(define_predicate "aarch64_sub_immediate"
+ (and (match_code "const_int")
+ (match_test "aarch64_uimm12_shift (-INTVAL (op))")))
+
(define_predicate "aarch64_plus_immediate"
(and (match_code "const_int")
(ior (match_test "aarch64_uimm12_shift (INTVAL (op))")