diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-07 13:18:07 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-07 13:18:07 +0000 |
commit | 8cd9143e12d8fd7c4bc512443ded2475e404d10f (patch) | |
tree | 5cc975e1ee19aa16d83a69b02b66bd72b50748e7 /gcc/generic-match-head.c | |
parent | fabf26080cb4cc3fecd30d409ec9c63f0ec42eff (diff) | |
download | gcc-8cd9143e12d8fd7c4bc512443ded2475e404d10f.tar.gz |
* match.pd (bit_and (plus/minus (convert @0) (convert @1) mask): New
simplifier to narrow arithmetic.
* generic-match-head.c: (types_match, single_use): New functions.
* gimple-match-head.c: (types_match, single_use): New functions.
* gcc.dg/tree-ssa/shorten-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222877 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/generic-match-head.c')
-rw-r--r-- | gcc/generic-match-head.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/generic-match-head.c b/gcc/generic-match-head.c index daa56aa370e..efaa2d8b7ce 100644 --- a/gcc/generic-match-head.c +++ b/gcc/generic-match-head.c @@ -70,4 +70,20 @@ along with GCC; see the file COPYING3. If not see #include "dumpfile.h" #include "generic-match.h" +/* Routine to determine if the types T1 and T2 are effectively + the same for GENERIC. */ +static inline bool +types_match (tree t1, tree t2) +{ + return TYPE_MAIN_VARIANT (t1) == TYPE_MAIN_VARIANT (t2); +} + +/* Return if T has a single use. For GENERIC, we assume this is + always true. */ + +static inline bool +single_use (tree t ATTRIBUTE_UNUSED) +{ + return true; +} |