aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorSteve Ellcey <sje@cup.hp.com>2005-06-29 15:34:57 +0000
committerSteve Ellcey <sje@cup.hp.com>2005-06-29 15:34:57 +0000
commitea13036dae404b92e608ecef9ba9050f3f7565a5 (patch)
tree108ab57403c614d7414706d5ee2c44f155666064 /gcc/tree.h
parent0919ceafe3f29cd96cb1b9b06997e9daddccebfd (diff)
PR middle-end/21969
* tree.h (TYPE_VECTOR_SUBPARTS): Change to shift expression. (SET_TYPE_VECTOR_SUBPARTS): New. * tree.c (make_vector_type): Replace TYPE_VECTOR_SUBPARTS with SET_TYPE_VECTOR_SUBPARTS. * tree-vect-transform.c (vect_transform_loop): Add cast. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@101423 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index a2e9a86f886..191ba133141 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -1667,7 +1667,12 @@ struct tree_block GTY(())
/* For a VECTOR_TYPE, this is the number of sub-parts of the vector. */
#define TYPE_VECTOR_SUBPARTS(VECTOR_TYPE) \
- (VECTOR_TYPE_CHECK (VECTOR_TYPE)->type.precision)
+ (((unsigned HOST_WIDE_INT) 1) \
+ << VECTOR_TYPE_CHECK (VECTOR_TYPE)->type.precision)
+
+/* Set precision to n when we have 2^n sub-parts of the vector. */
+#define SET_TYPE_VECTOR_SUBPARTS(VECTOR_TYPE, X) \
+ (VECTOR_TYPE_CHECK (VECTOR_TYPE)->type.precision = exact_log2 (X))
/* Indicates that objects of this type must be initialized by calling a
function when they are created. */