diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-20 13:36:30 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-20 13:36:30 +0000 |
commit | 7dc71bfc535e8b3e88eafa96380229dc37082a80 (patch) | |
tree | 4c128ff41af2ff7489d956b7ab66a144e7334910 /gcc/tree.c | |
parent | 8a5f403f0d9d12d2592c93bcb340a8fdf1cc9885 (diff) | |
download | gcc-7dc71bfc535e8b3e88eafa96380229dc37082a80.tar.gz |
2011-07-20 Richard Guenther <rguenther@suse.de>
PR middle-end/18908
* tree.c (integer_all_onesp): Use TYPE_PRECISION, not mode precision.
* tree-ssa-forwprop.c (simplify_bitwise_binary): Remove bogus
ADDR_EXPR folding. Canonicalize X ^ ~0 as ~X.
* gcc.dg/tree-ssa/pr18908.c: New testcase.
* gcc.dg/tree-ssa/bitwise-sink.c: Adjust.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176510 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/tree.c b/gcc/tree.c index 8c44851a18b..30ff80f152f 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -1759,9 +1759,7 @@ integer_all_onesp (const_tree expr) if (!uns) return 0; - /* Note that using TYPE_PRECISION here is wrong. We care about the - actual bits, not the (arbitrary) range of the type. */ - prec = GET_MODE_BITSIZE (TYPE_MODE (TREE_TYPE (expr))); + prec = TYPE_PRECISION (TREE_TYPE (expr)); if (prec >= HOST_BITS_PER_WIDE_INT) { HOST_WIDE_INT high_value; |