aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorTamar Christina <tamar.christina@arm.com>2022-12-12 15:16:50 +0000
committerTamar Christina <tamar.christina@arm.com>2022-12-12 15:17:24 +0000
commitdc582d2ef32e2d3723c68d111f4e49607631f34d (patch)
tree47d533c626f633e61a78cdc46a2a4dbc59c42951 /gcc/tree.h
parent2cba118e538ba0b7582af7f9fb5ba2dfbb772f8e (diff)
downloadgcc-dc582d2ef32e2d3723c68d111f4e49607631f34d.zip
gcc-dc582d2ef32e2d3723c68d111f4e49607631f34d.tar.gz
gcc-dc582d2ef32e2d3723c68d111f4e49607631f34d.tar.bz2
middle-end: Add new tbranch optab to add support for bit-test-and-branch operations
This adds a new test-and-branch optab that can be used to do a conditional test of a bit and branch. This is similar to the cbranch optab but instead can test any arbitrary bit inside the register. This patch recognizes boolean comparisons and single bit mask tests. gcc/ChangeLog: * dojump.cc (do_jump): Pass along value. (do_jump_by_parts_greater_rtx): Likewise. (do_jump_by_parts_zero_rtx): Likewise. (do_jump_by_parts_equality_rtx): Likewise. (do_compare_rtx_and_jump): Likewise. (do_compare_and_jump): Likewise. * dojump.h (do_compare_rtx_and_jump): New. * optabs.cc (emit_cmp_and_jump_insn_1): Refactor to take optab to check. (validate_test_and_branch): New. (emit_cmp_and_jump_insns): Optiobally take a value, and when value is supplied then check if it's suitable for tbranch. * optabs.def (tbranch_eq$a4, tbranch_ne$a4): New. * doc/md.texi (tbranch_@var{op}@var{mode}4): Document it. * optabs.h (emit_cmp_and_jump_insns): New. * tree.h (tree_zero_one_valued_p): New.
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 73d3dd7..31d0dca 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -4722,6 +4722,7 @@ extern tree signed_or_unsigned_type_for (int, tree);
extern tree signed_type_for (tree);
extern tree unsigned_type_for (tree);
extern bool is_truth_type_for (tree, tree);
+extern bool tree_zero_one_valued_p (tree);
extern tree truth_type_for (tree);
extern tree build_pointer_type_for_mode (tree, machine_mode, bool);
extern tree build_pointer_type (tree);