aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtl.h
diff options
context:
space:
mode:
authorVlad Lazar <vlad.lazar@arm.com>2018-08-16 16:33:43 +0000
committerJeff Law <law@gcc.gnu.org>2018-08-16 10:33:43 -0600
commitec18e48eaa0d7e06d46c7b544508a191d11a8921 (patch)
treeab7980e4a0ea136a6da132a6eaa6bd5bad54c76d /gcc/rtl.h
parent891b1d6872ecf18ccf605d036f8f01dec32d66a4 (diff)
downloadgcc-ec18e48eaa0d7e06d46c7b544508a191d11a8921.zip
gcc-ec18e48eaa0d7e06d46c7b544508a191d11a8921.tar.gz
gcc-ec18e48eaa0d7e06d46c7b544508a191d11a8921.tar.bz2
expmed.h (canonicalize_comparison): New declaration.
* expmed.h (canonicalize_comparison): New declaration. * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function. * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison. * optabs.c (prepare_cmp_insn): Likewise. * rtl.h (unsigned_condition_p): New function which checks if a comparison operator is unsigned. * gcc.target/aarch64/imm_choice_comparison.c: New test. From-SVN: r263591
Diffstat (limited to 'gcc/rtl.h')
-rw-r--r--gcc/rtl.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/rtl.h b/gcc/rtl.h
index d549b0a..68d3cea 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -3310,6 +3310,15 @@ extern enum rtx_code unsigned_condition (enum rtx_code);
extern enum rtx_code signed_condition (enum rtx_code);
extern void mark_jump_label (rtx, rtx_insn *, int);
+/* Return true if integer comparison operator CODE interprets its operands
+ as unsigned. */
+
+inline bool
+unsigned_condition_p (enum rtx_code code)
+{
+ return unsigned_condition (code) == code;
+}
+
/* In jump.c */
extern rtx_insn *delete_related_insns (rtx);